summaryrefslogtreecommitdiffstats
path: root/libtiutils
diff options
context:
space:
mode:
Diffstat (limited to 'libtiutils')
-rw-r--r--libtiutils/Semaphore.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libtiutils/Semaphore.cpp b/libtiutils/Semaphore.cpp
index 1f46dca..41fa99c 100644
--- a/libtiutils/Semaphore.cpp
+++ b/libtiutils/Semaphore.cpp
@@ -217,6 +217,12 @@ status_t Semaphore::WaitTimeout(int timeoutMicroSecs)
ret = sem_timedwait(mSemaphore, &timeSpec);
}
+ if ( NO_ERROR != ret )
+ {
+ Signal();
+ Create(0);
+ }
+
return ret;
}