Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\sem.c Create Date:2022-07-28 16:44:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:semctl_info

Proto:static int semctl_info(struct ipc_namespace *ns, int semid, int cmd, void __user *p)

Type:int

Parameter:

TypeParameterName
struct ipc_namespace *ns
intsemid
intcmd
void __user *p
1296  err = security_sem_semctl(NULL, cmd)
1297  If err Then Return err
1300  memset( & seminfo, 0, size of 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  If cmd == SEM_INFO Then
1311  semusz = in_use
1312  semaem = used_sems
1313  Else
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  If copy_to_user(p, & seminfo, size of seminfo ) Then Return -EFAULT
1321  Return If max_idx < 0 Then 0 Else max_idx
Caller
NameDescribe
ksys_semctl
compat_ksys_semctl