Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:heck_qop: Test if a queued operation sleeps on the semaphore semnum

Proto:static int check_qop(struct sem_array *sma, int semnum, struct sem_queue *q, bool count_zero)

Type:int

Parameter:

TypeParameterName
struct sem_array *sma
intsemnum
struct sem_queue *q
boolcount_zero
1056  sop = he operation that blocked
1065  pr_info_once("semctl(GETNCNT/GETZCNT) is since 3.16 Single Unix Specification compliant.\nThe task %s (%d) triggered the difference, watch for misbehavior.\n", comm, task_pid_nr(current process))
1069  If semaphore index in array != semnum Then Return 0
1072  If count_zero && semaphore operation == 0 Then Return 1
1074  If Not count_zero && semaphore operation < 0 Then Return 1
1077  Return 0
Caller
NameDescribe
count_semcntThe 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