MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / wait

Method wait

src/tinythread/tinythread.h:422–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420 /// starts, an locked again as soon as the wait operation is finished.
421 template <class _mutexT>
422 inline void wait(_mutexT &aMutex)
423 {
424#if defined(_TTHREAD_WIN32_)
425 // Increment number of waiters
426 EnterCriticalSection(&mWaitersCountLock);
427 ++ mWaitersCount;
428 LeaveCriticalSection(&mWaitersCountLock);
429
430 // Release the mutex while waiting for the condition (will decrease
431 // the number of waiters when done)...
432 aMutex.unlock();
433 _wait();
434 aMutex.lock();
435#else
436 pthread_cond_wait(&mHandle, &aMutex.mHandle);
437#endif
438 }
439
440 /// Notify one thread that is waiting for the condition.
441 /// If at least one thread is blocked waiting for this condition variable,

Callers 10

release_openclMethod · 0.45
runMethod · 0.45
fill_trig_tableMethod · 0.45
fill_xz_tablesMethod · 0.45
fill_lutMethod · 0.45
release_openclMethod · 0.45
runMethod · 0.45
fill_trig_tableMethod · 0.45
fill_xz_tablesMethod · 0.45
fill_lutMethod · 0.45

Calls 2

unlockMethod · 0.80
lockMethod · 0.80

Tested by

no test coverage detected