diff options
author | Rickard Green <[email protected]> | 2012-11-06 00:41:09 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-11-06 00:41:09 +0100 |
commit | 0ba7c701ecc34fdec765438656c89dacb1916b6e (patch) | |
tree | 8f8d90f219c923a86cbf58c76683e071b811feb1 | |
parent | 952db27ba0a5b87a2a47f3a7034a9bf92e3651e5 (diff) | |
download | otp-0ba7c701ecc34fdec765438656c89dacb1916b6e.tar.gz otp-0ba7c701ecc34fdec765438656c89dacb1916b6e.tar.bz2 otp-0ba7c701ecc34fdec765438656c89dacb1916b6e.zip |
Fix bug in erts_port_task_schedule()
-rw-r--r-- | erts/emulator/beam/erl_port_task.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_port_task.c b/erts/emulator/beam/erl_port_task.c index 0f1a0d441a..aad2e42a50 100644 --- a/erts/emulator/beam/erl_port_task.c +++ b/erts/emulator/beam/erl_port_task.c @@ -573,13 +573,8 @@ erts_port_task_schedule(Eterm id, ERTS_PT_CHK_PRES_PORTQ(runq, pp); - if (!pp->sched.taskq) { - pp->sched.taskq = port_taskq_init(port_taskq_alloc(), pp); - enq_port = !pp->sched.exe_taskq; - } - + if (!pp->sched.taskq && !pp->sched.exe_taskq) { #ifdef ERTS_SMP - if (enq_port) { ErtsRunQueue *xrunq = erts_check_emigration_need(runq, ERTS_PORT_PRIO_LEVEL); if (xrunq) { /* Port emigrated ... */ @@ -587,12 +582,17 @@ erts_port_task_schedule(Eterm id, erts_smp_runq_unlock(runq); runq = xrunq; } - } + enq_port = !pp->sched.taskq && !pp->sched.exe_taskq; +#else + enq_port = 1; #endif + } ASSERT(!enq_port || !(runq->flags & ERTS_RUNQ_FLG_SUSPENDED)); - ASSERT(pp->sched.taskq); + if (!pp->sched.taskq) + pp->sched.taskq = port_taskq_init(port_taskq_alloc(), pp); + ASSERT(ptp); ptp->type = type; |