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