Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:copy_msqid_to_user

Proto:static inline unsigned long copy_msqid_to_user(void __user *buf, struct msqid64_ds *in, int version)

Type:unsigned long

Parameter:

TypeParameterName
void __user *buf
struct msqid64_ds *in
intversion
302  Case version == New version (support 32-bit UIDs, biggermessage sizes, etc.
303  Return copy_to_user(buf, in, size of in )
304  Case version == Old version (no 32-bit UID support on manyarchitectures)
308  memset( & out, 0, size of out )
310  pc64_perm_to_ipc_perm - convert new ipc permissions to old*@in: new style ipc permissions*@out: old style ipc permissions* Turn the new style permissions object @in into a compatibility* object and store it into the @out pointer.
312  last msgsnd time = last msgsnd time
313  last msgrcv time = last msgrcv time
314  last change time = last change time
316  If current number of bytes on queue > USHRT_MAX Then current number of bytes on queue = USHRT_MAX
318  Else current number of bytes on queue = current number of bytes on queue
320  Reuse junk fields for 32 bit = current number of bytes on queue
322  If umber of messages in queue > USHRT_MAX Then umber of messages in queue = USHRT_MAX
324  Else umber of messages in queue = umber of messages in queue
327  If max number of bytes on queue > USHRT_MAX Then max number of bytes on queue = USHRT_MAX
329  Else max number of bytes on queue = max number of bytes on queue
331  ditto = max number of bytes on queue
333  pid of last msgsnd = pid of last msgsnd
334  last receive pid = last receive pid
336  Return copy_to_user(buf, & out, size of out )
338  Default
339  Return -EINVAL
Caller
NameDescribe
ksys_msgctl