Lines Matching refs:sem
88 static inline atomic_uint* SEM_TO_ATOMIC_POINTER(sem_t* sem) { in SEM_TO_ATOMIC_POINTER() argument
89 static_assert(sizeof(atomic_uint) == sizeof(sem->count), in SEM_TO_ATOMIC_POINTER()
94 return reinterpret_cast<atomic_uint*>(&sem->count); in SEM_TO_ATOMIC_POINTER()
103 int sem_init(sem_t* sem, int pshared, unsigned int value) { in sem_init() argument
115 atomic_uint* sem_count_ptr = SEM_TO_ATOMIC_POINTER(sem); in sem_init()
214 int sem_wait(sem_t* sem) { in sem_wait() argument
215 atomic_uint* sem_count_ptr = SEM_TO_ATOMIC_POINTER(sem); in sem_wait()
233 static int __sem_timedwait(sem_t* sem, const timespec* abs_timeout, bool use_realtime_clock) { in __sem_timedwait() argument
234 atomic_uint* sem_count_ptr = SEM_TO_ATOMIC_POINTER(sem); in __sem_timedwait()
270 int sem_timedwait(sem_t* sem, const timespec* abs_timeout) { in sem_timedwait() argument
271 return __sem_timedwait(sem, abs_timeout, true); in sem_timedwait()
274 int sem_timedwait_monotonic_np(sem_t* sem, const timespec* abs_timeout) { in sem_timedwait_monotonic_np() argument
275 return __sem_timedwait(sem, abs_timeout, false); in sem_timedwait_monotonic_np()
278 int sem_clockwait(sem_t* sem, clockid_t clock, const timespec* abs_timeout) { in sem_clockwait() argument
281 return sem_timedwait_monotonic_np(sem, abs_timeout); in sem_clockwait()
283 return sem_timedwait(sem, abs_timeout); in sem_clockwait()
289 int sem_post(sem_t* sem) { in sem_post() argument
290 atomic_uint* sem_count_ptr = SEM_TO_ATOMIC_POINTER(sem); in sem_post()
306 int sem_trywait(sem_t* sem) { in sem_trywait() argument
307 atomic_uint* sem_count_ptr = SEM_TO_ATOMIC_POINTER(sem); in sem_trywait()
316 int sem_getvalue(sem_t* sem, int* sval) { in sem_getvalue() argument
317 atomic_uint* sem_count_ptr = SEM_TO_ATOMIC_POINTER(sem); in sem_getvalue()