diff options
author | Rickard Green <[email protected]> | 2012-11-12 13:53:32 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-11-12 13:53:32 +0100 |
commit | 135fdb3b1804089c5170c5995a9dae653a28f927 (patch) | |
tree | dc32532e22f99389f1083bba74dfa883ff960855 /erts/emulator/beam | |
parent | befc4a73879df6a4a05017e022cf6199c165f403 (diff) | |
parent | 0ba7c701ecc34fdec765438656c89dacb1916b6e (diff) | |
download | otp-135fdb3b1804089c5170c5995a9dae653a28f927.tar.gz otp-135fdb3b1804089c5170c5995a9dae653a28f927.tar.bz2 otp-135fdb3b1804089c5170c5995a9dae653a28f927.zip |
Merge branch 'rickard/port-sched-bug/OTP-10556' into maint
* rickard/port-sched-bug/OTP-10556:
Fix bug in erts_port_task_schedule()
Diffstat (limited to 'erts/emulator/beam')
-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 31c92724cf..3dc7c14faf 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; |