diff options
author | Rickard Green <[email protected]> | 2017-03-24 14:37:45 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-03-24 14:44:07 +0100 |
commit | 1bd867a8dbd88ffcee38b2179d42b563e5078820 (patch) | |
tree | 031414b02e1184e3b9278a9ee3f16d2c6e6f9a5a /erts/emulator/beam/beam_debug.c | |
parent | 748c2d938d309940b8365ed4f6af863b8129c5bf (diff) | |
download | otp-1bd867a8dbd88ffcee38b2179d42b563e5078820.tar.gz otp-1bd867a8dbd88ffcee38b2179d42b563e5078820.tar.bz2 otp-1bd867a8dbd88ffcee38b2179d42b563e5078820.zip |
Fix dirty scheduler type tests
Old test for dirty schedulers didn't work with Visual C++
Diffstat (limited to 'erts/emulator/beam/beam_debug.c')
-rw-r--r-- | erts/emulator/beam/beam_debug.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/erts/emulator/beam/beam_debug.c b/erts/emulator/beam/beam_debug.c index 8326d348af..b2663d3931 100644 --- a/erts/emulator/beam/beam_debug.c +++ b/erts/emulator/beam/beam_debug.c @@ -853,15 +853,23 @@ dirty_test(Process *c_p, Eterm type, Eterm arg1, Eterm arg2, UWord *I) goto badarg; esdp = erts_proc_sched_data(c_p); if (!esdp) - ERTS_BIF_PREP_RET(ret, am_error); - else if (!ERTS_SCHEDULER_IS_DIRTY(esdp)) + goto scheduler_type_error; + + switch (esdp->type) { + case ERTS_SCHED_NORMAL: ERTS_BIF_PREP_RET(ret, am_normal); - else if (ERTS_SCHEDULER_IS_DIRTY_CPU(esdp)) + break; + case ERTS_SCHED_DIRTY_CPU: ERTS_BIF_PREP_RET(ret, am_dirty_cpu); - else if (ERTS_SCHEDULER_IS_DIRTY_IO(esdp)) + break; + case ERTS_SCHED_DIRTY_IO: ERTS_BIF_PREP_RET(ret, am_dirty_io); - else + break; + default: + scheduler_type_error: ERTS_BIF_PREP_RET(ret, am_error); + break; + } } else if (am_error == arg1) { switch (arg2) { |