函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ksys_msgctl

函数原型:static long ksys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf, int version)

返回类型:long

参数:

类型参数名称
intmsqid
intcmd
struct msqid_ds __user *buf
intversion
576  如果msqid小于0或cmd小于0则返回:负EINVAL
579  ns等于ipc_ns
582  :cmd恒等于see ipcs
583  :cmd恒等于MSG_INFO
585  err等于msgctl_info(ns, msqid, cmd, & msginfo)
586  如果err小于0则返回:err
588  如果copy_to_user(buf, & msginfo, msginfo的长度)则err等于负EFAULT
590  返回:err
592  :cmd恒等于pcs ctl commands
593  :cmd恒等于MSG_STAT_ANY
594  :cmd恒等于get ipc_perm options
595  err等于msgctl_stat(ns, msqid, cmd, & msqid64)
596  如果err小于0则返回:err
598  如果copy_msqid_to_user(buf, & msqid64, version)则err等于负EFAULT
600  返回:err
601  :cmd恒等于set ipc_perm options
602  如果copy_msqid_from_user( & msqid64, buf, version)则返回:负EFAULT
604  返回:This function handles some msgctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.
606  :cmd恒等于move resource
607  返回:This function handles some msgctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.
608  默认
609  返回:负EINVAL
调用者
名称描述
SYSCALL_DEFINE3