Browse Source

Revert "[master] Check for EDEADLK too when using Mutex::tryLock()"

This reverts commit 42c638e07a45b69d902a51b35838ae21ac19d116.
Mukund Sivaraman 12 years ago
parent
commit
c91151db16
1 changed files with 1 additions and 7 deletions
  1. 1 7
      src/lib/util/threads/lock.cc

+ 1 - 7
src/lib/util/threads/lock.cc

@@ -123,13 +123,7 @@ bool
 Mutex::tryLock() {
     assert(impl_ != NULL);
     const int result = pthread_mutex_trylock(&impl_->mutex);
-
-    // In the case of pthread_mutex_trylock(), if it is called on a
-    // locked mutex from the same thread, some platforms (such as fedora
-    // and debian) return EBUSY whereas others (such as centos 5) return
-    // EDEADLK. We return false and don't pass the lock attempt in both
-    // cases.
-    if (result == EBUSY || result == EDEADLK) {
+    if (result == EBUSY) {
         return (false);
     } else if (result != 0) {
         isc_throw(isc::InvalidOperation, std::strerror(result));