Lines Matching refs:watch
59 * New watch events happening in this time can be ignored by firing all watches
81 /* List of pending watch callback events, and a lock to protect it. */
85 /* Protect watch (de)register against save/restore. */
763 /* Register callback to watch this node. */
764 int register_xenbus_watch(struct xenbus_watch *watch)
767 char token[sizeof(watch) * 2 + 1];
770 sprintf(token, "%lX", (long)watch);
772 watch->nr_pending = 0;
778 list_add(&watch->list, &watches);
781 err = xs_watch(watch->node, token);
785 list_del(&watch->list);
795 void unregister_xenbus_watch(struct xenbus_watch *watch)
798 char token[sizeof(watch) * 2 + 1];
801 sprintf(token, "%lX", (long)watch);
807 list_del(&watch->list);
810 err = xs_unwatch(watch->node, token);
812 pr_warn("Failed to release watch %s: %i\n", watch->node, err);
821 /* Cancel pending watch events. */
823 if (watch->nr_pending) {
825 if (event->handle != watch)
830 watch->nr_pending = 0;
849 struct xenbus_watch *watch;
850 char token[sizeof(watch) * 2 + 1];
859 list_for_each_entry(watch, &watches, list) {
860 sprintf(token, "%lX", (long)watch);
861 xs_watch(watch->node, token);