Lines Matching refs:inotify_data
123 Hashmap *inotify_data; /* indexed by priority */ member
129 LIST_HEAD(struct inotify_data, inotify_data_buffered);
352 hashmap_free(e->inotify_data); in event_free()
893 struct inotify_data *inotify_data; in source_disconnect() local
894 assert_se(inotify_data = inode_data->inotify_data); in source_disconnect()
901 assert(inotify_data->n_pending > 0); in source_disconnect()
902 inotify_data->n_pending--; in source_disconnect()
1037 assert(s->inotify.inode_data->inotify_data); in source_set_pending()
1040 s->inotify.inode_data->inotify_data->n_pending ++; in source_set_pending()
1042 assert(s->inotify.inode_data->inotify_data->n_pending > 0); in source_set_pending()
1043 s->inotify.inode_data->inotify_data->n_pending --; in source_set_pending()
1683 static void event_free_inotify_data(sd_event *e, struct inotify_data *d) { in event_free_inotify_data()
1698 assert_se(hashmap_remove(e->inotify_data, &d->priority) == d); in event_free_inotify_data()
1713 struct inotify_data **ret) { in event_make_inotify_data()
1716 struct inotify_data *d; in event_make_inotify_data()
1721 d = hashmap_get(e->inotify_data, &priority); in event_make_inotify_data()
1734 d = new(struct inotify_data, 1); in event_make_inotify_data()
1738 *d = (struct inotify_data) { in event_make_inotify_data()
1744 r = hashmap_ensure_put(&e->inotify_data, &uint64_hash_ops, &d->priority, d); in event_make_inotify_data()
1809 if (d->inotify_data) { in event_free_inode_data()
1812 if (d->inotify_data->fd >= 0 && !event_pid_changed(e)) { in event_free_inode_data()
1818 … if (inotify_rm_watch(d->inotify_data->fd, d->wd) < 0 && errno != EINVAL) in event_free_inode_data()
1822 assert_se(hashmap_remove(d->inotify_data->wd, INT_TO_PTR(d->wd)) == d); in event_free_inode_data()
1825 assert_se(hashmap_remove(d->inotify_data->inodes, d) == d); in event_free_inode_data()
1833 struct inotify_data *d) { in event_gc_inotify_data()
1858 struct inotify_data *inotify_data; in event_gc_inode_data() local
1868 inotify_data = d->inotify_data; in event_gc_inode_data()
1871 event_gc_inotify_data(e, inotify_data); in event_gc_inode_data()
1876 struct inotify_data *inotify_data, in event_make_inode_data() argument
1885 assert(inotify_data); in event_make_inode_data()
1892 d = hashmap_get(inotify_data->inodes, &key); in event_make_inode_data()
1900 r = hashmap_ensure_allocated(&inotify_data->inodes, &inode_data_hash_ops); in event_make_inode_data()
1913 .inotify_data = inotify_data, in event_make_inode_data()
1916 r = hashmap_put(inotify_data->inodes, d, d); in event_make_inode_data()
1965 r = hashmap_ensure_allocated(&d->inotify_data->wd, NULL); in inode_data_realize_watch()
1969 wd = inotify_add_watch_fd(d->inotify_data->fd, d->fd, combined_mask); in inode_data_realize_watch()
1974 r = hashmap_put(d->inotify_data->wd, INT_TO_PTR(wd), d); in inode_data_realize_watch()
1976 (void) inotify_rm_watch(d->inotify_data->fd, wd); in inode_data_realize_watch()
2010 struct inotify_data *inotify_data = NULL; in event_add_inotify_fd_internal() local
2043 r = event_make_inotify_data(e, SD_EVENT_PRIORITY_NORMAL, &inotify_data); in event_add_inotify_fd_internal()
2047 r = event_make_inode_data(e, inotify_data, st.st_dev, st.st_ino, &inode_data); in event_add_inotify_fd_internal()
2049 event_gc_inotify_data(e, inotify_data); in event_add_inotify_fd_internal()
2313 struct inotify_data *new_inotify_data = NULL; in sd_event_source_set_priority()
3382 static int event_inotify_data_read(sd_event *e, struct inotify_data *d, uint32_t revents, int64_t t… in event_inotify_data_read()
3416 static void event_inotify_data_drop(sd_event *e, struct inotify_data *d, size_t sz) { in event_inotify_data_drop()
3432 static int event_inotify_data_process(sd_event *e, struct inotify_data *d) { in event_inotify_data_process()
3636 struct inotify_data *d; in source_dispatch()
3640 assert_se(d = s->inotify.inode_data->inotify_data); in source_dispatch()