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.
This commit is contained in:
@@ -26,6 +26,7 @@ details. */
|
||||
#include "cygthread.h"
|
||||
#include "child_info.h"
|
||||
#include <asm/socket.h>
|
||||
#include "cygwait.h"
|
||||
|
||||
#define close_maybe(h) \
|
||||
do { \
|
||||
@@ -737,14 +738,14 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
|
||||
goto out;
|
||||
}
|
||||
break;
|
||||
case WAIT_OBJECT_0 + 1:
|
||||
case WAIT_SIGNALED:
|
||||
if (totalread > 0)
|
||||
goto out;
|
||||
termios_printf ("wait catched signal");
|
||||
set_sig_errno (EINTR);
|
||||
totalread = -1;
|
||||
goto out;
|
||||
case WAIT_OBJECT_0 + 2:
|
||||
case WAIT_CANCELED:
|
||||
process_state.pop ();
|
||||
pthread::static_cancel_self ();
|
||||
/*NOTREACHED*/
|
||||
@@ -772,14 +773,14 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
|
||||
case WAIT_OBJECT_0:
|
||||
case WAIT_ABANDONED_0:
|
||||
break;
|
||||
case WAIT_OBJECT_0 + 1:
|
||||
case WAIT_SIGNALED:
|
||||
if (totalread > 0)
|
||||
goto out;
|
||||
termios_printf ("wait for mutex catched signal");
|
||||
termios_printf ("wait for mutex caught signal");
|
||||
set_sig_errno (EINTR);
|
||||
totalread = -1;
|
||||
goto out;
|
||||
case WAIT_OBJECT_0 + 2:
|
||||
case WAIT_CANCELED:
|
||||
process_state.pop ();
|
||||
pthread::static_cancel_self ();
|
||||
/*NOTREACHED*/
|
||||
|
Reference in New Issue
Block a user