Source/Backend/thread_pool/gtr_thread_pool.c
static void binary_semaphore_wait(binary_semaphore *binary_semaphore_p) {
    pthread_mutex_lock(&binary_semaphore_p->mutex);
    while (binary_semaphore_p->v != 1) {
        pthread_cond_wait(&binary_semaphore_p->cond, &binary_semaphore_p->mutex);
    }
    binary_semaphore_p->v = 0;
    pthread_mutex_unlock(&binary_semaphore_p->mutex);
}
/* Wait on semaphore until semaphore has value 0 */
Wait on semaphore until semaphore has value 0
Wait on semaphore until semaphore has value 0
static void binary_semaphore_wait(binary_semaphore *binary_semaphore_p) {
    pthread_mutex_lock(&binary_semaphore_p->mutex);
    while (binary_semaphore_p->v != 1) {
        pthread_cond_wait(&binary_semaphore_p->cond, &binary_semaphore_p->mutex);
    }
    binary_semaphore_p->v = 0;
    pthread_mutex_unlock(&binary_semaphore_p->mutex);
}
static void binary_semaphore_wait ( binary_semaphore * binary_semaphore_p ) { pthread_mutex_lock ( & binary_semaphore_p -> mutex ) ; while ( binary_semaphore_p -> v != 1 ) { pthread_cond_wait ( & binary_semaphore_p -> cond , & binary_semaphore_p -> mutex ) ; } binary_semaphore_p -> v = 0 ; pthread_mutex_unlock ( & binary_semaphore_p -> mutex ) ; }
Wait on semaphore until semaphore has value 0
Wait on semaphore until semaphore has value 0