Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Enter the mode suitable for non-simple operations:* Caller must own sem_perm.lock.

Proto:static void complexmode_enter(struct sem_array *sma)

Type:void

Parameter:

TypeParameterName
struct sem_array *sma
316  If >0: global lock required > 0 Then
322  >0: global lock required = Switching from the mode suitable for simple ops* to the mode for complex ops is costly. Therefore:* use some hysteresis
323  Return
325  >0: global lock required = Switching from the mode suitable for simple ops* to the mode for complex ops is costly. Therefore:* use some hysteresis
327  When i < . of semaphores in array cycle
328  sem = sems[i]
329  spin_lock( & spinlock for fine-grained semtimedop )
330  spin_unlock( & spinlock for fine-grained semtimedop )
Caller
NameDescribe
sem_lockIf the request contains only one semaphore operation, and there are* no complex transactions pending, lock only the semaphore involved
sysvipc_sem_proc_show