nc 0.9.8

Access system calls directly
Documentation
1
2
3
4
5
6
/// Decrement (lock) a semaphore.
pub unsafe fn ksem_timedwait(id: semid_t, abstime: &timespec_t) -> Result<(), Errno> {
    let id = id as usize;
    let abstime_ptr = core::ptr::from_ref(abstime) as usize;
    unsafe { syscall2(SYS_KSEM_TIMEDWAIT, id, abstime_ptr).map(drop) }
}