MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / bsem_wait

Function bsem_wait

src/util/thpool/thpool.c:586–593  ·  view source on GitHub ↗

Wait on semaphore until semaphore has value 0 */

Source from the content-addressed store, hash-verified

584
585/* Wait on semaphore until semaphore has value 0 */
586static void bsem_wait(bsem *bsem_p) {
587 pthread_mutex_lock(&bsem_p->mutex);
588 while(bsem_p->v != 1) {
589 pthread_cond_wait(&bsem_p->cond, &bsem_p->mutex);
590 }
591 bsem_p->v = 0;
592 pthread_mutex_unlock(&bsem_p->mutex);
593}

Callers 1

thread_doFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected