aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CommonLibs/Threads.cpp4
-rw-r--r--CommonLibs/Threads.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/CommonLibs/Threads.cpp b/CommonLibs/Threads.cpp
index de6520b..dce7eda 100644
--- a/CommonLibs/Threads.cpp
+++ b/CommonLibs/Threads.cpp
@@ -95,11 +95,11 @@ Mutex::~Mutex()
/** Block for the signal up to the cancellation timeout. */
-void Signal::wait(Mutex& wMutex, unsigned timeout) const
+int Signal::wait(Mutex& wMutex, unsigned timeout) const
{
Timeval then(timeout);
struct timespec waitTime = then.timespec();
- pthread_cond_timedwait(&mSignal,&wMutex.mMutex,&waitTime);
+ return pthread_cond_timedwait(&mSignal,&wMutex.mMutex,&waitTime);
}
diff --git a/CommonLibs/Threads.h b/CommonLibs/Threads.h
index a38a73a..0d21e41 100644
--- a/CommonLibs/Threads.h
+++ b/CommonLibs/Threads.h
@@ -121,14 +121,14 @@ class Signal {
Block for the signal up to the cancellation timeout.
Under Linux, spurious returns are possible.
*/
- void wait(Mutex& wMutex, unsigned timeout) const;
+ int wait(Mutex& wMutex, unsigned timeout) const;
/**
Block for the signal.
Under Linux, spurious returns are possible.
*/
- void wait(Mutex& wMutex) const
- { pthread_cond_wait(&mSignal,&wMutex.mMutex); }
+ int wait(Mutex& wMutex) const
+ { return pthread_cond_wait(&mSignal,&wMutex.mMutex); }
void signal() { pthread_cond_signal(&mSignal); }