aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-08-19 16:47:17 +0200
committerRickard Green <[email protected]>2010-08-19 16:47:17 +0200
commit6af9c31d7f25a653342cd40affe1bf764748c210 (patch)
treeb67f1d0cb53881f1bf1bb8f14b6a1953e6f38b28 /erts
parent2ed3221969fa12b238f493a0cda95d7b0e443b92 (diff)
parenteeb34ae71e6e976d76de07cf8dc5dae84fd9a5dd (diff)
downloadotp-6af9c31d7f25a653342cd40affe1bf764748c210.tar.gz
otp-6af9c31d7f25a653342cd40affe1bf764748c210.tar.bz2
otp-6af9c31d7f25a653342cd40affe1bf764748c210.zip
Merge branch 'rickard/fix-faulty-assert/OTP-8759' into dev
* rickard/fix-faulty-assert/OTP-8759: Fix faulty no_empty_run_queues assertion
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_process.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index a644520442..d52e1f493c 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -821,7 +821,11 @@ empty_runq(ErtsRunQueue *rq)
if (oifls & ERTS_RUNQ_IFLG_NONEMPTY) {
#ifdef DEBUG
long empty = erts_smp_atomic_read(&no_empty_run_queues);
- ASSERT(0 <= empty && empty < erts_no_run_queues);
+ /*
+ * For a short period of time no_empty_run_queues may have
+ * been increased twice for a specific run queue.
+ */
+ ASSERT(0 <= empty && empty < 2*erts_no_run_queues);
#endif
erts_smp_atomic_inc(&no_empty_run_queues);
}
@@ -834,7 +838,11 @@ non_empty_runq(ErtsRunQueue *rq)
if (!(oifls & ERTS_RUNQ_IFLG_NONEMPTY)) {
#ifdef DEBUG
long empty = erts_smp_atomic_read(&no_empty_run_queues);
- ASSERT(0 < empty && empty <= erts_no_run_queues);
+ /*
+ * For a short period of time no_empty_run_queues may have
+ * been increased twice for a specific run queue.
+ */
+ ASSERT(0 < empty && empty <= 2*erts_no_run_queues);
#endif
erts_smp_atomic_dec(&no_empty_run_queues);
}