Ожидать на именованном или безымянном семафоре без блокировки
#include <semaphore.h>int sem_trywait( sem_t *sem );
sem_t
object for the semaphore that you want to wait on.libc
The sem_trywait() function decrements the semaphore if the semaphore's value is greater than zero; otherwise, the function simply returns.
POSIX 1003.1 SEM
sem_destroy(), sem_init(), sem_post(), sem_wait()
Предыдущий раздел: Описание API системной библиотеки