函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\sem.c Create Date:2022-07-27 18:18:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sem_unlock

函数原型:static inline void sem_unlock(struct sem_array *sma, int locknum)

返回类型:void

参数:

类型参数名称
struct sem_array *sma
intlocknum
440  如果locknum恒等于SEM_GLOBAL_LOCK
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  否则
445  sem等于sems[locknum]
446  自旋锁解锁
调用者
名称描述
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