Lines Matching refs:handle
31 uv_poll_t* handle; in uv__poll_io() local
34 handle = container_of(w, uv_poll_t, io_watcher); in uv__poll_io()
49 uv__handle_stop(handle); in uv__poll_io()
50 handle->poll_cb(handle, UV_EBADF, 0); in uv__poll_io()
64 handle->poll_cb(handle, 0, pevents); in uv__poll_io()
68 int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd) { in uv_poll_init() argument
90 uv__handle_init(loop, (uv_handle_t*) handle, UV_POLL); in uv_poll_init()
91 uv__io_init(&handle->io_watcher, uv__poll_io, fd); in uv_poll_init()
92 handle->poll_cb = NULL; in uv_poll_init()
97 int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle, in uv_poll_init_socket() argument
99 return uv_poll_init(loop, handle, socket); in uv_poll_init_socket()
103 static void uv__poll_stop(uv_poll_t* handle) { in uv__poll_stop() argument
104 uv__io_stop(handle->loop, in uv__poll_stop()
105 &handle->io_watcher, in uv__poll_stop()
107 uv__handle_stop(handle); in uv__poll_stop()
108 uv__platform_invalidate_fd(handle->loop, handle->io_watcher.fd); in uv__poll_stop()
112 int uv_poll_stop(uv_poll_t* handle) { in uv_poll_stop() argument
113 assert(!uv__is_closing(handle)); in uv_poll_stop()
114 uv__poll_stop(handle); in uv_poll_stop()
119 int uv_poll_start(uv_poll_t* handle, int pevents, uv_poll_cb poll_cb) { in uv_poll_start() argument
126 assert(!uv__is_closing(handle)); in uv_poll_start()
128 watchers = handle->loop->watchers; in uv_poll_start()
129 w = &handle->io_watcher; in uv_poll_start()
131 if (uv__fd_exists(handle->loop, w->fd)) in uv_poll_start()
135 uv__poll_stop(handle); in uv_poll_start()
150 uv__io_start(handle->loop, &handle->io_watcher, events); in uv_poll_start()
151 uv__handle_start(handle); in uv_poll_start()
152 handle->poll_cb = poll_cb; in uv_poll_start()
158 void uv__poll_close(uv_poll_t* handle) { in uv__poll_close() argument
159 uv__poll_stop(handle); in uv__poll_close()