Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sem_unlock

Proto:static inline void sem_unlock(struct sem_array *sma, int locknum)

Type:void

Parameter:

TypeParameterName
struct sem_array *sma
intlocknum
440  If locknum == SEM_GLOBAL_LOCK Then
441  merge_queues - unmerge queues, if possible.*@sma: semaphore array* The function unmerges the wait queues if complex_count is 0.* It must be called prior to dropping the global semaphore array lock.
442  Try to leave the mode that disallows simple operations:* Caller must own sem_perm.lock.
443  ipc_unlock_object( & permissions .. see ipc.h )
444  Else
445  sem = sems[locknum]
446  spin_unlock( & spinlock for fine-grained semtimedop )
Caller
NameDescribe
newarywary - Create a new semaphore set*@ns: namespace*@params: ptr to the structure that contains key, semflg and nsems* Called with sem_ids.rwsem held (as a writer)
freearyFree a semaphore set. freeary() is called with sem_ids.rwsem locked* as a writer and the spinlock for this semaphore set hold. sem_ids.rwsem* remains locked on exit.
semctl_setval
semctl_main
semctl_downThis function handles some semctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.
find_alloc_undod_alloc_undo - lookup (and if not present create) undo array*@ns: namespace*@semid: semaphore array id* The function looks up (and if not present creates) the undo structure.* The size of the undo structure depends on the size of the semaphore
do_semtimedop
exit_semadd semadj values to semaphores, free undo structures