Improve and simplify select().
* cygwait.h (cygwait_us) Remove; this reverts previous changes. * select.h: Eliminate redundant select_stuff::select_loop state. * select.cc (select): Eliminate redundant select_stuff::select_loop state. Eliminate redundant code for zero timeout. Do not return early on early timer return. (select_stuff::wait): Eliminate redundant select_stuff::select_loop state.
This commit is contained in:
committed by
Corinna Vinschen
parent
9f82de59a0
commit
472d0a228c
@@ -59,30 +59,3 @@ 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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user