mirror of /home/gitosis/repositories/libev.git
*** empty log message ***
This commit is contained in:
parent
98f60ec14e
commit
cb11724ea2
3
Changes
3
Changes
|
@ -6,7 +6,7 @@ WISH? monotonic clocks times/GetTickCount for coarse corrections?
|
|||
backend by assuming the kernel event mask hasn't changed if
|
||||
ADD fails with EEXIST.
|
||||
- work around spurious event notification bugs in epoll by using
|
||||
an 8-bit generation counter. recreate kernel state if we receive
|
||||
a 32-bit generation counter. recreate kernel state if we receive
|
||||
spurious notifications or unwanted events.
|
||||
- use memset to initialise most arrays now and do away with the
|
||||
init functions.
|
||||
|
@ -16,6 +16,7 @@ WISH? monotonic clocks times/GetTickCount for coarse corrections?
|
|||
to have a struct AND a function called ev_loop).
|
||||
- fix a bug where ev_default would not initialise the default
|
||||
loop again after it was destroyed with ev_default_destroy.
|
||||
- rename syserr to ev_syserr to avoid name clashes when embedding.
|
||||
|
||||
3.45 Tue Oct 21 21:59:26 CEST 2008
|
||||
- disable inotify usage on linux <2.6.25, as it is broken
|
||||
|
|
12
ev.c
12
ev.c
|
@ -390,7 +390,7 @@ ev_set_syserr_cb (void (*cb)(const char *msg))
|
|||
}
|
||||
|
||||
static void noinline
|
||||
syserr (const char *msg)
|
||||
ev_syserr (const char *msg)
|
||||
{
|
||||
if (!msg)
|
||||
msg = "(libev) system error";
|
||||
|
@ -452,7 +452,10 @@ typedef struct
|
|||
unsigned char events;
|
||||
unsigned char reify;
|
||||
unsigned char emask; /* the epoll backend stores the actual kernel mask in here */
|
||||
unsigned char egen; /* generation counter to counter epoll bugs */
|
||||
unsigned char unused;
|
||||
#if EV_USE_EPOLL
|
||||
unsigned int egen; /* generation counter to counter epoll bugs */
|
||||
#endif
|
||||
#if EV_SELECT_IS_WINSOCKET
|
||||
SOCKET handle;
|
||||
#endif
|
||||
|
@ -1000,7 +1003,7 @@ evpipe_init (EV_P)
|
|||
#endif
|
||||
{
|
||||
while (pipe (evpipe))
|
||||
syserr ("(libev) error creating signal/async pipe");
|
||||
ev_syserr ("(libev) error creating signal/async pipe");
|
||||
|
||||
fd_intern (evpipe [0]);
|
||||
fd_intern (evpipe [1]);
|
||||
|
@ -1658,8 +1661,7 @@ ev_default_fork (void)
|
|||
struct ev_loop *loop = ev_default_loop_ptr;
|
||||
#endif
|
||||
|
||||
if (backend)
|
||||
postfork = 1; /* must be in line with ev_loop_fork */
|
||||
ev_loop_fork (EV_A);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -123,7 +123,7 @@ epoll_poll (EV_P_ ev_tstamp timeout)
|
|||
if (expect_false (eventcnt < 0))
|
||||
{
|
||||
if (errno != EINTR)
|
||||
syserr ("(libev) epoll_wait");
|
||||
ev_syserr ("(libev) epoll_wait");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ epoll_fork (EV_P)
|
|||
close (backend_fd);
|
||||
|
||||
while ((backend_fd = epoll_create (256)) < 0)
|
||||
syserr ("(libev) epoll_create");
|
||||
ev_syserr ("(libev) epoll_create");
|
||||
|
||||
fcntl (backend_fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
|
|||
if (expect_false (res < 0))
|
||||
{
|
||||
if (errno != EINTR)
|
||||
syserr ("(libev) kevent");
|
||||
ev_syserr ("(libev) kevent");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ kqueue_fork (EV_P)
|
|||
close (backend_fd);
|
||||
|
||||
while ((backend_fd = kqueue ()) < 0)
|
||||
syserr ("(libev) kqueue");
|
||||
ev_syserr ("(libev) kqueue");
|
||||
|
||||
fcntl (backend_fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ poll_poll (EV_P_ ev_tstamp timeout)
|
|||
else if (errno == ENOMEM && !syserr_cb)
|
||||
fd_enomem (EV_A);
|
||||
else if (errno != EINTR)
|
||||
syserr ("(libev) poll");
|
||||
ev_syserr ("(libev) poll");
|
||||
}
|
||||
else
|
||||
for (p = polls; res; ++p)
|
||||
|
|
|
@ -59,7 +59,7 @@ port_associate_and_check (EV_P_ int fd, int ev)
|
|||
if (errno == EBADFD)
|
||||
fd_kill (EV_A_ fd);
|
||||
else
|
||||
syserr ("(libev) port_associate");
|
||||
ev_syserr ("(libev) port_associate");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ port_poll (EV_P_ ev_tstamp timeout)
|
|||
if (res < 0)
|
||||
{
|
||||
if (errno != EINTR && errno != ETIME)
|
||||
syserr ("(libev) port_getn");
|
||||
ev_syserr ("(libev) port_getn");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ port_fork (EV_P)
|
|||
close (backend_fd);
|
||||
|
||||
while ((backend_fd = port_create ()) < 0)
|
||||
syserr ("(libev) port");
|
||||
ev_syserr ("(libev) port");
|
||||
|
||||
fcntl (backend_fd, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ select_poll (EV_P_ ev_tstamp timeout)
|
|||
else if (errno == ENOMEM && !syserr_cb)
|
||||
fd_enomem (EV_A);
|
||||
else if (errno != EINTR)
|
||||
syserr ("(libev) select");
|
||||
ev_syserr ("(libev) select");
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue