Home
last modified time | relevance | path

Searched refs:watch (Results 1 – 25 of 205) sorted by relevance

123456789

/openbmc/linux/kernel/
H A Daudit_watch.c100 void audit_get_watch(struct audit_watch *watch) in audit_get_watch() argument
102 refcount_inc(&watch->count); in audit_get_watch()
105 void audit_put_watch(struct audit_watch *watch) in audit_put_watch() argument
107 if (refcount_dec_and_test(&watch->count)) { in audit_put_watch()
108 WARN_ON(watch->parent); in audit_put_watch()
109 WARN_ON(!list_empty(&watch->rules)); in audit_put_watch()
110 kfree(watch->path); in audit_put_watch()
111 kfree(watch); in audit_put_watch()
115 static void audit_remove_watch(struct audit_watch *watch) in audit_remove_watch() argument
117 list_del(&watch->wlist); in audit_remove_watch()
[all …]
H A Dwatch_queue.c201 struct watch *watch; in __post_watch_notification() local
210 hlist_for_each_entry_rcu(watch, &wlist->watchers, list_node) { in __post_watch_notification()
211 if (watch->id != id) in __post_watch_notification()
214 n->info |= watch->info_id; in __post_watch_notification()
216 wqueue = rcu_dereference(watch->queue); in __post_watch_notification()
221 if (security_post_notification(watch->cred, cred, n) < 0) in __post_watch_notification()
416 struct watch *watch = container_of(rcu, struct watch, rcu); in free_watch() local
418 put_watch_queue(rcu_access_pointer(watch->queue)); in free_watch()
419 atomic_dec(&watch->cred->user->nr_watches); in free_watch()
420 put_cred(watch->cred); in free_watch()
[all …]
H A Dauditfilter.c89 if (erule->watch) in audit_free_rule()
90 audit_put_watch(erule->watch); in audit_free_rule()
158 krule->inode_f || krule->watch || krule->tree || in audit_to_inode()
672 audit_watch_path(krule->watch)); in audit_krule_to_data()
737 if (strcmp(audit_watch_path(a->watch), in audit_compare_rule()
738 audit_watch_path(b->watch))) in audit_compare_rule()
891 if (old->watch) { in audit_dupe_rule()
892 audit_get_watch(old->watch); in audit_dupe_rule()
893 new->watch = old->watch; in audit_dupe_rule()
911 } else if (entry->rule.watch) { in audit_find_rule()
[all …]
/openbmc/linux/drivers/xen/xenbus/
H A Dxenbus_dev_frontend.c228 struct xenbus_watch watch; member
233 static void free_watch_adapter(struct watch_adapter *watch) in free_watch_adapter() argument
235 kfree(watch->watch.node); in free_watch_adapter()
236 kfree(watch->token); in free_watch_adapter()
237 kfree(watch); in free_watch_adapter()
243 struct watch_adapter *watch; in alloc_watch_adapter() local
245 watch = kzalloc(sizeof(*watch), GFP_KERNEL); in alloc_watch_adapter()
246 if (watch == NULL) in alloc_watch_adapter()
249 watch->watch.node = kstrdup(path, GFP_KERNEL); in alloc_watch_adapter()
250 if (watch->watch.node == NULL) in alloc_watch_adapter()
[all …]
H A Dxenbus_xs.c764 int register_xenbus_watch(struct xenbus_watch *watch) in register_xenbus_watch() argument
767 char token[sizeof(watch) * 2 + 1]; in register_xenbus_watch()
770 sprintf(token, "%lX", (long)watch); in register_xenbus_watch()
772 watch->nr_pending = 0; in register_xenbus_watch()
778 list_add(&watch->list, &watches); in register_xenbus_watch()
781 err = xs_watch(watch->node, token); in register_xenbus_watch()
785 list_del(&watch->list); in register_xenbus_watch()
795 void unregister_xenbus_watch(struct xenbus_watch *watch) in unregister_xenbus_watch() argument
798 char token[sizeof(watch) * 2 + 1]; in unregister_xenbus_watch()
801 sprintf(token, "%lX", (long)watch); in unregister_xenbus_watch()
[all …]
H A Dxenbus_probe_backend.c183 static bool frontend_will_handle(struct xenbus_watch *watch, in frontend_will_handle() argument
186 return watch->nr_pending == 0; in frontend_will_handle()
189 static void frontend_changed(struct xenbus_watch *watch, in frontend_changed() argument
192 xenbus_otherend_changed(watch, path, token, 0); in frontend_changed()
212 static void backend_changed(struct xenbus_watch *watch, in backend_changed() argument
H A Dxenbus.h47 bool (*otherend_will_handle)(struct xenbus_watch *watch,
49 void (*otherend_changed)(struct xenbus_watch *watch, const char *path,
125 void xenbus_otherend_changed(struct xenbus_watch *watch,
H A Dxenbus_client.c129 struct xenbus_watch *watch, in xenbus_watch_path() argument
137 watch->node = path; in xenbus_watch_path()
138 watch->will_handle = will_handle; in xenbus_watch_path()
139 watch->callback = callback; in xenbus_watch_path()
141 err = register_xenbus_watch(watch); in xenbus_watch_path()
144 watch->node = NULL; in xenbus_watch_path()
145 watch->will_handle = NULL; in xenbus_watch_path()
146 watch->callback = NULL; in xenbus_watch_path()
171 struct xenbus_watch *watch, in xenbus_watch_pathfmt() argument
190 err = xenbus_watch_path(dev, path, watch, will_handle, callback); in xenbus_watch_pathfmt()
/openbmc/qemu/util/
H A Dfilemonitor-inotify.c141 QFileMonitorWatch *watch = &g_array_index(dir->watches, in qemu_file_monitor_watch() local
145 if (watch->filename == NULL || in qemu_file_monitor_watch()
146 (name && g_str_equal(watch->filename, name))) { in qemu_file_monitor_watch()
148 qev, watch->cb, in qemu_file_monitor_watch()
149 watch->opaque, watch->id); in qemu_file_monitor_watch()
150 watch->cb(watch->id, qev, name, watch->opaque); in qemu_file_monitor_watch()
167 QFileMonitorWatch *watch = &g_array_index(dir->watches, in qemu_file_monitor_dir_free() local
169 g_free(watch->filename); in qemu_file_monitor_dir_free()
259 QFileMonitorWatch watch; in qemu_file_monitor_add_watch() local
289 watch.id = (((int64_t)dir->inotify_id) << 32) | dir->next_file_id++; in qemu_file_monitor_add_watch()
[all …]
/openbmc/phosphor-dbus-monitor/src/
H A Dmain.cpp38 for (auto& watch : ConfigPropertyWatches::get()) in main() local
40 watch->start(); in main()
43 for (auto& watch : ConfigPropertyWatches::get()) in main() local
45 watch->callback(Context::START); in main()
47 for (auto& watch : ConfigPathWatches::get()) in main() local
49 watch->start(); in main()
52 for (auto& watch : ConfigPathWatches::get()) in main() local
54 watch->callback(Context::START); in main()
/openbmc/linux/Documentation/core-api/
H A Dwatch_queue.rst33 watch through that pipe. Only sources that have been connected to a pipe will
65 internally by the watch queue itself. There are two subtypes:
70 The first indicates that an object on which a watch was installed was removed
79 * The watch ID (mask with WATCH_INFO_ID and shift by WATCH_INFO_ID__SHIFT).
80 This indicates that caller's ID of the watch, which may be between 0
97 A "watch list" is a list of watchers that are subscribed to a source of
100 non-global watch list is typically referred to by reference to the object it
102 watch that specific key).
104 To manage a watch list, the following functions are provided:
109 void (*release_watch)(struct watch *wlist));
[all …]
/openbmc/qemu/hw/char/
H A Dvirtio-console.c34 guint watch; member
46 vcon->watch = 0; in chr_write_unblocked()
100 if (!vcon->watch) { in flush_buf()
101 vcon->watch = qemu_chr_fe_add_watch(&vcon->chr, in flush_buf()
162 if (vcon->watch) { in chr_event()
163 g_source_remove(vcon->watch); in chr_event()
164 vcon->watch = 0; in chr_event()
190 if (vcon->watch) { in chr_be_change()
191 g_source_remove(vcon->watch); in chr_be_change()
192 vcon->watch = qemu_chr_fe_add_watch(&vcon->chr, in chr_be_change()
[all …]
/openbmc/linux/drivers/counter/
H A Dcounter-chrdev.c139 struct counter_watch *const watch, in counter_set_event_node() argument
148 if (event_node->event == watch->event && in counter_set_event_node()
149 event_node->channel == watch->channel) in counter_set_event_node()
160 event_node->event = watch->event; in counter_set_event_node()
161 event_node->channel = watch->channel; in counter_set_event_node()
268 struct counter_watch watch; in counter_add_watch() local
276 if (copy_from_user(&watch, uwatch, sizeof(watch))) in counter_add_watch()
279 if (watch.component.type == COUNTER_COMPONENT_NONE) in counter_add_watch()
282 parent = watch.component.parent; in counter_add_watch()
285 switch (watch.component.scope) { in counter_add_watch()
[all …]
/openbmc/linux/Documentation/translations/zh_CN/core-api/
H A Dwatch_queue.rst105 void (*release_watch)(struct watch *wlist));
135 对象还可以携带该对象的过滤规则,由用户空间设置。watch结构体的某些部分可以由驱动程
138 struct watch {
159 * ``void init_watch(struct watch *watch, struct watch_queue *wqueue);``
163 * ``int add_watch_to_object(struct watch *watch, struct watch_list *wlist);``
165 将观测订阅到观测列表(通知源)。watch结构体中的driver-settable字段必须在调用
251 (watch.info & info_mask) == info_filter
/openbmc/qemu/ui/
H A Dspice-core.c92 SpiceWatch *watch = opaque; in watch_read() local
93 int fd = watch->fd; in watch_read()
98 watch->func(fd, SPICE_WATCH_EVENT_READ, watch->opaque); in watch_read()
103 SpiceWatch *watch = opaque; in watch_write() local
104 int fd = watch->fd; in watch_write()
109 watch->func(fd, SPICE_WATCH_EVENT_WRITE, watch->opaque); in watch_write()
112 static void watch_update_mask(SpiceWatch *watch, int event_mask) in watch_update_mask() argument
123 qemu_set_fd_handler(watch->fd, on_read, on_write, watch); in watch_update_mask()
128 SpiceWatch *watch; in watch_add() local
138 watch = g_malloc0(sizeof(*watch)); in watch_add()
[all …]
/openbmc/qemu/qga/
H A Dchannel-win32.c39 GAWatch *watch = (GAWatch *)source; in ga_channel_prepare() local
40 GAChannel *c = (GAChannel *)watch->channel; in ga_channel_prepare()
96 GAWatch *watch = (GAWatch *)source; in ga_channel_check() local
97 GAChannel *c = (GAChannel *)watch->channel; in ga_channel_check()
154 GAWatch *watch = (GAWatch *)source; in ga_channel_dispatch() local
155 GAChannel *c = (GAChannel *)watch->channel; in ga_channel_dispatch()
160 success = c->cb(watch->pollfd.revents, c->user_data); in ga_channel_dispatch()
192 GAWatch *watch = (GAWatch *)source; in ga_channel_create_watch() local
194 watch->channel = c; in ga_channel_create_watch()
195 watch->pollfd.fd = (gintptr) c->rstate.ov.hEvent; in ga_channel_create_watch()
[all …]
/openbmc/linux/include/linux/
H A Dwatch_queue.h54 struct watch { struct
75 void (*release_watch)(struct watch *); argument
85 extern void init_watch(struct watch *, struct watch_queue *);
86 extern int add_watch_to_object(struct watch *, struct watch_list *);
95 void (*release_watch)(struct watch *)) in init_watch_list() argument
/openbmc/u-boot/board/freescale/common/
H A Dpixis.h21 u8 watch; member
69 u8 watch; member
99 u8 watch; member
130 u8 watch; member
155 u8 watch; member
/openbmc/qemu/net/
H A Dvhost-user.c29 guint watch; member
170 if (s->watch) { in net_vhost_user_cleanup()
171 g_source_remove(s->watch); in net_vhost_user_cleanup()
172 s->watch = 0; in net_vhost_user_cleanup()
299 s->watch = qemu_chr_fe_add_watch(&s->chr, G_IO_HUP, in net_vhost_user_event()
310 if (s->watch) { in net_vhost_user_event()
313 g_source_remove(s->watch); in net_vhost_user_event()
314 s->watch = 0; in net_vhost_user_event()
/openbmc/linux/tools/gpio/
H A DMakefile21 ALL_TARGETS := lsgpio gpio-hammer gpio-event-mon gpio-watch
72 GPIO_WATCH_IN := $(OUTPUT)gpio-watch-in.o
74 $(Q)$(MAKE) $(build)=gpio-watch
75 $(OUTPUT)gpio-watch: $(GPIO_WATCH_IN)
H A DBuild5 gpio-watch-y += gpio-watch.o
/openbmc/qemu/hw/xen/
H A Dxen-legacy-backend.c259 static void xenstore_update_fe(void *opaque, const char *watch) in xenstore_update_fe() argument
266 if (strncmp(xendev->fe, watch, len) != 0) { in xenstore_update_fe()
269 if (watch[len] != '/') { in xenstore_update_fe()
272 node = watch + len + 1; in xenstore_update_fe()
311 xendev->watch = qemu_xen_xs_watch(xenstore, xendev->fe, xenstore_update_fe, in xen_be_try_setup()
313 if (!xendev->watch) { in xen_be_try_setup()
508 static void xenstore_update_be(void *opaque, const char *watch) in xenstore_update_be() argument
516 if (strncmp(path, watch, len) != 0) { in xenstore_update_be()
519 if (sscanf(watch + len, "/%u/%255s", &dev, path) != 2) { in xenstore_update_be()
521 if (sscanf(watch + len, "/%u", &dev) != 1) { in xenstore_update_be()
/openbmc/linux/include/xen/
H A Dxenbus.h191 int register_xenbus_watch(struct xenbus_watch *watch);
192 void unregister_xenbus_watch(struct xenbus_watch *watch);
210 struct xenbus_watch *watch,
216 int xenbus_watch_pathfmt(struct xenbus_device *dev, struct xenbus_watch *watch,
/openbmc/linux/Documentation/filesystems/
H A Dinotify.rst18 What is the design decision behind not tying the watch to the open fd of
30 an fd-per-watch?
33 An fd-per-watch quickly consumes more file descriptors than are allowed,
37 A watch consumes less memory than an open file, separating the number
47 fd returns all watch events and also any potential out-of-band data. If
48 every fd was a separate watch,
/openbmc/linux/include/uapi/linux/
H A Dwatch_queue.h75 struct watch_notification watch; member
99 struct watch_notification watch; member

123456789