函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\msg.c Create Date:2022-07-27 18:16:37
Last Modify:2020-03-17 22:56:56 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:que() wakes up waiters on the sender and receiver waiting queue,* removes the message queue from message queue ID IDR, and cleans up all the* messages associated with this queue.* msg_ids.rwsem (writer) and the spinlock for this message queue are held

函数原型:static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)

返回类型:void

参数:

类型参数名称
struct ipc_namespace *ns
struct kern_ipc_perm *ipcp
256  msq等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(ipcp, structmsg_queue, q_perm)
259  expunge_all(msq, - EIDRM, & wake_q)
260  ss_wakeup(msq, & wake_q, true)
261  msg_rmid(ns, msq)
262  ipc_unlock_object( & q_perm)
263  wake_up_q( & wake_q)
264  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
267  atomic_dec( & msg_hdrs)
268  free_msg(msg)
270  atomic_sub(current number of bytes on queue , & msg_bytes)
271  ipc_update_pid( & pid of last msgsnd , NULL)
272  ipc_update_pid( & last receive pid , NULL)
273  ipc_rcu_putref( & q_perm, msg_rcu_free)
调用者
名称描述
msgctl_downThis function handles some msgctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.