39 int rc = pthread_cond_init(&
fCond,
nullptr);
42 SysError(
"TPosixCondition",
"pthread_cond_init error");
50 int rc = pthread_cond_destroy(&
fCond);
53 SysError(
"~TPosixCondition",
"pthread_cond_destroy error");
64 return pthread_cond_wait(&
fCond, &(
fMutex->fMutex));
77 int rc = pthread_cond_timedwait(&
fCond, &(
fMutex->fMutex), &rqts);
91 return pthread_cond_signal(&
fCond);
100 return pthread_cond_broadcast(&
fCond);
int Int_t
Signed integer 4 bytes (int).
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
virtual void SysError(const char *method, const char *msgfmt,...) const
Issue system error message.
virtual ~TPosixCondition()
TCondition dtor.
Int_t Wait() override
Wait for the condition variable to be signalled.
Int_t Signal() override
If one or more threads have called Wait(), Signal() wakes up at least one of them,...
TPosixCondition(TMutexImp *m)
Create Condition variable.
Int_t TimedWait(ULong_t secs, ULong_t nanoSecs=0) override
TimedWait() is given an absolute time to wait until.
Int_t Broadcast() override
Broadcast is like signal but wakes all threads which have called Wait().