From 4ae63783821bd2114246166957d25b2acd26c875 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 17 Jun 2012 20:50:24 +0000 Subject: 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. --- winsup/cygwin/DevNotes | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'winsup/cygwin/DevNotes') diff --git a/winsup/cygwin/DevNotes b/winsup/cygwin/DevNotes index a311256e2..7bec42017 100644 --- a/winsup/cygwin/DevNotes +++ b/winsup/cygwin/DevNotes @@ -1,3 +1,25 @@ +2012-06-12 cgf-000012 + +These changes are the preliminary for redoing the way threads wait for +signals. The problems are shown by the test case mentioned here: + +http://cygwin.com/ml/cygwin/2012-05/msg00434.html + +I've known that the signal handling in threads wasn't quite right for +some time. I lost all of my thread signal tests in the great "rm -r" +debacle of a few years ago and have been less than enthusiastic about +redoing everything (I had PCTS tests and everyting). But it really is +time to redo this signal handling to make it more like it is supposed to +be. + +This change should not introduce any new behavior. Things should +continue to behave as before. The major differences are a change in the +arguments to cancelable_wait and cygwait now uses cancelable_wait and, +so, the returns from cygwait now mirror cancelable_wait. + +The next change will consolidate cygwait and cancelable_wait into one +cygwait function. + 2012-06-02 cgf-000011 The refcnt handling was tricky to get right but I had convinced myself -- cgit v1.2.3