Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:shm_close

Proto:static void shm_close(struct vm_area_struct *vma)

Type:void

Parameter:

TypeParameterName
struct vm_area_struct *vma
324  file = File we map to (can be NULL).
325  sfd = shm_file_data(file)
327  ns = ns
329  lock for writing
331  shp = shm_lock_(check_) routines are called in the paths where the rwsem* is not necessarily held.
337  If WARN_ON_ONCE(IS_ERR(shp)) Then Go to done
340  ipc_update_pid( & shm_lprid, task_tgid(current process))
341  shm_dtim = ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems.
342  shm_nattch--
343  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 shm_destroy(ns, shp)
345  Else shm_unlock(shp)
347  done :
348  lease a write lock
Caller
NameDescribe
shm_mmap