Lines Matching refs:err

133   int err;  in uv_thread_create_ex()  local
172 err = pthread_create(tid, attr, f.out, arg); in uv_thread_create_ex()
177 return UV__ERR(err); in uv_thread_create_ex()
300 int err; in uv_mutex_init()
308 err = pthread_mutex_init(mutex, &attr); in uv_mutex_init()
313 return UV__ERR(err); in uv_mutex_init()
320 int err; in uv_mutex_init_recursive() local
328 err = pthread_mutex_init(mutex, &attr); in uv_mutex_init_recursive()
333 return UV__ERR(err); in uv_mutex_init_recursive()
350 int err; in uv_mutex_trylock() local
352 err = pthread_mutex_trylock(mutex); in uv_mutex_trylock()
353 if (err) { in uv_mutex_trylock()
354 if (err != EBUSY && err != EAGAIN) in uv_mutex_trylock()
387 int err; in uv_rwlock_tryrdlock() local
389 err = pthread_rwlock_tryrdlock(rwlock); in uv_rwlock_tryrdlock()
390 if (err) { in uv_rwlock_tryrdlock()
391 if (err != EBUSY && err != EAGAIN) in uv_rwlock_tryrdlock()
413 int err; in uv_rwlock_trywrlock() local
415 err = pthread_rwlock_trywrlock(rwlock); in uv_rwlock_trywrlock()
416 if (err) { in uv_rwlock_trywrlock()
417 if (err != EBUSY && err != EAGAIN) in uv_rwlock_trywrlock()
440 kern_return_t err; in uv_sem_init() local
442 err = semaphore_create(mach_task_self(), sem, SYNC_POLICY_FIFO, value); in uv_sem_init()
443 if (err == KERN_SUCCESS) in uv_sem_init()
445 if (err == KERN_INVALID_ARGUMENT) in uv_sem_init()
447 if (err == KERN_RESOURCE_SHORTAGE) in uv_sem_init()
481 kern_return_t err; in uv_sem_trywait() local
486 err = semaphore_timedwait(*sem, interval); in uv_sem_trywait()
487 if (err == KERN_SUCCESS) in uv_sem_trywait()
489 if (err == KERN_OPERATION_TIMED_OUT) in uv_sem_trywait()
540 int err; in uv__custom_sem_init() local
547 if ((err = uv_mutex_init(&sem->mutex)) != 0) { in uv__custom_sem_init()
549 return err; in uv__custom_sem_init()
552 if ((err = uv_cond_init(&sem->cond)) != 0) { in uv__custom_sem_init()
555 return err; in uv__custom_sem_init()
719 int err; in uv_cond_init() local
721 err = pthread_condattr_init(&attr); in uv_cond_init()
722 if (err) in uv_cond_init()
723 return UV__ERR(err); in uv_cond_init()
725 err = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); in uv_cond_init()
726 if (err) in uv_cond_init()
729 err = pthread_cond_init(cond, &attr); in uv_cond_init()
730 if (err) in uv_cond_init()
733 err = pthread_condattr_destroy(&attr); in uv_cond_init()
734 if (err) in uv_cond_init()
743 return UV__ERR(err); in uv_cond_init()
756 int err; in uv_cond_destroy() local
767 err = pthread_cond_timedwait_relative_np(cond, &mutex, &ts); in uv_cond_destroy()
768 if (err != 0 && err != ETIMEDOUT) in uv_cond_destroy()