aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/include
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-06-03 11:09:14 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-06-03 11:09:14 +0100
commit8323478d5bd96cb1c00cd67da33f59a42965d9be (patch)
tree3d710fd5ec5b81c3e10d65a0c7208224dd23ae55 /extras/mini-os/include
parent44d374adc01fc7cd3e516d6475dc5e9ddedf928d (diff)
downloadxen-8323478d5bd96cb1c00cd67da33f59a42965d9be.tar.gz
xen-8323478d5bd96cb1c00cd67da33f59a42965d9be.tar.bz2
xen-8323478d5bd96cb1c00cd67da33f59a42965d9be.zip
minios: refactor xenbus state machine
Implement xenbus_wait_for_state_change and xenbus_switch_state and change the various frontends to use the two functions and do proper error checking. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/include')
-rw-r--r--extras/mini-os/include/xenbus.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/extras/mini-os/include/xenbus.h b/extras/mini-os/include/xenbus.h
index 30a1c08143..de618fcfa5 100644
--- a/extras/mini-os/include/xenbus.h
+++ b/extras/mini-os/include/xenbus.h
@@ -1,6 +1,8 @@
#ifndef XENBUS_H__
#define XENBUS_H__
+#include <xen/io/xenbus.h>
+
typedef unsigned long xenbus_transaction_t;
#define XBT_NIL ((xenbus_transaction_t)0)
@@ -27,6 +29,8 @@ extern struct wait_queue_head xenbus_watch_queue;
void xenbus_wait_for_watch(xenbus_event_queue *queue);
char **xenbus_wait_for_watch_return(xenbus_event_queue *queue);
char* xenbus_wait_for_value(const char *path, const char *value, xenbus_event_queue *queue);
+char *xenbus_wait_for_state_change(const char* path, XenbusState *state, xenbus_event_queue *queue);
+char *xenbus_switch_state(xenbus_transaction_t xbt, const char* path, XenbusState state);
/* When no token is provided, use a global queue. */
#define XENBUS_WATCH_PATH_TOKEN "xenbus_watch_path"