about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-06-20 01:22:19 +0000
committerEric Wong <normalperson@yhbt.net>2013-06-20 01:22:19 +0000
commit91cb86eb03d828bda8a4ac9cd0c3edbac73418af (patch)
treea5093a81fd873d0a92f3683fd02abd563ff28013
parenta2bd4ba9625675600152b86d41c1ae9a0ca6b9b6 (diff)
downloadcmogstored-91cb86eb03d828bda8a4ac9cd0c3edbac73418af.tar.gz
pthread_cond_timedwait was the function which was buggy under
LinuxThreads, and we never supported LinuxThreads anyways...
-rw-r--r--iosem.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/iosem.h b/iosem.h
index 186e01c..eaaf9b4 100644
--- a/iosem.h
+++ b/iosem.h
@@ -24,14 +24,7 @@ retry:
         if (sem->cur > 0) { /* uncontended case is simple */
                 sem->cur--;
         } else {
-                int rc = pthread_cond_wait(&sem->cond, &sem->mtx);
-
-                /*
-                 * POSIX forbids EINTR, but some platforms (old GNU/Linux)
-                 * are buggy
-                 */
-                assert((rc == 0 || rc == EINTR)
-                       && "BUG in pthread_cond_wait usage");
+                CHECK(int, 0, pthread_cond_wait(&sem->cond, &sem->mtx));
                 goto retry;
         }
         CHECK(int, 0, pthread_mutex_unlock(&sem->mtx));