函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:shm_may_destroy - identifies whether shm segment should be destroyed now* Returns true if and only if there are no active users of the segment and* one of the following is true:* 1) shmctl(id, IPC_RMID, NULL) was called for this shp* 2) sysctl kernel

函数原型:static bool shm_may_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp)

返回类型:bool

参数:

类型参数名称
struct ipc_namespace *ns
struct shmid_kernel *shp
311  返回:shm_nattch恒等于0且shm_rmid_forcedmode按位与segment will be destroyed on last detach 的值
调用者
名称描述
shm_close
shm_try_destroy_orphanedCalled with ns->shm_ids(ns).rwsem locked
exit_shmLocking assumes this will only be called with task == current
do_shmatFix shmaddr, allocate descriptor, map shm, add attach descriptor to lists.* NOTE! Despite the name, this is NOT a direct system call entrypoint. The* "raddr" thing points to kernel space, and there has to be a wrapper around* this.