Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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)

Proto:static int newque(struct ipc_namespace *ns, struct ipc_params *params)

Type:int

Parameter:

TypeParameterName
struct ipc_namespace *ns
struct ipc_params *params
137  key = key
138  msgflg = flg
140  msq = kvmalloc( size of msq , GFP_KERNEL)
141  If Value for the false possibility is greater at compile time(!msq) Then Return -ENOMEM
144  mode = msgflg & S_IRWXUGO
145  key = key
147  security = NULL
148  retval = security_msg_queue_alloc( & q_perm)
149  If retval Then
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  Return 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  Initialization list head
160  Initialization list head
161  Initialization list head
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  If retval < 0 Then
166  ipc_rcu_putref( & q_perm, msg_rcu_free)
167  Return 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  Return id