Searched defs:sem (Results 1 - 2 of 2) sorted by relevance

/bionic/tests/
H A Dsemaphore_test.cpp67 static void SemWaitThreadTestFn(sem_t& sem) { argument
68 ASSERT_EQ(0, sem_wait(&sem));
169 sem_t* sem = reinterpret_cast<sem_t*>(arg); local
173 int result = sem_wait(sem);
/bionic/libc/bionic/
H A Dsemaphore.cpp72 // Convert a value into the corresponding sem->count bit pattern.
75 // Convert a sem->count bit pattern into the corresponding signed value.
80 // The value +1 as a sem->count bit-pattern.
83 // The value -1 as a sem->count bit-pattern.
89 static inline atomic_uint* SEM_TO_ATOMIC_POINTER(sem_t* sem) { argument
90 static_assert(sizeof(atomic_uint) == sizeof(sem->count),
91 "sem->count should actually be atomic_uint in implementation.");
93 // We prefer casting to atomic_uint instead of declaring sem->count to be atomic_uint directly.
95 return reinterpret_cast<atomic_uint*>(&sem->count);
104 int sem_init(sem_t* sem, in argument
215 sem_wait(sem_t* sem) argument
234 sem_timedwait(sem_t* sem, const timespec* abs_timeout) argument
270 sem_post(sem_t* sem) argument
287 sem_trywait(sem_t* sem) argument
297 sem_getvalue(sem_t* sem, int* sval) argument
[all...]

Completed in 1353 milliseconds