Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:The following counts are associated to each semaphore:* semncnt number of tasks waiting on semval being nonzero* semzcnt number of tasks waiting on semval being zero* Per definition, a task waits only on the semaphore of the first semop

Proto:static int count_semcnt(struct sem_array *sma, ushort semnum, bool count_zero)

Type:int

Parameter:

TypeParameterName
struct sem_array *sma
ushortsemnum
boolcount_zero
1094  semcnt = 0
1096  If count_zero Then l = pending single-sop operations
1098  Else l = pending single-sop operations
1105  semcnt++
1110  semcnt += heck_qop: Test if a queued operation sleeps on the semaphore semnum
1112  If count_zero Then
1114  semcnt += heck_qop: Test if a queued operation sleeps on the semaphore semnum
1117  Return semcnt
Caller
NameDescribe
semctl_main