diff options
author | Rickard Green <[email protected]> | 2010-08-11 18:49:05 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-11-18 13:42:17 +0100 |
commit | e642533d9d772f8353e02aaa08615e6b0fd53ebf (patch) | |
tree | 7fbf433609622f9f71c0b156b3a50dddbb5e14bd | |
parent | bdfd2aaa1d402b3dd393a7820432f8f76e248ee1 (diff) | |
download | otp-e642533d9d772f8353e02aaa08615e6b0fd53ebf.tar.gz otp-e642533d9d772f8353e02aaa08615e6b0fd53ebf.tar.bz2 otp-e642533d9d772f8353e02aaa08615e6b0fd53ebf.zip |
Verify that no outstanding I/O exist when checking for I/O in debug build
-rw-r--r-- | erts/emulator/beam/erl_process.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index a644520442..0dfcfa2c63 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -1045,6 +1045,8 @@ scheduler_wait(long *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq) sys_poll_aux_work: + ASSERT(!erts_port_task_have_outstanding_io_tasks()); + erl_sys_schedule(1); /* Might give us something to do */ dt = do_time_read_and_reset(); @@ -1140,6 +1142,8 @@ scheduler_wait(long *fcalls, ErtsSchedulerData *esdp, ErtsRunQueue *rq) erts_smp_runq_unlock(rq); + ASSERT(!erts_port_task_have_outstanding_io_tasks()); + erl_sys_schedule(0); dt = do_time_read_and_reset(); @@ -7092,7 +7096,9 @@ Process *schedule(Process *p, int calls) erts_smp_atomic_set(&function_calls, 0); fcalls = 0; + ASSERT(!erts_port_task_have_outstanding_io_tasks()); + #ifdef ERTS_SMP /* erts_sys_schedule_interrupt(0); */ #endif |