* cygthread.h (cygthread::name): Very minor formatting tweak.
* exceptions.cc (_cygtls::call_signal_handler): Add paranoid debugging output. * sigproc.h (cygwait): Call signal handler when signal is detected and loop as appropriate. * fhandler.h (fhandler_base_overlapped::wait_return): Remove overlapped_signal. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove restartable signal accommodations in light of cygwait improvements. (fhandler_base_overlapped::raw_read): Remove now-obsolete signal loop behavior. (fhandler_base_overlapped::raw_write): Ditto. * fhandler_console.cc (fhandler_console::read): Ditto. * fhandler_serial.cc (fhandler_serial::raw_read): Ditto. (fhandler_serial::raw_write): Ditto. * fhandler_tty.cc (fhandler_pty_slave::read): Ditto. * ioctl.cc (ioctl): Add standard syscall introducer and leaver debug output.
This commit is contained in:
@@ -85,13 +85,24 @@ static inline DWORD __attribute__ ((always_inline))
|
||||
cygwait (HANDLE h, DWORD howlong = INFINITE)
|
||||
{
|
||||
HANDLE w4[3];
|
||||
int n = 0;
|
||||
if ((w4[n] = h) != NULL)
|
||||
n++;
|
||||
DWORD n = 0;
|
||||
DWORD wait_signal;
|
||||
if ((w4[n] = h) == NULL)
|
||||
wait_signal = WAIT_OBJECT_0 + 15; /* Arbitrary. Don't call signal
|
||||
handler if only waiting for signal */
|
||||
else
|
||||
{
|
||||
n++;
|
||||
wait_signal = n;
|
||||
}
|
||||
w4[n++] = signal_arrived;
|
||||
if ((w4[n] = pthread::get_cancel_event ()) != NULL)
|
||||
n++;
|
||||
return WaitForMultipleObjects (n, w4, FALSE, howlong);
|
||||
DWORD res;
|
||||
while ((res = WaitForMultipleObjects (n, w4, FALSE, howlong)) == wait_signal
|
||||
&& _my_tls.call_signal_handler ())
|
||||
continue;
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline DWORD __attribute__ ((always_inline))
|
||||
|
Reference in New Issue
Block a user