BIND 10 trac2198_2, updated. e6ac5ef47d9885e20e247697c8c3d1fe55fd2500 [2198] Check pthread_mutex_trylock()'s return value
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Oct 15 04:09:36 UTC 2012
The branch, trac2198_2 has been updated
via e6ac5ef47d9885e20e247697c8c3d1fe55fd2500 (commit)
from 48e80a5c7505df708999ef817911d1eb505deaad (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e6ac5ef47d9885e20e247697c8c3d1fe55fd2500
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Oct 15 09:38:39 2012 +0530
[2198] Check pthread_mutex_trylock()'s return value
-----------------------------------------------------------------------
Summary of changes:
src/lib/util/threads/lock.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/util/threads/lock.cc b/src/lib/util/threads/lock.cc
index ab6bd79..acc73d6 100644
--- a/src/lib/util/threads/lock.cc
+++ b/src/lib/util/threads/lock.cc
@@ -123,8 +123,10 @@ bool
Mutex::tryLock() {
assert(impl_ != NULL);
const int result = pthread_mutex_trylock(&impl_->mutex);
- if (result != 0) {
+ if (result == EBUSY) {
return (false);
+ } else if (result != 0) {
+ isc_throw(isc::InvalidOperation, std::strerror(result));
}
++impl_->locked_count; // Only in debug mode
return (true);
More information about the bind10-changes
mailing list