函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\sem.c Create Date:2022-07-27 18:20:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:compat_ksys_semctl

函数原型:static long compat_ksys_semctl(int semid, int semnum, int cmd, int arg, int version)

返回类型:long

参数:

类型参数名称
intsemid
intsemnum
intcmd
intarg
intversion
1758  __userp等于A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already.
1763  ns等于ipc_ns
1765  如果semid小于0则返回:负EINVAL
1769  : & == see ipcs
1770  : & == SEM_INFO
1771  返回:semctl_info(ns, semid, cmd, p)
1772  : & == get ipc_perm options
1773  : & == pcs ctl cmds
1774  : & == SEM_STAT_ANY
1775  err等于semctl_stat(ns, semid, cmd, & semid64)
1776  如果err小于0则返回:err
1778  如果copy_compat_semid_to_user(p, & semid64, version)则err等于负EFAULT
1780  返回:err
1781  : & == get semval
1782  : & == get sempid
1783  : & == get semncnt
1784  : & == get semzcnt
1785  : & == get all semval's
1786  : & == set all semval's
1787  返回:semctl_main(ns, semid, semnum, cmd, p)
1788  : & == set semval
1789  返回:semctl_setval(ns, semid, semnum, arg)
1790  : & == set ipc_perm options
1791  如果copy_compat_semid_from_user( & semid64, p, version)则返回:负EFAULT
1794  : & == move resource
1795  返回:This function handles some semctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.
1796  默认
1797  返回:负EINVAL
调用者
名称描述
COMPAT_SYSCALL_DEFINE4