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-19 04:38:02 +0400
committerChristopher Faylor <me@cgf.cx>2012-06-19 04:38:02 +0400
commit2addde8cb1e794a9818b9417839524dbc05401da (patch)
tree389e9271ffc3ea88d97116b52fa8e838889ab12f /winsup/cygwin/cygwait.h
parentaf5cd145835d35519af02d0d226f67eb777e4945 (diff)
Revert errneous checkin.
Check in actual change associated with ChangeLog.
Diffstat (limited to 'winsup/cygwin/cygwait.h')
-rw-r--r--winsup/cygwin/cygwait.h42
1 files changed, 5 insertions, 37 deletions
diff --git a/winsup/cygwin/cygwait.h b/winsup/cygwin/cygwait.h
index a7daf88eb..9b2be02ac 100644
--- a/winsup/cygwin/cygwait.h
+++ b/winsup/cygwin/cygwait.h
@@ -11,6 +11,9 @@
#pragma once
+#define WAIT_CANCELED (WAIT_OBJECT_0 + 2)
+#define WAIT_SIGNALED (WAIT_OBJECT_0 + 1)
+
enum cw_wait_mask
{
cw_cancel = 0x0001,
@@ -19,8 +22,6 @@ enum cw_wait_mask
cw_sig_eintr = 0x0008
};
-extern TIMER_BASIC_INFORMATION cw_nowait;
-
const unsigned cw_std_mask = cw_cancel | cw_cancel_self | cw_sig;
DWORD cancelable_wait (HANDLE, PLARGE_INTEGER timeout = NULL,
@@ -28,7 +29,7 @@ DWORD cancelable_wait (HANDLE, PLARGE_INTEGER timeout = NULL,
__attribute__ ((regparm (3)));
static inline DWORD __attribute__ ((always_inline))
-cancelable_wait (HANDLE h, DWORD howlong, unsigned mask)
+cygwait (HANDLE h, DWORD howlong = INFINITE)
{
PLARGE_INTEGER pli_howlong;
LARGE_INTEGER li_howlong;
@@ -39,14 +40,7 @@ cancelable_wait (HANDLE h, DWORD howlong, unsigned mask)
li_howlong.QuadPart = 10000ULL * howlong;
pli_howlong = &li_howlong;
}
-
- return cancelable_wait (h, pi_howlong, mask);
-}
-
-static inline DWORD __attribute__ ((always_inline))
-cygwait (HANDLE h, DWORD howlong = INFINITE)
-{
- return cancelable_wait (h, howlong, cw_cancel | cw_sig_eintr);
+ return cancelable_wait (h, pli_howlong, cw_cancel | cw_sig);
}
static inline DWORD __attribute__ ((always_inline))
@@ -54,29 +48,3 @@ cygwait (DWORD howlong)
{
return cygwait ((HANDLE) NULL, howlong);
}
-
-class set_thread_waiting
-{
- void doit (bool setit, DWORD& here)
- {
- if (setit)
- {
- if (_my_tls.signal_arrived == NULL)
- _my_tls.signal_arrived = CreateEvent (&sec_none_nih, false, false, NULL);
- here = _my_tls.signal_arrived;
- _my_tls.waiting = true;
- }
- }
-public:
- set_thread_waiting (bool setit, DWORD& here) { doit (setit, here); }
- set_thread_waiting (DWORD& here) { doit (true, here); }
-
- ~set_thread_waiting ()
- {
- if (_my_tls.waiting)
- {
- _my_tls.waiting = false;
- ResetEvent (_my_tls.signal_arrived);
- }
- }
-};