Revert "Improve and simplify select()."

This reverts commit 472d0a228c.

Revert accidental push
This commit is contained in:
Corinna Vinschen
2016-03-20 21:59:27 +01:00
parent 1cca343e47
commit 66dc7d731a
3 changed files with 76 additions and 15 deletions

View File

@@ -59,3 +59,30 @@ cygwait (DWORD howlong)
{
return cygwait (NULL, howlong);
}
extern inline DWORD __attribute__ ((always_inline))
cygwait_us (HANDLE h, LONGLONG howlong, unsigned mask)
{
LARGE_INTEGER li_howlong;
PLARGE_INTEGER pli_howlong;
if (howlong < 0LL)
pli_howlong = NULL;
else
{
li_howlong.QuadPart = -(10LL * howlong);
pli_howlong = &li_howlong;
}
return cygwait (h, pli_howlong, mask);
}
static inline DWORD __attribute__ ((always_inline))
cygwait_us (HANDLE h, LONGLONG howlong = -1)
{
return cygwait_us (h, howlong, cw_cancel | cw_sig);
}
static inline DWORD __attribute__ ((always_inline))
cygwait_us (LONGLONG howlong)
{
return cygwait_us (NULL, howlong);
}