Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\shm.c Create Date:2022-07-28 16:46:27
Last Modify:2020-03-17 22:58:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Called with shm_ids.rwsem (writer) and the shp structure locked.* Only shm_ids.rwsem remains locked on exit.

Proto:static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)

Type:void

Parameter:

TypeParameterName
struct ipc_namespace *ns
struct kern_ipc_perm *ipcp
117  shp = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(ipcp, structshmid_kernel, shm_perm)
119  If shm_nattch Then
120  mode |= segment will be destroyed on last detach
122  pc_set_key_private - switch the key of an existing ipc to IPC_PRIVATE*@ids: ipc identifier set*@ipcp: ipc perm structure containing the key to modify* ipc_ids.rwsem (as a writer) and the spinlock for this ID are held
123  shm_unlock(shp)
124  Else shm_destroy(ns, shp)
Caller
NameDescribe
shmctl_downThis function handles some shmctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.