pub unsafe extern "C" fn rtapi_sem_try(sem_id: c_int) -> c_int
Expand description

‘rtapi_sem_try()’ does a non-blocking attempt to lock a semaphore. Returns 0, -EINVAL, or -EBUSY. If the semaphore is unlocked, it returns 0. If the semaphore is locked it does not block, instead it returns -EBUSY, and the caller can decide how to deal with the situation. Call only from within a realtime task.