Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\mqueue.c Create Date:2022-07-28 16:50:15
Last Modify:2020-03-17 23:00:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:msg_get

Proto:static inline struct msg_msg *msg_get(struct mqueue_inode_info *info)

Type:struct msg_msg

Parameter:

TypeParameterName
struct mqueue_inode_info *info
191  struct rb_node * parent = NULL
195  try_again :
201  parent = msg_tree_rightmost
202  If Not parent Then
204  pr_warn_once("Inconsistency in POSIX message queue, no tree element, but supposedly messages should exist!\n")
209  Return NULL
211  leaf = rb_entry(parent, structposix_msg_tree_node, rb_node)
212  If Value for the false possibility is greater at compile time(list_empty - tests whether a list is empty*@head: the list to test.) Then
213  pr_warn_once("Inconsistency in POSIX message queue, empty leaf node but we haven't implemented lazy leaf delete!\n")
216  msg_tree_erase(leaf, info)
217  Go to try_again
218  Else
219  msg = list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & msg_list, structmsg_msg, m_list)
221  deletes entry from list
226  number of messages currently queued --
227  size of queue in memory (sum of all msgs) -= message text size
228  Return msg
Caller
NameDescribe
mqueue_evict_inode
do_mq_timedreceive