Go to the documentation of this file.
29 # if defined(__APPLE__) || \
30 defined(__DragonFly__) || \
31 defined(__FreeBSD__) || \
32 defined(__FreeBSD_kernel__) || \
33 defined(__OpenBSD__) || \
35 # define HAVE_KQUEUE 1
40 # if defined(__linux__)
45 #if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL)
47 #if defined(HAVE_KQUEUE)
48 # include <sys/types.h>
49 # include <sys/event.h>
50 # include <sys/time.h>
53 #if defined(HAVE_EPOLL)
54 # include <sys/epoll.h>
61 static volatile int embed_closed;
63 static int embed_timer_called;
66 static void embed_thread_runner(
void*
arg) {
71 while (!embed_closed) {
76 #if defined(HAVE_KQUEUE)
79 ts.tv_nsec = (
timeout % 1000) * 1000000;
80 r = kevent(fd, NULL, 0, NULL, 0, &ts);
81 #elif defined(HAVE_EPOLL)
87 }
while (
r == -1 && errno == EINTR);
102 embed_timer_called++;
111 #if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL)
116 embed_timer_called = 0;
135 ASSERT(embed_timer_called == 1);
UV_EXTERN int uv_thread_join(uv_thread_t *tid)
UV_EXTERN int uv_run(uv_loop_t *, uv_run_mode mode)
UV_EXTERN void uv_close(uv_handle_t *handle, uv_close_cb close_cb)
UV_EXTERN int uv_loop_close(uv_loop_t *loop)
UV_EXTERN uv_loop_t * uv_default_loop(void)
UV_EXTERN int uv_backend_fd(const uv_loop_t *)
UV_EXTERN int uv_backend_timeout(const uv_loop_t *)
UV_EXTERN int uv_loop_init(uv_loop_t *loop)
UV_EXTERN int uv_thread_create(uv_thread_t *tid, uv_thread_cb entry, void *arg)
int epoll_wait(uv__os390_epoll *lst, struct epoll_event *events, int maxevents, int timeout)
UV_PLATFORM_SEM_T uv_sem_t
UV_EXTERN void uv_sem_post(uv_sem_t *sem)
UV_EXTERN int uv_sem_init(uv_sem_t *sem, unsigned int value)
UV_EXTERN int uv_async_init(uv_loop_t *, uv_async_t *async, uv_async_cb async_cb)
UV_EXTERN int uv_timer_start(uv_timer_t *handle, uv_timer_cb cb, uint64_t timeout, uint64_t repeat)
UV_EXTERN void uv_sem_wait(uv_sem_t *sem)
UV_EXTERN int uv_timer_init(uv_loop_t *, uv_timer_t *handle)
UV_EXTERN int uv_async_send(uv_async_t *async)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:29