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

Function shm_dotruncate

freebsd/kern/uipc_shm.c:836–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

834}
835
836int
837shm_dotruncate(struct shmfd *shmfd, off_t length)
838{
839 void *rl_cookie;
840 int error;
841
842 rl_cookie = rangelock_wlock(&shmfd->shm_rl, 0, OFF_MAX,
843 &shmfd->shm_mtx);
844 error = shm_dotruncate_cookie(shmfd, length, rl_cookie);
845 rangelock_unlock(&shmfd->shm_rl, rl_cookie, &shmfd->shm_mtx);
846 return (error);
847}
848
849/*
850 * shmfd object management including creation and reference counting

Callers 2

umtx_shm_create_regFunction · 0.85
shm_truncateFunction · 0.85

Calls 3

rangelock_wlockFunction · 0.85
shm_dotruncate_cookieFunction · 0.85
rangelock_unlockFunction · 0.85

Tested by

no test coverage detected