aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libev/ev_select.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libev/ev_select.c')
-rw-r--r--contrib/libev/ev_select.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/libev/ev_select.c b/contrib/libev/ev_select.c
index ed1fc7ad9..b862c8113 100644
--- a/contrib/libev/ev_select.c
+++ b/contrib/libev/ev_select.c
@@ -108,7 +108,7 @@ select_modify (EV_P_ int fd, int oev, int nev)
int word = fd / NFDBITS;
fd_mask mask = 1UL << (fd % NFDBITS);
- if (expect_false (vec_max <= word))
+ if (ecb_expect_false (vec_max <= word))
{
int new_max = word + 1;
@@ -171,7 +171,7 @@ select_poll (EV_P_ ev_tstamp timeout)
#endif
EV_ACQUIRE_CB;
- if (expect_false (res < 0))
+ if (ecb_expect_false (res < 0))
{
#if EV_SELECT_IS_WINSOCKET
errno = WSAGetLastError ();
@@ -197,7 +197,7 @@ select_poll (EV_P_ ev_tstamp timeout)
{
if (timeout)
{
- unsigned long ms = timeout * 1e3;
+ unsigned long ms = EV_TS_TO_MSEC (timeout);
Sleep (ms ? ms : 1);
}
@@ -236,7 +236,7 @@ select_poll (EV_P_ ev_tstamp timeout)
if (FD_ISSET (handle, (fd_set *)vec_eo)) events |= EV_WRITE;
#endif
- if (expect_true (events))
+ if (ecb_expect_true (events))
fd_event (EV_A_ fd, events);
}
}
@@ -262,7 +262,7 @@ select_poll (EV_P_ ev_tstamp timeout)
events |= word_r & mask ? EV_READ : 0;
events |= word_w & mask ? EV_WRITE : 0;
- if (expect_true (events))
+ if (ecb_expect_true (events))
fd_event (EV_A_ word * NFDBITS + bit, events);
}
}
@@ -275,7 +275,7 @@ inline_size
int
select_init (EV_P_ int flags)
{
- backend_mintime = 1e-6;
+ backend_mintime = EV_TS_CONST (1e-6);
backend_modify = select_modify;
backend_poll = select_poll;