aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-02-09 19:51:15 +0100
committerSverker Eriksson <[email protected]>2017-02-09 19:51:15 +0100
commite93c9afd2415e3d500fe631d047c75fe47487baf (patch)
tree6519f90f0e42f7923b3fdef64f1d25839d49b622 /erts/emulator/sys/common
parenta8d5234c77634df9522727ff200cef4fcab49c22 (diff)
downloadotp-e93c9afd2415e3d500fe631d047c75fe47487baf.tar.gz
otp-e93c9afd2415e3d500fe631d047c75fe47487baf.tar.bz2
otp-e93c9afd2415e3d500fe631d047c75fe47487baf.zip
erts: Try fix enif_select for windows
by simply disable "delayed deselect".
Diffstat (limited to 'erts/emulator/sys/common')
-rw-r--r--erts/emulator/sys/common/erl_check_io.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/erts/emulator/sys/common/erl_check_io.c b/erts/emulator/sys/common/erl_check_io.c
index 2964b09b8c..352e51a877 100644
--- a/erts/emulator/sys/common/erl_check_io.c
+++ b/erts/emulator/sys/common/erl_check_io.c
@@ -753,10 +753,6 @@ check_cleanup_active_fd(ErtsSysFdType fd,
}
if (state->driver.nif) {
-#if ERTS_CIO_DEFER_ACTIVE_EVENTS
-# error Windows
-#endif
- int do_wake = 0;
ErtsPollEvents rm_events = 0;
if (state->driver.nif->in.ddeselect_cnt) {
ASSERT(state->type == ERTS_EV_TYPE_NIF);
@@ -777,7 +773,9 @@ check_cleanup_active_fd(ErtsSysFdType fd,
}
}
if (rm_events) {
- state->events = ERTS_CIO_POLL_CTL(pollset.ps, state->fd, rm_events, 0, &do_wake);
+ int do_wake = 0;
+ state->events = ERTS_CIO_POLL_CTL(pollset.ps, state->fd,
+ rm_events, 0, &do_wake);
}
if (state->events)
active = 1;
@@ -2140,11 +2138,16 @@ ERTS_CIO_EXPORT(erts_check_io_interrupt_timed)(int set,
ERTS_CIO_POLL_INTR_TMD(pollset.ps, set, timeout_time);
}
+#if !ERTS_CIO_DEFER_ACTIVE_EVENTS
/*
* Number of ignored events, for a lingering fd added by enif_select(),
* until we deselect fd-event from pollset.
*/
-#define ERTS_NIF_DELAYED_DESELECT 20
+# define ERTS_NIF_DELAYED_DESELECT 20
+#else
+/* Disable delayed deselect as pollset cannot handle active events */
+# define ERTS_NIF_DELAYED_DESELECT 1
+#endif
void
ERTS_CIO_EXPORT(erts_check_io)(int do_wait)