Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:If the task doesn't already have a undo_list, then allocate one* here. We guarantee there is only one thread using this undo list,* and current is THE ONE* If this allocation and assignment succeeds, but later

Proto:static inline int get_undo_list(struct sem_undo_list **undo_listp)

Type:int

Parameter:

TypeParameterName
struct sem_undo_list **undo_listp
1836  undo_list = undo_list
1837  If Not undo_list Then
1838  undo_list = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1839  If (undo_list == NULL) Then Return -ENOMEM
1841  Process spin lock initialization( & lock)
1842  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
1843  Initialization list head
1845  undo_list = undo_list
1847  undo_listp = undo_list
1848  Return 0
Caller
NameDescribe
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
copy_semundoIf CLONE_SYSVSEM is set, establish sharing of SEM_UNDO state between* parent and child tasks.