Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Called with ns->shm_ids(ns).rwsem locked

Proto:static int shm_try_destroy_orphaned(int id, void *p, void *data)

Type:int

Parameter:

TypeParameterName
intid
void *p
void *data
354  ns = data
355  ipcp = p
356  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)
364  If ( The task created the shm object. NULL if the task is dead. != NULL) Then Return 0
367  If 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 Then
368  shm_lock_by_ptr(shp)
369  shm_destroy(ns, shp)
371  Return 0