Lines Matching defs:handle
94 uv_fs_event_t* handle;
115 handle = QUEUE_DATA(q, uv_fs_event_t, watchers);
120 tmp_path = uv__strdup(handle->path);
124 uv_fs_event_stop(handle);
126 QUEUE_INSERT_TAIL(&tmp_watcher_list.watchers, &handle->watchers);
127 handle->path = tmp_path;
137 handle = QUEUE_DATA(q, uv_fs_event_t, watchers);
138 tmp_path = handle->path;
139 handle->path = NULL;
140 err = uv_fs_event_start(handle, handle->cb, tmp_path, 0);
243 int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle) {
244 uv__handle_init(loop, (uv_handle_t*)handle, UV_FS_EVENT);
249 int uv_fs_event_start(uv_fs_event_t* handle,
259 if (uv__is_active(handle))
262 err = init_inotify(handle->loop);
275 wd = inotify_add_watch(handle->loop->inotify_fd, path, events);
279 w = find_watcher(handle->loop, wd);
292 RB_INSERT(watcher_root, CAST(&handle->loop->inotify_watchers), w);
295 uv__handle_start(handle);
296 QUEUE_INSERT_TAIL(&w->watchers, &handle->watchers);
297 handle->path = w->path;
298 handle->cb = cb;
299 handle->wd = wd;
305 int uv_fs_event_stop(uv_fs_event_t* handle) {
308 if (!uv__is_active(handle))
311 w = find_watcher(handle->loop, handle->wd);
314 handle->wd = -1;
315 handle->path = NULL;
316 uv__handle_stop(handle);
317 QUEUE_REMOVE(&handle->watchers);
319 maybe_free_watcher_list(w, handle->loop);
325 void uv__fs_event_close(uv_fs_event_t* handle) {
326 uv_fs_event_stop(handle);