return VINE_ERROR_NONE;
}
+static void _vine_event_loop_wake_up()
+{
+ uint64_t v = 1;
+ int fd = eventfd(0, 0);
+
+ VINE_LOGD("fd[%d] to wake the eventloop up");
+ vine_event_loop_add_io_handler(fd, VINE_POLLOUT, NULL, NULL);
+ if (write(fd, &v, sizeof(v)) == -1)
+ VINE_LOGE("Write error(%d)", errno);
+}
+
void vine_event_loop_stop()
{
VINE_LOGD("vine_event_loop_stop");
__cleanup = true;
+ _vine_event_loop_wake_up();
pthread_join(__vine_event_loop_tid, NULL);
__vine_event_loop_tid = 0;
}