函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:wque - Create a new msg queue*@ns: namespace*@params: ptr to the structure that contains the key and msgflg* Called with msg_ids.rwsem held (writer)

函数原型:static int newque(struct ipc_namespace *ns, struct ipc_params *params)

返回类型:int

参数:

类型参数名称
struct ipc_namespace *ns
struct ipc_params *params
137  key等于key
138  msgflg等于flg
140  msq等于kvmalloc(msq的长度, GFP_KERNEL)
141  如果此条件成立可能性小(为编译器优化)(!msq)则返回:负ENOMEM
144  mode等于msgflg按位与S_IRWXUGO
145  key等于key
147  security = NULL
148  retval等于security_msg_queue_alloc( & q_perm)
149  如果retval
150  kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.
151  返回:retval
154  last msgsnd time 等于last msgrcv time 等于0
155  last change time 等于ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems.
156  current number of bytes on queue 等于umber of messages in queue 等于0
157  max number of bytes on queue 等于msg_ctlmnb
158  pid of last msgsnd = last receive pid = NULL
159  初始化链表头
160  初始化链表头
161  初始化链表头
164  retval等于pc_addid - add an ipc identifier*@ids: ipc identifier set*@new: new ipc permission set*@limit: limit for the number of used ids* Add an entry 'new' to the ipc ids idr
165  如果retval小于0则
166  ipc_rcu_putref( & q_perm, msg_rcu_free)
167  返回:retval
170  ipc_unlock_object( & q_perm)
171  _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()
173  返回:id