Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_smart_update - optimized update_queue*@sma: semaphore array*@sops: operations that were performed*@nsops: number of operations*@otime: force setting otime*@wake_q: lockless wake-queue head* do_smart_update() does the required calls to update_queue and

Proto:static void do_smart_update(struct sem_array *sma, struct sembuf *sops, int nsops, int otime, struct wake_q_head *wake_q)

Type:void

Parameter:

TypeParameterName
struct sem_array *sma
struct sembuf *sops
intnsops
intotime
struct wake_q_head *wake_q
1015  otime |= do_smart_wakeup_zero - wakeup all wait for zero tasks*@sma: semaphore array*@sops: operations that were performed*@nsops: number of operations*@wake_q: lockless wake-queue head* Checks all required queue for wait-for-zero operations, based
1017  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
1019  otime |= pdate_queue - look for tasks that can be completed.*@sma: semaphore array.*@semnum: semaphore that was modified.*@wake_q: lockless wake-queue head.* update_queue must be called after a semaphore in a semaphore array* was modified
1020  Else
1021  If Not sops Then
1028  Else
1038  When i < nsops cycle
1046  If otime Then set_semotime - set sem_otime*@sma: semaphore array*@sops: operations that modified the array, may be NULL* sem_otime is replicated to avoid cache line trashing.* This function sets one instance to the current time.
Caller
NameDescribe
semctl_setval
semctl_main
do_semtimedop
exit_semadd semadj values to semaphores, free undo structures