Lines Matching refs:err

83     nxt_err_t            err;  in nxt_thread_mutex_create()  local
86 err = pthread_mutexattr_init(&attr); in nxt_thread_mutex_create()
87 if (err != 0) { in nxt_thread_mutex_create()
88 nxt_thread_log_alert("pthread_mutexattr_init() failed %E", err); in nxt_thread_mutex_create()
92 err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); in nxt_thread_mutex_create()
93 if (err != 0) { in nxt_thread_mutex_create()
95 "(PTHREAD_MUTEX_ERRORCHECK) failed %E", err); in nxt_thread_mutex_create()
99 err = pthread_mutex_init(mtx, &attr); in nxt_thread_mutex_create()
100 if (err != 0) { in nxt_thread_mutex_create()
101 nxt_thread_log_alert("pthread_mutex_init() failed %E", err); in nxt_thread_mutex_create()
105 err = pthread_mutexattr_destroy(&attr); in nxt_thread_mutex_create()
106 if (err != 0) { in nxt_thread_mutex_create()
107 nxt_thread_log_alert("pthread_mutexattr_destroy() failed %E", err); in nxt_thread_mutex_create()
119 nxt_err_t err; in nxt_thread_mutex_destroy() local
121 err = pthread_mutex_destroy(mtx); in nxt_thread_mutex_destroy()
122 if (nxt_slow_path(err != 0)) { in nxt_thread_mutex_destroy()
123 nxt_thread_log_alert("pthread_mutex_destroy() failed %E", err); in nxt_thread_mutex_destroy()
133 nxt_err_t err; in nxt_thread_mutex_lock() local
137 err = pthread_mutex_lock(mtx); in nxt_thread_mutex_lock()
138 if (nxt_fast_path(err == 0)) { in nxt_thread_mutex_lock()
142 nxt_thread_log_alert("pthread_mutex_lock() failed %E", err); in nxt_thread_mutex_lock()
151 nxt_err_t err; in nxt_thread_mutex_trylock() local
157 err = pthread_mutex_trylock(mtx); in nxt_thread_mutex_trylock()
158 if (nxt_fast_path(err == 0)) { in nxt_thread_mutex_trylock()
162 if (err == NXT_EBUSY) { in nxt_thread_mutex_trylock()
166 nxt_thread_log_alert("pthread_mutex_trylock() failed %E", err); in nxt_thread_mutex_trylock()
176 nxt_err_t err; in nxt_thread_mutex_unlock() local
179 err = pthread_mutex_unlock(mtx); in nxt_thread_mutex_unlock()
184 if (nxt_fast_path(err == 0)) { in nxt_thread_mutex_unlock()
189 nxt_log_alert(thr->log, "pthread_mutex_unlock() failed %E", err); in nxt_thread_mutex_unlock()