Lines Matching refs:watch
764 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()
807 list_del(&watch->list); in unregister_xenbus_watch()
810 err = xs_unwatch(watch->node, token); in unregister_xenbus_watch()
812 pr_warn("Failed to release watch %s: %i\n", watch->node, err); in unregister_xenbus_watch()
823 if (watch->nr_pending) { in unregister_xenbus_watch()
825 if (event->handle != watch) in unregister_xenbus_watch()
830 watch->nr_pending = 0; in unregister_xenbus_watch()
849 struct xenbus_watch *watch; in xs_resume() local
850 char token[sizeof(watch) * 2 + 1]; in xs_resume()
859 list_for_each_entry(watch, &watches, list) { in xs_resume()
860 sprintf(token, "%lX", (long)watch); in xs_resume()
861 xs_watch(watch->node, token); in xs_resume()