xenstorevar.h (214077) | xenstorevar.h (222975) |
---|---|
1/****************************************************************************** 2 * xenstorevar.h 3 * 4 * Method declarations and structures for accessing the XenStore.h 5 * 6 * Copyright (C) 2005 Rusty Russell, IBM Corporation 7 * Copyright (C) 2005 XenSource Ltd. 8 * Copyright (C) 2009,2010 Spectra Logic Corporation --- 14 unchanged lines hidden (view full) --- 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 * IN THE SOFTWARE. 30 * | 1/****************************************************************************** 2 * xenstorevar.h 3 * 4 * Method declarations and structures for accessing the XenStore.h 5 * 6 * Copyright (C) 2005 Rusty Russell, IBM Corporation 7 * Copyright (C) 2005 XenSource Ltd. 8 * Copyright (C) 2009,2010 Spectra Logic Corporation --- 14 unchanged lines hidden (view full) --- 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29 * IN THE SOFTWARE. 30 * |
31 * $FreeBSD: head/sys/xen/xenstore/xenstorevar.h 214077 2010-10-19 20:53:30Z gibbs $ | 31 * $FreeBSD: head/sys/xen/xenstore/xenstorevar.h 222975 2011-06-11 04:59:01Z gibbs $ |
32 */ 33 34#ifndef _XEN_XENSTORE_XENSTOREVAR_H 35#define _XEN_XENSTORE_XENSTOREVAR_H 36 37#include <sys/queue.h> 38#include <sys/bus.h> 39#include <sys/eventhandler.h> --- 11 unchanged lines hidden (view full) --- 51 52/* XenStore allocations including XenStore data returned to clients. */ 53MALLOC_DECLARE(M_XENSTORE); 54 55struct xenstore_domain_interface; 56struct xs_watch; 57extern struct xenstore_domain_interface *xen_store; 58 | 32 */ 33 34#ifndef _XEN_XENSTORE_XENSTOREVAR_H 35#define _XEN_XENSTORE_XENSTOREVAR_H 36 37#include <sys/queue.h> 38#include <sys/bus.h> 39#include <sys/eventhandler.h> --- 11 unchanged lines hidden (view full) --- 51 52/* XenStore allocations including XenStore data returned to clients. */ 53MALLOC_DECLARE(M_XENSTORE); 54 55struct xenstore_domain_interface; 56struct xs_watch; 57extern struct xenstore_domain_interface *xen_store; 58 |
59typedef void (xs_watch_cb_t)(struct xs_watch *, 60 const char **vec, unsigned int len); | 59typedef void (xs_watch_cb_t)(struct xs_watch *, const char **vec, 60 unsigned int len); |
61 62/* Register callback to watch subtree (node) in the XenStore. */ 63struct xs_watch 64{ 65 LIST_ENTRY(xs_watch) list; 66 67 /* Path being watched. */ 68 char *node; 69 70 /* Callback (executed in a process context with no locks held). */ 71 xs_watch_cb_t *callback; | 61 62/* Register callback to watch subtree (node) in the XenStore. */ 63struct xs_watch 64{ 65 LIST_ENTRY(xs_watch) list; 66 67 /* Path being watched. */ 68 char *node; 69 70 /* Callback (executed in a process context with no locks held). */ 71 xs_watch_cb_t *callback; |
72 73 /* Callback client data untouched by the XenStore watch mechanism. */ 74 uintptr_t callback_data; |
|
72}; 73LIST_HEAD(xs_watch_list, xs_watch); 74 75typedef int (*xs_event_handler_t)(void *); 76 77struct xs_transaction 78{ 79 uint32_t id; --- 216 unchanged lines hidden (view full) --- 296int xs_gather(struct xs_transaction t, const char *dir, ...); 297 298/** 299 * Register a XenStore watch. 300 * 301 * XenStore watches allow a client to be notified via a callback (embedded 302 * within the watch object) of changes to an object in the XenStore. 303 * | 75}; 76LIST_HEAD(xs_watch_list, xs_watch); 77 78typedef int (*xs_event_handler_t)(void *); 79 80struct xs_transaction 81{ 82 uint32_t id; --- 216 unchanged lines hidden (view full) --- 299int xs_gather(struct xs_transaction t, const char *dir, ...); 300 301/** 302 * Register a XenStore watch. 303 * 304 * XenStore watches allow a client to be notified via a callback (embedded 305 * within the watch object) of changes to an object in the XenStore. 306 * |
304 * \param watch A xenbus_watch struct with it's node and callback fields | 307 * \param watch An xs_watch struct with it's node and callback fields |
305 * properly initialized. 306 * 307 * \return On success, 0. Otherwise an errno value indicating the 308 * type of write failure. EEXIST errors from the XenStore 309 * are supressed, allowing multiple, physically different, 310 * xenbus_watch objects, to watch the same path in the XenStore. 311 */ 312int xs_register_watch(struct xs_watch *watch); --- 26 unchanged lines hidden --- | 308 * properly initialized. 309 * 310 * \return On success, 0. Otherwise an errno value indicating the 311 * type of write failure. EEXIST errors from the XenStore 312 * are supressed, allowing multiple, physically different, 313 * xenbus_watch objects, to watch the same path in the XenStore. 314 */ 315int xs_register_watch(struct xs_watch *watch); --- 26 unchanged lines hidden --- |