Lines Matching refs:LOCKRET
60 #ifndef LOCKRET
67 #define LOCKRET(func) do {\ macro
101 #define lock_basic_init(lock) LOCKRET(pthread_mutex_init(lock, NULL))
102 #define lock_basic_destroy(lock) LOCKRET(pthread_mutex_destroy(lock))
103 #define lock_basic_lock(lock) LOCKRET(pthread_mutex_lock(lock))
104 #define lock_basic_unlock(lock) LOCKRET(pthread_mutex_unlock(lock))
109 #define lock_rw_init(lock) LOCKRET(pthread_mutex_init(lock, NULL))
110 #define lock_rw_destroy(lock) LOCKRET(pthread_mutex_destroy(lock))
111 #define lock_rw_rdlock(lock) LOCKRET(pthread_mutex_lock(lock))
112 #define lock_rw_wrlock(lock) LOCKRET(pthread_mutex_lock(lock))
113 #define lock_rw_unlock(lock) LOCKRET(pthread_mutex_unlock(lock))
118 #define lock_rw_init(lock) LOCKRET(pthread_rwlock_init(lock, NULL))
119 #define lock_rw_destroy(lock) LOCKRET(pthread_rwlock_destroy(lock))
120 #define lock_rw_rdlock(lock) LOCKRET(pthread_rwlock_rdlock(lock))
121 #define lock_rw_wrlock(lock) LOCKRET(pthread_rwlock_wrlock(lock))
122 #define lock_rw_unlock(lock) LOCKRET(pthread_rwlock_unlock(lock))
129 #define lock_quick_init(lock) LOCKRET(pthread_mutex_init(lock, NULL))
130 #define lock_quick_destroy(lock) LOCKRET(pthread_mutex_destroy(lock))
131 #define lock_quick_lock(lock) LOCKRET(pthread_mutex_lock(lock))
132 #define lock_quick_unlock(lock) LOCKRET(pthread_mutex_unlock(lock))
144 #define lock_quick_init(lock) LOCKRET(pthread_spin_init(lock, PTHREAD_PROCESS_PRIVATE))
145 #define lock_quick_destroy(lock) LOCKRET(pthread_spin_destroy(lock))
146 #define lock_quick_lock(lock) LOCKRET(pthread_spin_lock(lock))
147 #define lock_quick_unlock(lock) LOCKRET(pthread_spin_unlock(lock))
161 LOCKRET(pthread_attr_init(&attr)); \
162 LOCKRET(pthread_attr_getstacksize(&attr, &stacksize)); \
164 LOCKRET(pthread_attr_setstacksize(&attr, stackrequired)); \
165 LOCKRET(pthread_create(thr, &attr, func, arg)); \
166 LOCKRET(pthread_attr_getstacksize(&attr, &stacksize)); \
168 } else {LOCKRET(pthread_create(thr, NULL, func, arg));} \
175 #define ub_thread_join(thread) LOCKRET(pthread_join(thread, NULL))
177 #define ub_thread_key_create(key, f) LOCKRET(pthread_key_create(key, f))
178 #define ub_thread_key_set(key, v) LOCKRET(pthread_setspecific(key, v))
189 #define lock_rw_init(lock) LOCKRET(rwlock_init(lock, USYNC_THREAD, NULL))
190 #define lock_rw_destroy(lock) LOCKRET(rwlock_destroy(lock))
191 #define lock_rw_rdlock(lock) LOCKRET(rw_rdlock(lock))
192 #define lock_rw_wrlock(lock) LOCKRET(rw_wrlock(lock))
193 #define lock_rw_unlock(lock) LOCKRET(rw_unlock(lock))
197 #define lock_basic_init(lock) LOCKRET(mutex_init(lock, USYNC_THREAD, NULL))
198 #define lock_basic_destroy(lock) LOCKRET(mutex_destroy(lock))
199 #define lock_basic_lock(lock) LOCKRET(mutex_lock(lock))
200 #define lock_basic_unlock(lock) LOCKRET(mutex_unlock(lock))
204 #define lock_quick_init(lock) LOCKRET(mutex_init(lock, USYNC_THREAD, NULL))
205 #define lock_quick_destroy(lock) LOCKRET(mutex_destroy(lock))
206 #define lock_quick_lock(lock) LOCKRET(mutex_lock(lock))
207 #define lock_quick_unlock(lock) LOCKRET(mutex_unlock(lock))
211 #define ub_thread_create(thr, func, arg) LOCKRET(thr_create(NULL, NULL, func, arg, NULL, thr))
213 #define ub_thread_join(thread) LOCKRET(thr_join(thread, NULL, NULL))
215 #define ub_thread_key_create(key, f) LOCKRET(thr_keycreate(key, f))
216 #define ub_thread_key_set(key, v) LOCKRET(thr_setspecific(key, v))