aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-12-08 19:26:14 +0100
committerSverker Eriksson <[email protected]>2016-12-19 19:18:51 +0100
commit387ff8e3347d21e9ca5ad3d8c3a694bc79d38bca (patch)
tree65b38fbe74b5b5e83d0244073f88e56ffdc339d0 /erts/emulator/sys
parent9ffe2d285943b661317cee2b00d779a2e75a3374 (diff)
downloadotp-387ff8e3347d21e9ca5ad3d8c3a694bc79d38bca.tar.gz
otp-387ff8e3347d21e9ca5ad3d8c3a694bc79d38bca.tar.bz2
otp-387ff8e3347d21e9ca5ad3d8c3a694bc79d38bca.zip
Add stop arguments: fd and is_direct_call
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r--erts/emulator/sys/common/erl_check_io.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/erts/emulator/sys/common/erl_check_io.c b/erts/emulator/sys/common/erl_check_io.c
index aeda49b2c6..a533a10c22 100644
--- a/erts/emulator/sys/common/erl_check_io.c
+++ b/erts/emulator/sys/common/erl_check_io.c
@@ -450,7 +450,7 @@ forget_removed(struct pollset_info* psi)
}
}
if (resource) {
- erts_resource_stop(resource);
+ erts_resource_stop(resource, (ErlNifEvent)fd, 0);
enif_release_resource(resource->data);
}
@@ -1436,7 +1436,7 @@ done:
done_unknown:
erts_smp_mtx_unlock(fd_mtx(fd));
if (call_stop) {
- erts_resource_stop(resource);
+ erts_resource_stop(resource, (ErlNifEvent)fd, 1);
if (call_stop == CALL_STOP_AND_RELEASE) {
enif_release_resource(resource->data);
}
@@ -2141,6 +2141,10 @@ ERTS_CIO_EXPORT(erts_check_io_interrupt_timed)(int set,
ERTS_CIO_POLL_INTR_TMD(pollset.ps, set, timeout_time);
}
+/*
+ * 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
void