aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2011-12-23 17:31:35 +0100
committerRickard Green <[email protected]>2011-12-27 15:13:48 +0100
commitdf828dcd8e4d42eee9d88f4747cff1730151e351 (patch)
tree22eadd30e279294b66b9823c660baa2bfbaf1c9e /erts/emulator/sys
parent6088c2c426d71a21874673ca6ddf93aa9e2ed4ab (diff)
downloadotp-df828dcd8e4d42eee9d88f4747cff1730151e351.tar.gz
otp-df828dcd8e4d42eee9d88f4747cff1730151e351.tar.bz2
otp-df828dcd8e4d42eee9d88f4747cff1730151e351.zip
Include wakeup pipe in /dev/poll poll-set also on non-SMP
I/O events could potentially be delayed for ever when enabling kernel-poll on a non-SMP runtime system executing on Solaris. When also combined with async-threads the runtime system hung before completing the boot phase. This bug was introduced in erts-5.9/OTP-R15B.
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r--erts/emulator/sys/common/erl_poll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/sys/common/erl_poll.c b/erts/emulator/sys/common/erl_poll.c
index b6cb271f17..3817b1e4d5 100644
--- a/erts/emulator/sys/common/erl_poll.c
+++ b/erts/emulator/sys/common/erl_poll.c
@@ -1949,7 +1949,7 @@ check_fd_events(ErtsPollSet ps, SysTimeval *tv, int max_res)
*/
struct dvpoll poll_res;
int nfds = (int) erts_smp_atomic_read_nob(&ps->no_of_user_fds);
-#ifdef ERTS_SMP
+#if ERTS_POLL_USE_WAKEUP_PIPE
nfds++; /* Wakeup pipe */
#endif
if (timeout > INT_MAX)
@@ -2487,7 +2487,7 @@ ERTS_POLL_EXPORT(erts_poll_info)(ErtsPollSet ps, ErtsPollInfo *pip)
pip->memory_size = size;
pip->poll_set_size = (int) erts_smp_atomic_read_nob(&ps->no_of_user_fds);
-#ifdef ERTS_SMP
+#if ERTS_POLL_USE_WAKEUP_PIPE
pip->poll_set_size++; /* Wakeup pipe */
#endif