struct uloop_timeout *first_timeout;
static int poll_fd;
-static bool cancel;
+bool uloop_cancelled = false;
#ifdef USE_KQUEUE
static void uloop_handle_sigint(int signo)
{
- cancel = true;
+ uloop_cancelled = true;
}
static void uloop_setup_signals(void)
void uloop_end(void)
{
- cancel = true;
+ uloop_cancelled = true;
}
void uloop_run(void)
struct timeval tv;
uloop_setup_signals();
- while(!cancel)
+ while(!uloop_cancelled)
{
gettimeofday(&tv, NULL);
uloop_process_timeouts(&tv);
bool pending;
};
+extern bool uloop_cancelled;
+
int uloop_fd_add(struct uloop_fd *sock, unsigned int flags);
int uloop_fd_delete(struct uloop_fd *sock);