Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-06-18 00:50:24 +0400
committerChristopher Faylor <me@cgf.cx>2012-06-18 00:50:24 +0400
commit4ae63783821bd2114246166957d25b2acd26c875 (patch)
tree0b7972e9330fa3a3f863621afd18643e485a151f /winsup/cygwin/thread.h
parentd66ef282c2473d7df911e6d7d6ef1fc778777097 (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/thread.h')
-rw-r--r--winsup/cygwin/thread.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
index ec3ca7ebf..0dd9b893b 100644
--- a/winsup/cygwin/thread.h
+++ b/winsup/cygwin/thread.h
@@ -29,25 +29,7 @@ details. */
#include "security.h"
#include <errno.h>
#include "cygerrno.h"
-
-enum cw_sig_wait
-{
- cw_sig_nosig,
- cw_sig_eintr,
- cw_sig_resume
-};
-
-enum cw_cancel_action
-{
- cw_cancel_self,
- cw_no_cancel_self,
- cw_no_cancel
-};
-
-DWORD cancelable_wait (HANDLE, PLARGE_INTEGER timeout = NULL,
- const cw_cancel_action = cw_cancel_self,
- const enum cw_sig_wait = cw_sig_nosig)
- __attribute__ ((regparm (3)));
+#include "cygwait.h"
class fast_mutex
{
@@ -78,7 +60,7 @@ public:
void lock ()
{
if (InterlockedIncrement ((long *) &lock_counter) != 1)
- cancelable_wait (win32_obj_id, NULL, cw_no_cancel, cw_sig_resume);
+ cancelable_wait (win32_obj_id, NULL, cw_sig);
}
void unlock ()