Lines Matching refs:err
40 int err;
42 err = pthread_rwlock_init (&lock->rwlock, NULL);
43 if (err != 0)
44 return err;
54 int err;
56 err = pthread_mutex_lock (&lock->guard);
57 if (err != 0)
58 return err;
61 err = glthread_rwlock_init_multithreaded (lock);
62 if (err != 0)
65 return err;
68 err = pthread_mutex_unlock (&lock->guard);
69 if (err != 0)
70 return err;
80 int err;
82 err = pthread_mutex_lock (&lock->guard);
83 if (err != 0)
84 return err;
87 err = glthread_rwlock_init_multithreaded (lock);
88 if (err != 0)
91 return err;
94 err = pthread_mutex_unlock (&lock->guard);
95 if (err != 0)
96 return err;
112 int err;
116 err = pthread_rwlock_destroy (&lock->rwlock);
117 if (err != 0)
118 return err;
130 int err;
132 err = pthread_mutex_init (&lock->lock, NULL);
133 if (err != 0)
134 return err;
135 err = pthread_cond_init (&lock->waiting_readers, NULL);
136 if (err != 0)
137 return err;
138 err = pthread_cond_init (&lock->waiting_writers, NULL);
139 if (err != 0)
140 return err;
149 int err;
151 err = pthread_mutex_lock (&lock->lock);
152 if (err != 0)
153 return err;
164 err = pthread_cond_wait (&lock->waiting_readers, &lock->lock);
165 if (err != 0)
168 return err;
178 int err;
180 err = pthread_mutex_lock (&lock->lock);
181 if (err != 0)
182 return err;
189 err = pthread_cond_wait (&lock->waiting_writers, &lock->lock);
190 if (err != 0)
194 return err;
205 int err;
207 err = pthread_mutex_lock (&lock->lock);
208 if (err != 0)
209 return err;
237 err = pthread_cond_signal (&lock->waiting_writers);
238 if (err != 0)
241 return err;
247 err = pthread_cond_broadcast (&lock->waiting_readers);
248 if (err != 0)
251 return err;
261 int err;
263 err = pthread_mutex_destroy (&lock->lock);
264 if (err != 0)
265 return err;
266 err = pthread_cond_destroy (&lock->waiting_readers);
267 if (err != 0)
268 return err;
269 err = pthread_cond_destroy (&lock->waiting_writers);
270 if (err != 0)
271 return err;
287 int err;
289 err = pthread_mutexattr_init (&attributes);
290 if (err != 0)
291 return err;
292 err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
293 if (err != 0)
296 return err;
298 err = pthread_mutex_init (lock, &attributes);
299 if (err != 0)
302 return err;
304 err = pthread_mutexattr_destroy (&attributes);
305 if (err != 0)
306 return err;
316 int err;
318 err = pthread_mutexattr_init (&attributes);
319 if (err != 0)
320 return err;
321 err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
322 if (err != 0)
325 return err;
327 err = pthread_mutex_init (&lock->recmutex, &attributes);
328 if (err != 0)
331 return err;
333 err = pthread_mutexattr_destroy (&attributes);
334 if (err != 0)
335 return err;
345 int err;
347 err = pthread_mutex_lock (&lock->guard);
348 if (err != 0)
349 return err;
352 err = glthread_recursive_lock_init_multithreaded (lock);
353 if (err != 0)
356 return err;
359 err = pthread_mutex_unlock (&lock->guard);
360 if (err != 0)
361 return err;
377 int err;
381 err = pthread_mutex_destroy (&lock->recmutex);
382 if (err != 0)
383 return err;
395 int err;
397 err = pthread_mutex_init (&lock->mutex, NULL);
398 if (err != 0)
399 return err;
411 int err;
413 err = pthread_mutex_lock (&lock->mutex);
414 if (err != 0)
415 return err;
534 int err;
536 err = mutex_init (&lock->mutex, USYNC_THREAD, NULL);
537 if (err != 0)
538 return err;
550 int err;
552 err = mutex_lock (&lock->mutex);
553 if (err != 0)
554 return err;
596 int err;
600 err = mutex_lock (&once_control->mutex);
601 if (err != 0)
602 return err;