From a9e3edbbaef8f747345cbaabb111219272ed1a53 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Jun 2011 00:04:52 +0000 Subject: *** empty log message *** --- ev_port.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ev_port.c') diff --git a/ev_port.c b/ev_port.c index 0ffebc3..082766f 100644 --- a/ev_port.c +++ b/ev_port.c @@ -147,6 +147,12 @@ port_init (EV_P_ int flags) fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */ + /* if my reading of the opensolaris kernel sources are correct, then + * opensolaris does something very stupid: it checks if the time has already + * elapsed and doesn't round up if that is the case,m otherwise it DOES round + * up. Since we can't know what the case is, we need to guess by using a + * "large enough" timeout. Normally, 1e-9 would be correct. + */ backend_fudge = 1e-3; /* needed to compensate for port_getn returning early */ backend_modify = port_modify; backend_poll = port_poll; -- cgit v1.2.3