hermit::syscalls

Function sys_sem_init

Source
#[no_mangle]
pub unsafe extern "C" fn sys_sem_init(
    sem: *mut sem_t,
    pshared: i32,
    value: u32,
) -> i32
Expand description

Create a new, unnamed semaphore.

This function can be used to get the raw memory location of a semaphore.

Stores the raw memory location of the new semaphore in parameter sem. Returns 0 on success, -EINVAL if sem is null.