xenbus.h
来自「xen 3.2.2 源码」· C头文件 代码 · 共 56 行
H
56 行
#ifndef XENBUS_H__#define XENBUS_H__typedef unsigned long xenbus_transaction_t;#define XBT_NIL ((xenbus_transaction_t)0)/* Initialize the XenBus system. */void init_xenbus(void);/* Read the value associated with a path. Returns a malloc'd error string on failure and sets *value to NULL. On success, *value is set to a malloc'd copy of the value. */char *xenbus_read(xenbus_transaction_t xbt, const char *path, char **value);char *xenbus_watch_path(xenbus_transaction_t xbt, const char *path);void wait_for_watch(void);char* xenbus_wait_for_value(const char*,const char*);/* Associates a value with a path. Returns a malloc'd error string on failure. */char *xenbus_write(xenbus_transaction_t xbt, const char *path, const char *value);/* Removes the value associated with a path. Returns a malloc'd error string on failure. */char *xenbus_rm(xenbus_transaction_t xbt, const char *path);/* List the contents of a directory. Returns a malloc'd error string on failure and sets *contents to NULL. On success, *contents is set to a malloc'd array of pointers to malloc'd strings. The array is NULL terminated. May block. */char *xenbus_ls(xenbus_transaction_t xbt, const char *prefix, char ***contents);/* Reads permissions associated with a path. Returns a malloc'd error string on failure and sets *value to NULL. On success, *value is set to a malloc'd copy of the value. */char *xenbus_get_perms(xenbus_transaction_t xbt, const char *path, char **value);/* Sets the permissions associated with a path. Returns a malloc'd error string on failure. */char *xenbus_set_perms(xenbus_transaction_t xbt, const char *path, domid_t dom, char perm);/* Start a xenbus transaction. Returns the transaction in xbt on success or a malloc'd error string otherwise. */char *xenbus_transaction_start(xenbus_transaction_t *xbt);/* End a xenbus transaction. Returns a malloc'd error string if it fails. abort says whether the transaction should be aborted. Returns 1 in *retry iff the transaction should be retried. */char *xenbus_transaction_end(xenbus_transaction_t, int abort, int *retry);/* Read path and parse it as an integer. Returns -1 on error. */int xenbus_read_integer(char *path);#endif /* XENBUS_H__ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?