Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:msgctl_info

Proto:static int msgctl_info(struct ipc_namespace *ns, int msqid, int cmd, struct msginfo *msginfo)

Type:int

Parameter:

TypeParameterName
struct ipc_namespace *ns
intmsqid
intcmd
struct msginfo *msginfo
466  err = security_msg_queue_msgctl(NULL, cmd)
467  If err Then Return err
470  memset(msginfo, 0, size of msginfo )
471  msgmni = msg_ctlmni
472  msgmax = msg_ctlmax
473  msgmnb = msg_ctlmnb
474  msgssz = message segment size
475  msgseg = MSGSEG
476  lock for reading
477  If cmd == MSG_INFO Then
478  msgpool = in_use
479  msgmap = atomic_read( & msg_hdrs)
480  msgtql = atomic_read( & msg_bytes)
481  Else
482  msgmap = umber of entries in message map
483  msgpool = size in kbytes of message pool
484  msgtql = umber of system message headers
486  max_idx = pc_get_maxidx - get the highest assigned index*@ids: ipc identifier set* Called with ipc_ids.rwsem held for reading.
487  lease a read lock
488  Return If max_idx < 0 Then 0 Else max_idx
Caller
NameDescribe
ksys_msgctl
compat_ksys_msgctl