Lines Matching refs:w

273                              uv__io_t* w,
277 static void maybe_free_watcher_list(struct watcher_list* w,
1339 uv__io_t* w; in uv__io_poll() local
1386 w = uv__queue_data(q, uv__io_t, watcher_queue); in uv__io_poll()
1391 if (w->events == 0) in uv__io_poll()
1394 w->events = w->pevents; in uv__io_poll()
1395 e.events = w->pevents; in uv__io_poll()
1396 if (w == &loop->async_io_watcher) in uv__io_poll()
1402 e.data.fd = w->fd; in uv__io_poll()
1403 fd = w->fd; in uv__io_poll()
1499 w = loop->watchers[fd]; in uv__io_poll()
1501 if (w == NULL) { in uv__io_poll()
1520 pe->events &= w->pevents | POLLERR | POLLHUP; in uv__io_poll()
1539 w->pevents & (POLLIN | POLLOUT | UV__POLLRDHUP | UV__POLLPRI); in uv__io_poll()
1545 if (w == &loop->signal_io_watcher) { in uv__io_poll()
1549 w->cb(loop, w, pe->events); in uv__io_poll()
2513 struct watcher_list w; in find_watcher() local
2514 w.wd = wd; in find_watcher()
2515 return RB_FIND(watcher_root, uv__inotify_watchers(loop), &w); in find_watcher()
2519 static void maybe_free_watcher_list(struct watcher_list* w, uv_loop_t* loop) { in maybe_free_watcher_list() argument
2521 if ((!w->iterating) && uv__queue_empty(&w->watchers)) { in maybe_free_watcher_list()
2523 RB_REMOVE(watcher_root, uv__inotify_watchers(loop), w); in maybe_free_watcher_list()
2524 inotify_rm_watch(loop->inotify_fd, w->wd); in maybe_free_watcher_list()
2525 uv__free(w); in maybe_free_watcher_list()
2534 struct watcher_list* w; in uv__inotify_read() local
2566 w = find_watcher(loop, e->wd); in uv__inotify_read()
2567 if (w == NULL) in uv__inotify_read()
2574 path = e->len ? (const char*) (e + 1) : uv__basename_r(w->path); in uv__inotify_read()
2587 w->iterating = 1; in uv__inotify_read()
2588 uv__queue_move(&w->watchers, &queue); in uv__inotify_read()
2594 uv__queue_insert_tail(&w->watchers, q); in uv__inotify_read()
2599 w->iterating = 0; in uv__inotify_read()
2600 maybe_free_watcher_list(w, loop); in uv__inotify_read()
2616 struct watcher_list* w; in uv_fs_event_start() local
2645 w = find_watcher(loop, wd); in uv_fs_event_start()
2646 if (w) in uv_fs_event_start()
2650 w = uv__malloc(sizeof(*w) + len); in uv_fs_event_start()
2651 if (w == NULL) in uv_fs_event_start()
2654 w->wd = wd; in uv_fs_event_start()
2655 w->path = memcpy(w + 1, path, len); in uv_fs_event_start()
2656 uv__queue_init(&w->watchers); in uv_fs_event_start()
2657 w->iterating = 0; in uv_fs_event_start()
2658 RB_INSERT(watcher_root, uv__inotify_watchers(loop), w); in uv_fs_event_start()
2662 uv__queue_insert_tail(&w->watchers, &handle->watchers); in uv_fs_event_start()
2663 handle->path = w->path; in uv_fs_event_start()
2672 struct watcher_list* w; in uv_fs_event_stop() local
2677 w = find_watcher(handle->loop, handle->wd); in uv_fs_event_stop()
2678 assert(w != NULL); in uv_fs_event_stop()
2685 maybe_free_watcher_list(w, handle->loop); in uv_fs_event_stop()