函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:msgctl_info

函数原型:static int msgctl_info(struct ipc_namespace *ns, int msqid, int cmd, struct msginfo *msginfo)

返回类型:int

参数:

类型参数名称
struct ipc_namespace *ns
intmsqid
intcmd
struct msginfo *msginfo
466  err等于security_msg_queue_msgctl(NULL, cmd)
467  如果err则返回:err
470  memset(msginfo, 0, 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  如果cmd恒等于MSG_INFO
478  msgpool等于in_use
479  msgmap等于atomic_read( & msg_hdrs)
480  msgtql等于atomic_read( & msg_bytes)
481  否则
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  返回:如果max_idx小于0则0否则max_idx
调用者
名称描述
ksys_msgctl
compat_ksys_msgctl