diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2019-08-16 16:36:06 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-08-18 14:02:01 +0200 |
commit | 7097b05eda2f8e9058eab4fda8dedacdfb7ffd7f (patch) | |
tree | 61529d1208c79386179fdd74491a709647ef1b0d /winsup/cygwin/signal.cc | |
parent | b7399d5e6f8ad5b15cd725f66b3e49732393ef03 (diff) | |
download | newlib-7097b05eda2f8e9058eab4fda8dedacdfb7ffd7f.zip newlib-7097b05eda2f8e9058eab4fda8dedacdfb7ffd7f.tar.gz newlib-7097b05eda2f8e9058eab4fda8dedacdfb7ffd7f.tar.bz2 |
Cygwin: select: revamp non-polling code for signalfd
Rather than waiting for signalfd_select_wait in a thread, which is racy,
create a global event "my_pendingsigs_evt" which is set and reset by
wait_sig depending only on the fact if blocked signals are pending or not.
This in turn allows to WFMO on this event in select as soon as signalfds
are present in the read descriptor set. Select's peek and verify
will then check if one of the present signalfds is affected.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/signal.cc')
-rw-r--r-- | winsup/cygwin/signal.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 920a533..8ac59d4 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -606,7 +606,6 @@ sigwait_common (const sigset_t *set, siginfo_t *info, PLARGE_INTEGER waittime) __try { set_signal_mask (_my_tls.sigwait_mask, *set); - _my_tls.signalfd_select_wait = NULL; sig_dispatch_pending (true); switch (cygwait (NULL, waittime, |