函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ksys_semctl

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

返回类型:long

参数:

类型参数名称
intsemid
intsemnum
intcmd
unsigned longarg
intversion
1636  __userp等于arg
1640  如果semid小于0则返回:负EINVAL
1643  ns等于ipc_ns
1646  :cmd恒等于see ipcs
1647  :cmd恒等于SEM_INFO
1648  返回:semctl_info(ns, semid, cmd, p)
1649  :cmd恒等于get ipc_perm options
1650  :cmd恒等于pcs ctl cmds
1651  :cmd恒等于SEM_STAT_ANY
1652  err等于semctl_stat(ns, semid, cmd, & semid64)
1653  如果err小于0则返回:err
1655  如果copy_semid_to_user(p, & semid64, version)则err等于负EFAULT
1657  返回:err
1658  :cmd恒等于get all semval's
1659  :cmd恒等于get semval
1660  :cmd恒等于get sempid
1661  :cmd恒等于get semncnt
1662  :cmd恒等于get semzcnt
1663  :cmd恒等于set all semval's
1664  返回:semctl_main(ns, semid, semnum, cmd, p)
1665  :cmd恒等于set semval
1672  val等于arg
1674  返回:semctl_setval(ns, semid, semnum, val)
1676  :cmd恒等于set ipc_perm options
1677  如果copy_semid_from_user( & semid64, p, version)则返回:负EFAULT
1680  :cmd恒等于move resource
1681  返回: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.
1682  默认
1683  返回:负EINVAL
调用者
名称描述
SYSCALL_DEFINE4