Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 12 years ago
parent
commit
cb11724ea2
7 changed files with 18 additions and 15 deletions
  1. +2
    -1
      Changes
  2. +7
    -5
      ev.c
  3. +2
    -2
      ev_epoll.c
  4. +2
    -2
      ev_kqueue.c
  5. +1
    -1
      ev_poll.c
  6. +3
    -3
      ev_port.c
  7. +1
    -1
      ev_select.c

+ 2
- 1
Changes View File

@ -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


+ 7
- 5
ev.c View File

@ -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);
}
/*****************************************************************************/


+ 2
- 2
ev_epoll.c View File

@ -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);


+ 2
- 2
ev_kqueue.c View File

@ -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);


+ 1
- 1
ev_poll.c View File

@ -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)


+ 3
- 3
ev_port.c View File

@ -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);


+ 1
- 1
ev_select.c View File

@ -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…
Cancel
Save