Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\msg.c Create Date:2022-07-28 16:42:27
Last Modify:2020-03-17 22:56:56 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:find_msg

Proto:static struct msg_msg *find_msg(struct msg_queue *msq, long *msgtyp, int mode)

Type:struct msg_msg

Parameter:

TypeParameterName
struct msg_queue *msq
long *msgtyp
intmode
1045  struct msg_msg * msg, * found = NULL
1046  count = 0
1049  If testmsg(msg, * msgtyp, mode) && Not security_msg_queue_msgrcv( & q_perm, msg, current process, * msgtyp, mode) Then
1052  If mode == SEARCH_LESSEQUAL && m_type != 1 Then
1053  msgtyp = m_type - 1
1054  found = msg
1055  Else if mode == SEARCH_NUMBER Then
1056  If msgtyp == count Then Return msg
1058  Else Return msg
1060  count++
1064  Return If found Else ERR_PTR( - EAGAIN)
Caller
NameDescribe
do_msgrcv