summaryrefslogtreecommitdiff
path: root/src/os_posix
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2011-06-03 17:58:04 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2011-06-03 17:58:04 +1000
commit40d9df670d526c9db24b5300632f2b8acbfa4c0a (patch)
treeee71a1827f30107af0a6390d8699f02806d1ec41 /src/os_posix
parent170ea022945e0336e254030dd94e57387c8cd7c8 (diff)
downloadmongo-40d9df670d526c9db24b5300632f2b8acbfa4c0a.tar.gz
Assert that a mutex is locked before unlocking it: this would have saved me a couple of hours today...
Diffstat (limited to 'src/os_posix')
-rw-r--r--src/os_posix/os_mtx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/os_posix/os_mtx.c b/src/os_posix/os_mtx.c
index 0a0f4fcba23..59e31685dc4 100644
--- a/src/os_posix/os_mtx.c
+++ b/src/os_posix/os_mtx.c
@@ -119,6 +119,7 @@ __wt_unlock(WT_SESSION_IMPL *session, WT_MTX *mtx)
ret = 0;
WT_ERR(pthread_mutex_lock(&mtx->mtx));
+ WT_ASSERT(session, mtx->locked);
mtx->locked = 0;
WT_ERR(pthread_cond_signal(&mtx->cond));