ext/libev/ev_kqueue.c in rev-0.2.4 vs ext/libev/ev_kqueue.c in rev-0.3.0

- old
+ new

@@ -1,9 +1,9 @@ /* * libev kqueue backend * - * Copyright (c) 2007,2008 Marc Alexander Lehmann <libev@schmorp.de> + * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev@schmorp.de> * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * @@ -91,12 +91,14 @@ ev_free (kqueue_events); kqueue_eventmax = array_nextsize (sizeof (struct kevent), kqueue_eventmax, kqueue_changecnt); kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax); } + EV_RELEASE_CB; ts.tv_sec = (time_t)timeout; ts.tv_nsec = (long)((timeout - (ev_tstamp)ts.tv_sec) * 1e9); res = kevent (backend_fd, kqueue_changes, kqueue_changecnt, kqueue_events, kqueue_eventmax, &ts); + EV_ACQUIRE_CB; kqueue_changecnt = 0; if (expect_false (res < 0)) { if (errno != EINTR)