Lines Matching refs:handle
54 static void timer_close_cb(uv_handle_t* handle);
59 int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle) { in uv_fs_poll_init() argument
60 uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_POLL); in uv_fs_poll_init()
61 handle->poll_ctx = NULL; in uv_fs_poll_init()
66 int uv_fs_poll_start(uv_fs_poll_t* handle, in uv_fs_poll_start() argument
75 if (uv_is_active((uv_handle_t*)handle)) in uv_fs_poll_start()
78 loop = handle->loop; in uv_fs_poll_start()
89 ctx->parent_handle = handle; in uv_fs_poll_start()
103 if (handle->poll_ctx != NULL) in uv_fs_poll_start()
104 ctx->previous = handle->poll_ctx; in uv_fs_poll_start()
105 handle->poll_ctx = ctx; in uv_fs_poll_start()
106 uv__handle_start(handle); in uv_fs_poll_start()
116 int uv_fs_poll_stop(uv_fs_poll_t* handle) { in uv_fs_poll_stop() argument
119 if (!uv_is_active((uv_handle_t*)handle)) in uv_fs_poll_stop()
122 ctx = handle->poll_ctx; in uv_fs_poll_stop()
124 assert(ctx->parent_handle == handle); in uv_fs_poll_stop()
132 uv__handle_stop(handle); in uv_fs_poll_stop()
138 int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buffer, size_t* size) { in uv_fs_poll_getpath() argument
142 if (!uv_is_active((uv_handle_t*)handle)) { in uv_fs_poll_getpath()
147 ctx = handle->poll_ctx; in uv_fs_poll_getpath()
164 void uv__fs_poll_close(uv_fs_poll_t* handle) { in uv__fs_poll_close() argument
165 uv_fs_poll_stop(handle); in uv__fs_poll_close()
167 if (handle->poll_ctx == NULL) in uv__fs_poll_close()
168 uv__make_close_pending((uv_handle_t*)handle); in uv__fs_poll_close()
189 uv_fs_poll_t* handle; in poll_cb() local
192 handle = ctx->parent_handle; in poll_cb()
194 if (!uv_is_active((uv_handle_t*)handle) || uv__is_closing(handle)) in poll_cb()
220 if (!uv_is_active((uv_handle_t*)handle) || uv__is_closing(handle)) { in poll_cb()
238 uv_fs_poll_t* handle; in timer_close_cb() local
241 handle = ctx->parent_handle; in timer_close_cb()
242 if (ctx == handle->poll_ctx) { in timer_close_cb()
243 handle->poll_ctx = ctx->previous; in timer_close_cb()
244 if (handle->poll_ctx == NULL && uv__is_closing(handle)) in timer_close_cb()
245 uv__make_close_pending((uv_handle_t*)handle); in timer_close_cb()
247 for (last = handle->poll_ctx, it = last->previous; in timer_close_cb()
281 void uv__fs_poll_endgame(uv_loop_t* loop, uv_fs_poll_t* handle) { in uv__fs_poll_endgame() argument
282 assert(handle->flags & UV_HANDLE_CLOSING); in uv__fs_poll_endgame()
283 assert(!(handle->flags & UV_HANDLE_CLOSED)); in uv__fs_poll_endgame()
284 uv__handle_close(handle); in uv__fs_poll_endgame()