Home | History | Annotate | Download | only in source

Lines Matching full:mutex

110 		dng_pthread_mutex_impl *mutex;
112 ScopedLock(dng_pthread_mutex_impl *arg) : mutex(arg)
114 mutex->Lock();
116 ScopedLock(dng_pthread_mutex_impl &arg) : mutex(&arg)
118 mutex->Lock();
122 mutex->Unlock();
131 void ValidateMutex(dng_pthread_mutex_t *mutex)
133 if (*mutex != DNG_PTHREAD_MUTEX_INITIALIZER)
138 if (*mutex == DNG_PTHREAD_MUTEX_INITIALIZER)
139 dng_pthread_mutex_init(mutex, NULL);
473 int dng_pthread_mutex_init(dng_pthread_mutex_t *mutex, void * /* attrs */)
485 *mutex = result;
491 int dng_pthread_mutex_destroy(dng_pthread_mutex_t *mutex)
493 if (*mutex == DNG_PTHREAD_MUTEX_INITIALIZER)
495 *mutex = NULL;
499 delete *mutex;
500 *mutex = NULL;
553 int dng_pthread_mutex_lock(dng_pthread_mutex_t *mutex)
555 ValidateMutex(mutex);
556 (*mutex)->Lock();
562 int dng_pthread_mutex_unlock(dng_pthread_mutex_t *mutex)
564 ValidateMutex(mutex);
565 (*mutex)->Unlock();
571 static int cond_wait_internal(dng_pthread_cond_t *cond, dng_pthread_mutex_t *mutex, int timeout_milliseconds)
574 dng_pthread_mutex_impl &real_mutex = **mutex;
645 // reacquire the mutex
653 int dng_pthread_cond_wait(dng_pthread_cond_t *cond, dng_pthread_mutex_t *mutex)
657 return cond_wait_internal(cond, mutex, INFINITE);
662 int dng_pthread_cond_timedwait(dng_pthread_cond_t *cond, dng_pthread_mutex_t *mutex, struct dng_timespec *latest_time)
678 return cond_wait_internal(cond, mutex, wait_millisecs);
818 dng_pthread_mutex_impl mutex;
831 : mutex ()
881 ScopedLock lock (real_rwlock.mutex);
913 ScopedLock lock (real_rwlock.mutex);
953 ScopedLock lock (real_rwlock.mutex);
972 ScopedLock lock (real_rwlock.mutex);
995 ScopedLock lock (real_rwlock.mutex);
1039 ScopedLock lock (real_rwlock.mutex);