函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\shm.c Create Date:2022-07-27 18:21:43
Last Modify:2020-03-17 22:58:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Called with shm_ids.rwsem (writer) and the shp structure locked.* Only shm_ids.rwsem remains locked on exit.

函数原型:static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)

返回类型:void

参数:

类型参数名称
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  如果shm_nattch
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  否则shm_destroy(ns, shp)
调用者
名称描述
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.