Lines Matching refs:value
439 int uv_sem_init(uv_sem_t* sem, unsigned int value) { in uv_sem_init() argument
442 err = semaphore_create(mach_task_self(), sem, SYNC_POLICY_FIFO, value); in uv_sem_init()
531 unsigned int value; member
539 static int uv__custom_sem_init(uv_sem_t* sem_, unsigned int value) { in uv__custom_sem_init() argument
558 sem->value = value; in uv__custom_sem_init()
579 sem->value++; in uv__custom_sem_post()
580 if (sem->value == 1) in uv__custom_sem_post()
591 while (sem->value == 0) in uv__custom_sem_wait()
593 sem->value--; in uv__custom_sem_wait()
605 if (sem->value == 0) { in uv__custom_sem_trywait()
610 sem->value--; in uv__custom_sem_trywait()
616 static int uv__sem_init(uv_sem_t* sem, unsigned int value) { in uv__sem_init() argument
617 if (sem_init(sem, 0, value)) in uv__sem_init()
663 int uv_sem_init(uv_sem_t* sem, unsigned int value) { in uv_sem_init() argument
669 return uv__custom_sem_init(sem, value); in uv_sem_init()
671 return uv__sem_init(sem, value); in uv_sem_init()
874 void uv_key_set(uv_key_t* key, void* value) { in uv_key_set() argument
875 if (pthread_setspecific(*key, value)) in uv_key_set()