函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\mqueue.c Create Date:2022-07-27 18:25:30
Last Modify:2020-03-17 23:00:47 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:msg_get

函数原型:static inline struct msg_msg *msg_get(struct mqueue_inode_info *info)

返回类型:struct msg_msg

参数:

类型参数名称
struct mqueue_inode_info *info
191  struct rb_node * parent = NULL
195  try_again :
201  parent等于msg_tree_rightmost
202  如果非parent
204  pr_warn_once("Inconsistency in POSIX message queue, no tree element, but supposedly messages should exist!\n")
209  返回:NULL
211  leaf等于rb_entry(parent, structposix_msg_tree_node, rb_node)
212  如果此条件成立可能性小(为编译器优化)(链表为空)则
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  转到:try_again
218  否则
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  删除链表项
222  如果链表为空
226  number of messages currently queued 自减
227  size of queue in memory (sum of all msgs) 减等于message text size
228  返回:msg
调用者
名称描述
mqueue_evict_inode
do_mq_timedreceive