aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-08-11 16:04:24 +0200
committerRickard Green <[email protected]>2010-08-11 16:23:06 +0200
commiteeb34ae71e6e976d76de07cf8dc5dae84fd9a5dd (patch)
treea7e88f25d07048a731b95b0ed6bd4f3d06c0fa64 /erts/emulator/beam/erl_process.c
parentbdfd2aaa1d402b3dd393a7820432f8f76e248ee1 (diff)
downloadotp-eeb34ae71e6e976d76de07cf8dc5dae84fd9a5dd.tar.gz
otp-eeb34ae71e6e976d76de07cf8dc5dae84fd9a5dd.tar.bz2
otp-eeb34ae71e6e976d76de07cf8dc5dae84fd9a5dd.zip
Fix faulty no_empty_run_queues assertion
For a short period of time no_empty_run_queues may have been increased twice for a specific run queue. Two assertions did not take this into account.
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-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);
}