pub fn unmap_shm(shm: ShmHandle) -> StatusExpand description
Unmap a previously mapped shared memory
§Usage
Unmap a shared memory that has been previously mapped by the caller, once no more
required. The shared memory is identified by its handle (see get_shm_handle).
The memory mapping system is responsible for verifying that the shared memory is already mapped in the caller’s memory layout. There is no ownership check as these checks are made at map time. Unmapping is synchronous.
An unmapped shared memory can always be remapped later while credentials are
still valid for the caller (see map_shm and shm_set_credential).
This syscall returns Status::Ok if the shared memory is successfully unmapped by the kernel. If the shared memory is not already mapped by the caller, the syscall returns Status::Invalid.
§Example
ⓘ
match unmap_shm(devh) {
Status::Ok => (),
any_err => return(any_err),
}