ia64/xen-unstable

view extras/mini-os/include/xenbus.h @ 13878:9d103e5fd471

[XEN] Fix typos in comment describing 32on64 memory layout

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Thu Feb 08 12:33:32 2007 +0000 (2007-02-08)
parents 1fc8fb8ea425
children f40079acf646
line source
1 #ifndef XENBUS_H__
2 #define XENBUS_H__
4 typedef unsigned long xenbus_transaction_t;
5 #define XBT_NIL ((xenbus_transaction_t)0)
7 /* Initialize the XenBus system. */
8 void init_xenbus(void);
10 /* Read the value associated with a path. Returns a malloc'd error
11 string on failure and sets *value to NULL. On success, *value is
12 set to a malloc'd copy of the value. */
13 char *xenbus_read(xenbus_transaction_t xbt, const char *path, char **value);
15 char *xenbus_watch_path(xenbus_transaction_t xbt, const char *path);
16 char* xenbus_wait_for_value(const char*,const char*);
18 /* Associates a value with a path. Returns a malloc'd error string on
19 failure. */
20 char *xenbus_write(xenbus_transaction_t xbt, const char *path, const char *value);
22 /* Removes the value associated with a path. Returns a malloc'd error
23 string on failure. */
24 char *xenbus_rm(xenbus_transaction_t xbt, const char *path);
26 /* List the contents of a directory. Returns a malloc'd error string
27 on failure and sets *contents to NULL. On success, *contents is
28 set to a malloc'd array of pointers to malloc'd strings. The array
29 is NULL terminated. May block. */
30 char *xenbus_ls(xenbus_transaction_t xbt, const char *prefix, char ***contents);
32 /* Reads permissions associated with a path. Returns a malloc'd error
33 string on failure and sets *value to NULL. On success, *value is
34 set to a malloc'd copy of the value. */
35 char *xenbus_get_perms(xenbus_transaction_t xbt, const char *path, char **value);
37 /* Sets the permissions associated with a path. Returns a malloc'd
38 error string on failure. */
39 char *xenbus_set_perms(xenbus_transaction_t xbt, const char *path, domid_t dom, char perm);
41 /* Start a xenbus transaction. Returns the transaction in xbt on
42 success or a malloc'd error string otherwise. */
43 char *xenbus_transaction_start(xenbus_transaction_t *xbt);
45 /* End a xenbus transaction. Returns a malloc'd error string if it
46 fails. abort says whether the transaction should be aborted.
47 Returns 1 in *retry iff the transaction should be retried. */
48 char *xenbus_transaction_end(xenbus_transaction_t, int abort,
49 int *retry);
51 /* Read path and parse it as an integer. Returns -1 on error. */
52 int xenbus_read_integer(char *path);
54 #endif /* XENBUS_H__ */