Lines Matching refs:watch
113 } watch; member
806 register_xenbus_watch(struct xenbus_watch *watch) in register_xenbus_watch() argument
809 char token[sizeof (watch) * 2 + 1]; in register_xenbus_watch()
813 (void) snprintf(token, sizeof (token), "%lX", (long)watch); in register_xenbus_watch()
822 list_insert_tail(&watches, watch); in register_xenbus_watch()
825 DTRACE_XPV3(xenbus__register__watch, const char *, watch->node, in register_xenbus_watch()
826 uintptr_t, watch->callback, struct xenbus_watch *, watch); in register_xenbus_watch()
828 err = xs_watch(watch->node, token); in register_xenbus_watch()
833 list_remove(&watches, watch); in register_xenbus_watch()
847 for (i = 0; i < msg->un.watch.vec_size; i++) in free_stored_msg()
848 len += strlen(msg->un.watch.vec[i]) + 1 + sizeof (char *); in free_stored_msg()
849 kmem_free(msg->un.watch.vec, len); in free_stored_msg()
854 unregister_xenbus_watch(struct xenbus_watch *watch) in unregister_xenbus_watch() argument
857 char token[sizeof (watch) * 2 + 1]; in unregister_xenbus_watch()
860 (void) snprintf(token, sizeof (token), "%lX", (long)watch); in unregister_xenbus_watch()
866 list_remove(&watches, watch); in unregister_xenbus_watch()
869 DTRACE_XPV3(xenbus__unregister__watch, const char *, watch->node, in unregister_xenbus_watch()
870 uintptr_t, watch->callback, struct xenbus_watch *, watch); in unregister_xenbus_watch()
872 err = xs_unwatch(watch->node, token); in unregister_xenbus_watch()
875 watch->node, err); in unregister_xenbus_watch()
885 if (msg->un.watch.handle == watch) { in unregister_xenbus_watch()
913 struct xenbus_watch *watch; in xenbus_resume() local
914 char token[sizeof (watch) * 2 + 1]; in xenbus_resume()
922 for (watch = list_head(&watches); watch != NULL; in xenbus_resume()
923 watch = list_next(&watches, watch)) { in xenbus_resume()
924 (void) snprintf(token, sizeof (token), "%lX", (long)watch); in xenbus_resume()
925 (void) xs_watch(watch->node, token); in xenbus_resume()
935 struct xenbus_watch *watch; in xenwatch_thread() local
944 watch = msg->un.watch.handle; in xenwatch_thread()
950 const char *, watch->node, in xenwatch_thread()
951 uintptr_t, watch->callback, in xenwatch_thread()
952 struct xenbus_watch *, watch, in xenwatch_thread()
953 const char *, msg->un.watch.vec[XS_WATCH_PATH]); in xenwatch_thread()
955 watch->callback(watch, (const char **)msg->un.watch.vec, in xenwatch_thread()
956 msg->un.watch.vec_size); in xenwatch_thread()
992 msg->un.watch.vec = split(body, msg->hdr.len + 1, in process_msg()
993 &msg->un.watch.vec_size); in process_msg()
994 if (msg->un.watch.vec == NULL) { in process_msg()
1000 token = msg->un.watch.vec[XS_WATCH_TOKEN]; in process_msg()
1001 if ((msg->un.watch.handle = find_watch(token)) != NULL) { in process_msg()
1005 const char *, msg->un.watch.handle->node, in process_msg()
1006 uintptr_t, msg->un.watch.handle->callback, in process_msg()
1007 struct xenbus_watch *, msg->un.watch.handle, in process_msg()
1008 const char *, msg->un.watch.vec[XS_WATCH_PATH]); in process_msg()