diff options
author | John Högberg <[email protected]> | 2017-06-27 15:52:56 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2017-06-27 15:52:56 +0200 |
commit | 0dced656e6871e03a153bb99af10d8710ffca7d9 (patch) | |
tree | 6fee44d1d76d0b96a4c6f4e7bd104b69b60b316f /erts/emulator/beam/io.c | |
parent | 798924ffd5efff77ba94ea7f54c2e69548d9d07e (diff) | |
parent | 8d9cde83b628533ae7a5fe85a5dd9c6c00c084e3 (diff) | |
download | otp-0dced656e6871e03a153bb99af10d8710ffca7d9.tar.gz otp-0dced656e6871e03a153bb99af10d8710ffca7d9.tar.bz2 otp-0dced656e6871e03a153bb99af10d8710ffca7d9.zip |
Merge branch 'maint-19' into maint
* maint-19:
Updated OTP version
Update release notes
Update version numbers
Fix statistics(wall_clock) and statistics(runtime) implementation
fixup! erts: Cleanup dropped port tasks correctly
erts: Add tests to detect port close race
Add a testcase for OTP-13939/ERL-193
erts: Cleanup dropped port tasks correctly
Mark socket disconnected on tcp_send_or_shutdown_error
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 62 |
1 files changed, 20 insertions, 42 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index d25e53ada0..75545df80a 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -1968,7 +1968,6 @@ int erts_port_output_async(Port *prt, Eterm from, Eterm list) { - ErtsPortOpResult res; ErtsProc2PortSigData *sigdp; erts_driver_t *drv = prt->drv_ptr; size_t size; @@ -2102,26 +2101,18 @@ erts_port_output_async(Port *prt, Eterm from, Eterm list) sigdp->u.output.size = size; port_sig_callback = port_sig_output; } - sigdp->flags = 0; ns_pthp = NULL; task_flags = 0; - res = erts_schedule_proc2port_signal(NULL, - prt, - ERTS_INVALID_PID, - NULL, - sigdp, - task_flags, - ns_pthp, - port_sig_callback); + erts_schedule_proc2port_signal(NULL, + prt, + ERTS_INVALID_PID, + NULL, + sigdp, + task_flags, + ns_pthp, + port_sig_callback); - if (res != ERTS_PORT_OP_SCHEDULED) { - if (drv->outputv) - cleanup_scheduled_outputv(evp, cbin); - else - cleanup_scheduled_output(buf); - return 1; - } return 1; bad_value: @@ -2554,10 +2545,6 @@ erts_port_output(Process *c_p, port_sig_callback); if (res != ERTS_PORT_OP_SCHEDULED) { - if (drv->outputv) - cleanup_scheduled_outputv(evp, cbin); - else - cleanup_scheduled_output(buf); return res; } @@ -2736,21 +2723,14 @@ erts_port_exit(Process *c_p, &bp->off_heap); } - res = erts_schedule_proc2port_signal(c_p, - prt, - c_p ? c_p->common.id : from, - refp, - sigdp, - 0, - NULL, - port_sig_exit); - - if (res == ERTS_PORT_OP_DROPPED) { - if (bp) - free_message_buffer(bp); - } - - return res; + return erts_schedule_proc2port_signal(c_p, + prt, + c_p ? c_p->common.id : from, + refp, + sigdp, + 0, + NULL, + port_sig_exit); } static ErtsPortOpResult @@ -4930,10 +4910,9 @@ erts_port_control(Process* c_p, 0, NULL, port_sig_control); - if (res != ERTS_PORT_OP_SCHEDULED) { - cleanup_scheduled_control(binp, bufp); + if (res != ERTS_PORT_OP_SCHEDULED) return ERTS_PORT_OP_BADARG; - } + return res; } @@ -5223,10 +5202,9 @@ erts_port_call(Process* c_p, 0, NULL, port_sig_call); - if (res != ERTS_PORT_OP_SCHEDULED) { - cleanup_scheduled_call(bufp); + if (res != ERTS_PORT_OP_SCHEDULED) return ERTS_PORT_OP_BADARG; - } + return res; } |