aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_debug.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-04 18:10:26 +0100
committerRickard Green <[email protected]>2017-01-17 12:23:19 +0100
commitf9459092940943876dff040ee997515b96fd5d50 (patch)
tree075fc1e01f6cc1cd1e398b9f52a0ee0f617065e4 /erts/emulator/beam/beam_debug.c
parentfd1fb9070333fe5b91f4528841a4b0fe71bbf096 (diff)
downloadotp-f9459092940943876dff040ee997515b96fd5d50.tar.gz
otp-f9459092940943876dff040ee997515b96fd5d50.tar.bz2
otp-f9459092940943876dff040ee997515b96fd5d50.zip
Scheduler wall time support for dirty schedulers
Diffstat (limited to 'erts/emulator/beam/beam_debug.c')
-rw-r--r--erts/emulator/beam/beam_debug.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c
index 3ffbb0364c..8326d348af 100644
--- a/erts/emulator/beam/beam_debug.c
+++ b/erts/emulator/beam/beam_debug.c
@@ -994,13 +994,20 @@ dirty_test(Process *c_p, Eterm type, Eterm arg1, Eterm arg2, UWord *I)
Eterm *hp, *hp2;
Uint sz;
int i;
+ ErtsSchedulerData *esdp = erts_proc_sched_data(c_p);
+ int dirty_io = esdp->type == ERTS_SCHED_DIRTY_IO;
+
if (ERTS_PROC_IS_EXITING(real_c_p))
goto badarg;
dirty_send_message(c_p, arg2, am_alive);
- /* Wait until dead */
- while (!ERTS_PROC_IS_EXITING(real_c_p))
- erts_thr_yield();
+ /* Wait until dead */
+ while (!ERTS_PROC_IS_EXITING(real_c_p)) {
+ if (dirty_io)
+ ms_wait(c_p, make_small(100), 0);
+ else
+ erts_thr_yield();
+ }
ms_wait(c_p, make_small(1000), 0);