Source/Backend/thread_pool/gtr_thread_pool.c
static void binary_semaphore_init(binary_semaphore *binary_semaphore_p, int value) {
    if (value < 0 || value > 1) {
        err("binary_semaphore_init(): Binary semaphore can take only values 1 or 0");
        exit(1);
    }
    pthread_mutex_init(&(binary_semaphore_p->mutex), NULL);
    pthread_cond_init(&(binary_semaphore_p->cond), NULL);
    binary_semaphore_p->v = value;
}
/* Init semaphore to 1 or 0 */
Init semaphore to 1 or 0
Init semaphore to 1 or 0
static void binary_semaphore_init(binary_semaphore *binary_semaphore_p, int value) {
    if (value < 0 || value > 1) {
        err("binary_semaphore_init(): Binary semaphore can take only values 1 or 0");
        exit(1);
    }
    pthread_mutex_init(&(binary_semaphore_p->mutex), NULL);
    pthread_cond_init(&(binary_semaphore_p->cond), NULL);
    binary_semaphore_p->v = value;
}
static void binary_semaphore_init ( binary_semaphore * binary_semaphore_p , int value ) { if ( value < 0 || value > 1 ) { err ( " " ) ; exit ( 1 ) ; } pthread_mutex_init ( & ( binary_semaphore_p -> mutex ) , NULL ) ; pthread_cond_init ( & ( binary_semaphore_p -> cond ) , NULL ) ; binary_semaphore_p -> v = value ; }
Init semaphore to 1 or 0
Init semaphore to 1 or 0