MCPcopy Create free account
hub / github.com/F-Stack/f-stack / shm_drop

Function shm_drop

freebsd/kern/uipc_shm.c:896–909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

894}
895
896void
897shm_drop(struct shmfd *shmfd)
898{
899
900 if (refcount_release(&shmfd->shm_refs)) {
901#ifdef MAC
902 mac_posixshm_destroy(shmfd);
903#endif
904 rangelock_destroy(&shmfd->shm_rl);
905 mtx_destroy(&shmfd->shm_mtx);
906 vm_object_deallocate(shmfd->shm_object);
907 free(shmfd, M_SHMFD);
908 }
909}
910
911/*
912 * Determine if the credentials have sufficient permissions for a

Callers 4

umtx_shm_free_regFunction · 0.85
shm_closeFunction · 0.85
shm_removeFunction · 0.85
sys_shm_renameFunction · 0.85

Calls 5

refcount_releaseFunction · 0.85
mac_posixshm_destroyFunction · 0.85
rangelock_destroyFunction · 0.85
vm_object_deallocateFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected