函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:semctl_info

函数原型:static int semctl_info(struct ipc_namespace *ns, int semid, int cmd, void __user *p)

返回类型:int

参数:

类型参数名称
struct ipc_namespace *ns
intsemid
intcmd
void __user *p
1296  err等于security_sem_semctl(NULL, cmd)
1297  如果err则返回:err
1300  memset( & seminfo, 0, seminfo的长度)
1301  semmni等于sc_semmni
1302  semmns等于sc_semmns
1303  semmsl等于sc_semmsl
1304  semopm等于sc_semopm
1305  semvmx等于<= 32767 semaphore maximum value
1306  semmnu等于um of undo structures system wide
1307  semmap等于# of entries in semaphore map
1308  semume等于max num of undo entries per process
1309  lock for reading
1310  如果cmd恒等于SEM_INFO
1311  semusz等于in_use
1312  semaem等于used_sems
1313  否则
1314  semusz等于sizeof struct sem_undo
1315  semaem等于adjust on exit max value
1317  max_idx等于pc_get_maxidx - get the highest assigned index*@ids: ipc identifier set* Called with ipc_ids.rwsem held for reading.
1318  lease a read lock
1319  如果copy_to_user(p, & seminfo, seminfo的长度)则返回:负EFAULT
1321  返回:如果max_idx小于0则0否则max_idx
调用者
名称描述
ksys_semctl
compat_ksys_semctl