return (r < 0 && errno != EAGAIN) ? -1 : 0;
}
-#if defined(_EVENT_HAVE_EVENTFD) && defined(_EVENT_HAVE_SYS_EVENTFD_H)
/* Helper callback: wake an event_base from another thread. This version
* assumes that you have a working eventfd() implementation. */
static int
return (r < 0) ? -1 : 0;
}
-#endif
/** Tell the thread currently running the event_loop for base (if any) that it
* needs to stop waiting in its dispatch function (if it is) and process all
}
#endif
-#if defined(_EVENT_HAVE_EVENTFD) && defined(_EVENT_HAVE_SYS_EVENTFD_H)
static void
evthread_notify_drain_eventfd(evutil_socket_t fd, short what, void *arg)
{
base->is_notify_pending = 0;
EVBASE_RELEASE_LOCK(base, th_base_lock);
}
-#endif
static void
evthread_notify_drain_default(evutil_socket_t fd, short what, void *arg)