diff options
author | Akwasi Boateng <akwasi.boateng@ti.com> | 2011-09-08 20:35:42 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-09-09 13:31:08 -0700 |
commit | 9b981b1785b6758b2dc8b147587188e5cf0d893d (patch) | |
tree | 684a015d6d074eec3121a35a7f6e7db4f488628b /libtiutils | |
parent | 9a30da5a109bd88aaddfe0ff850189c8a078be89 (diff) | |
download | hardware_ti_omap4xxx-9b981b1785b6758b2dc8b147587188e5cf0d893d.zip hardware_ti_omap4xxx-9b981b1785b6758b2dc8b147587188e5cf0d893d.tar.gz hardware_ti_omap4xxx-9b981b1785b6758b2dc8b147587188e5cf0d893d.tar.bz2 |
Destroy and recreate semaphore in case of timeout
Destroy and recreate semaphor during timeout
and remove event from event queue.
Change-Id: Id9428ff58a55f90a6807776327bfba1961d9089d
Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
Diffstat (limited to 'libtiutils')
-rw-r--r-- | libtiutils/Semaphore.cpp | 6 |
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;
}
|