aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <rickard@erlang.org>2010-12-06 10:25:36 +0100
committerRickard Green <rickard@erlang.org>2010-12-06 10:25:36 +0100
commit1108ed8660f376b661ea04b86a83c20339106353 (patch)
tree96c4f890eca6cc0bdc85c52029c14b9456db7ad9
parent678d00c2cbd6a8cb6d6cacd7d142bd14f40a08dc (diff)
downloadotp-1108ed8660f376b661ea04b86a83c20339106353.tar.gz
otp-1108ed8660f376b661ea04b86a83c20339106353.tar.bz2
otp-1108ed8660f376b661ea04b86a83c20339106353.zip
Fix erroneous assertion
-rw-r--r--erts/lib_src/common/ethr_mutex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/lib_src/common/ethr_mutex.c b/erts/lib_src/common/ethr_mutex.c
index 95fedc0ba2..a2fbf3a454 100644
--- a/erts/lib_src/common/ethr_mutex.c
+++ b/erts/lib_src/common/ethr_mutex.c
@@ -2101,7 +2101,10 @@ rwmutex_unlock_wake(ethr_rwmutex *rwmtx, int have_w, long initial,
if (!have_w) {
act = ethr_atomic_read_bor(&rwmtx->mtxb.flgs,
ETHR_RWMTX_W_FLG__);
- ETHR_ASSERT((act & ~ETHR_RWMTX_WAIT_FLGS__) == 0);
+ ETHR_ASSERT((act & ~(ETHR_RWMTX_WAIT_FLGS__
+ | (rwmtx->type == ETHR_RWMUTEX_TYPE_NORMAL
+ ? 0
+ : ETHR_RWMTX_R_PEND_UNLCK_MASK__))) == 0);
ETHR_ASSERT(act & ETHR_RWMTX_W_WAIT_FLG__);
act |= ETHR_RWMTX_W_FLG__;
}