Lines Matching refs:loop
48 static void uv__signal_event(uv_loop_t* loop, uv__io_t* w, unsigned int events);
172 lookup.loop = NULL; in uv__signal_first_handle()
209 r = write(handle->loop->signal_pipefd[1], &msg, sizeof msg); in uv__signal_handler()
261 static int uv__signal_loop_once_init(uv_loop_t* loop) { in uv__signal_loop_once_init() argument
265 if (loop->signal_pipefd[0] != -1) in uv__signal_loop_once_init()
268 err = uv__make_pipe(loop->signal_pipefd, UV_NONBLOCK_PIPE); in uv__signal_loop_once_init()
272 uv__io_init(&loop->signal_io_watcher, in uv__signal_loop_once_init()
274 loop->signal_pipefd[0]); in uv__signal_loop_once_init()
275 uv__io_start(loop, &loop->signal_io_watcher, POLLIN); in uv__signal_loop_once_init()
281 int uv__signal_loop_fork(uv_loop_t* loop) { in uv__signal_loop_fork() argument
284 if (loop->signal_pipefd[0] == -1) in uv__signal_loop_fork()
286 uv__io_stop(loop, &loop->signal_io_watcher, POLLIN); in uv__signal_loop_fork()
287 uv__close(loop->signal_pipefd[0]); in uv__signal_loop_fork()
288 uv__close(loop->signal_pipefd[1]); in uv__signal_loop_fork()
289 loop->signal_pipefd[0] = -1; in uv__signal_loop_fork()
290 loop->signal_pipefd[1] = -1; in uv__signal_loop_fork()
292 uv__queue_foreach(q, &loop->handle_queue) { in uv__signal_loop_fork()
304 return uv__signal_loop_once_init(loop); in uv__signal_loop_fork()
308 void uv__signal_loop_cleanup(uv_loop_t* loop) { in uv__signal_loop_cleanup() argument
317 uv__queue_foreach(q, &loop->handle_queue) { in uv__signal_loop_cleanup()
324 if (loop->signal_pipefd[0] != -1) { in uv__signal_loop_cleanup()
325 uv__close(loop->signal_pipefd[0]); in uv__signal_loop_cleanup()
326 loop->signal_pipefd[0] = -1; in uv__signal_loop_cleanup()
329 if (loop->signal_pipefd[1] != -1) { in uv__signal_loop_cleanup()
330 uv__close(loop->signal_pipefd[1]); in uv__signal_loop_cleanup()
331 loop->signal_pipefd[1] = -1; in uv__signal_loop_cleanup()
336 int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle) { in uv_signal_init() argument
339 err = uv__signal_loop_once_init(loop); in uv_signal_init()
343 uv__handle_init(loop, (uv_handle_t*) handle, UV_SIGNAL); in uv_signal_init()
433 static void uv__signal_event(uv_loop_t* loop, in uv__signal_event() argument
446 r = read(loop->signal_pipefd[0], buf + bytes, sizeof(buf) - bytes); in uv__signal_event()
520 if (w1->loop < w2->loop) return -1; in uv__signal_compare()
521 if (w1->loop > w2->loop) return 1; in uv__signal_compare()