* select.cc (select_stuff::wait): Very minor formatting fix.
(peek_windows): Report on HWND handle used in queries. * select.h: Update copyright. * sigproc.h (cygwait): Eliminate multi-argument variety since more general implementation may cause odd problems in select. Also force to always be inline.
This commit is contained in:
@ -81,33 +81,23 @@ void __stdcall sigproc_init ();
|
||||
#ifdef __INSIDE_CYGWIN__
|
||||
void __stdcall sigproc_terminate (enum exit_states);
|
||||
|
||||
static inline DWORD
|
||||
cygwait (DWORD n, DWORD howlong, ...)
|
||||
static inline DWORD __attribute__ ((always_inline))
|
||||
cygwait (HANDLE h, DWORD howlong = INFINITE)
|
||||
{
|
||||
va_list ap;
|
||||
HANDLE w4[n + 2];
|
||||
|
||||
va_start (ap, howlong);
|
||||
for (unsigned i = 0; i < n; i++)
|
||||
w4[i] = va_arg (ap, HANDLE);
|
||||
va_end (ap);
|
||||
|
||||
HANDLE w4[3];
|
||||
int n = 0;
|
||||
if ((w4[n] = h) != NULL)
|
||||
n++;
|
||||
w4[n++] = signal_arrived;
|
||||
if ((w4[n] = pthread::get_cancel_event ()) != NULL)
|
||||
n++;
|
||||
return WaitForMultipleObjects (n, w4, FALSE, howlong);
|
||||
}
|
||||
|
||||
static inline DWORD
|
||||
cygwait (HANDLE h, DWORD wait = INFINITE)
|
||||
{
|
||||
return cygwait (1, wait, h);
|
||||
}
|
||||
|
||||
static inline DWORD
|
||||
static inline DWORD __attribute__ ((always_inline))
|
||||
cygwait (DWORD wait)
|
||||
{
|
||||
return cygwait ((DWORD) 0, wait);
|
||||
return cygwait ((HANDLE) NULL, wait);
|
||||
}
|
||||
#endif
|
||||
bool __stdcall pid_exists (pid_t) __attribute__ ((regparm(1)));
|
||||
|
Reference in New Issue
Block a user