diff options
author | Christopher Faylor <me@cgf.cx> | 2012-06-18 00:50:24 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-06-18 00:50:24 +0400 |
commit | 4ae63783821bd2114246166957d25b2acd26c875 (patch) | |
tree | 0b7972e9330fa3a3f863621afd18643e485a151f /winsup/cygwin/sigproc.h | |
parent | d66ef282c2473d7df911e6d7d6ef1fc778777097 (diff) |
Add '#include "cygwait.h"' throughout, where appropriate.
* DevNotes: Add entry cgf-000012.
* Makefile.in (DLL_OFILES): Add cygwait.o.
* sigproc.h: Remove cygwait definitions.
* cygwait.h: New file. Define/declare Cygwin waitfor functions.
* cygwait.cc: Ditto.
* exceptions.cc: Include cygwait.h.
(handle_sigsuspend): Accommodate change in cancelable_wait arguments.
(sigpacket::process): Display thread tls in debugging output.
* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use symbolic names
for signal and cancel return.
* fhandler_console.cc (fhandler_console::read): Ditto.
(fhandler_dev_dsp::Audio_out::waitforspace): Ditto.
fhandler_dev_dsp::Audio_in::waitfordata): Ditto.
* fhandler_fifo.cc (fhandler_fifo::wait): Ditto.
* fhandler_serial.cc (fhandler_serial::raw_read): Ditto.
* fhandler_tty.cc (fhandler_pty_slave::read): Ditto.
* select.cc (cygwin_select): Ditto.
* wait.cc (wait4): Ditto.
* thread.cc (cancelable_wait): Move definition to cygwait.h.
(pthread_cond::wait): Accommodate change in cancelable_wait arguments.
(pthread_mutex::lock): Ditto.
(pthread_spinlock::lock): Ditto.
(pthread::join): Ditto.
(pthread::thread_init_wrapper): Display tls in debugging output.
(semaphore::_timedwait): Ditto.
* thread.h (cw_sig_wait): Move to cygwait.h.
(cw_cancel_action): Delete.
(cancelable_wait): Move declaration to cygwait.h.
Diffstat (limited to 'winsup/cygwin/sigproc.h')
-rw-r--r-- | winsup/cygwin/sigproc.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index a86c6bc42..d980f1a6e 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -80,33 +80,6 @@ void __stdcall proc_terminate (); void __stdcall sigproc_init (); #ifdef __INSIDE_CYGWIN__ void __stdcall sigproc_terminate (enum exit_states); - -static inline DWORD __attribute__ ((always_inline)) -cygwait (HANDLE h, DWORD howlong = INFINITE) -{ - HANDLE w4[3]; - DWORD n = 0; - DWORD wait_signal; - if ((w4[n] = h) != NULL) - wait_signal = WAIT_OBJECT_0 + ++n; - else - wait_signal = WAIT_OBJECT_0 + 15; /* Arbitrary. Don't call signal - handler if only waiting for signal */ - w4[n++] = signal_arrived; - if ((w4[n] = pthread::get_cancel_event ()) != NULL) - n++; - DWORD res; - while ((res = WaitForMultipleObjects (n, w4, FALSE, howlong)) == wait_signal - && (_my_tls.call_signal_handler () || &_my_tls != _main_tls)) - continue; - return res; -} - -static inline DWORD __attribute__ ((always_inline)) -cygwait (DWORD wait) -{ - return cygwait ((HANDLE) NULL, wait); -} #endif bool __stdcall pid_exists (pid_t) __attribute__ ((regparm(1))); int __stdcall sig_send (_pinfo *, siginfo_t&, class _cygtls *tls = NULL) __attribute__ ((regparm (3))); |