hermit::syscalls

Function sys_sem_timedwait

Source
#[no_mangle]
pub unsafe extern "C" fn sys_sem_timedwait(
    sem: *mut sem_t,
    ts: *const timespec,
) -> i32
Expand description

Try to acquire a lock on a semaphore.

Blocks until semaphore is acquired or until specified time passed

Returns 0 on lock acquire, -EINVAL if sem is null, or -ETIME on timeout.