direct-io.hg

diff tools/libxc/xenctrl.h @ 10355:7fba181c8531

[TOOLS] Introduce xc_evtchn_*() interface for interacting with /dev/xen/evtchn.
No longer open the device as non-blocking: all reads immediately follow
a select() on the device indicating it's ready to read.

Signed-off-by: John Levon <john.levon@sun.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 15 13:11:31 2006 +0100 (2006-06-15)
parents b3d901ba705d
children 12aaf4a2486b
line diff
     1.1 --- a/tools/libxc/xenctrl.h	Thu Jun 15 11:52:23 2006 +0100
     1.2 +++ b/tools/libxc/xenctrl.h	Thu Jun 15 13:11:31 2006 +0100
     1.3 @@ -604,4 +604,58 @@ int xc_finish_mmu_updates(int xc_handle,
     1.4  
     1.5  int xc_acm_op(int xc_handle, int cmd, void *arg, size_t arg_size);
     1.6  
     1.7 +/*
     1.8 + * Return a handle to the event channel driver, or -1 on failure, in which case
     1.9 + * errno will be set appropriately.
    1.10 + */
    1.11 +int xc_evtchn_open(void);
    1.12 +
    1.13 +/*
    1.14 + * Close a handle previously allocated with xc_evtchn_open().
    1.15 + */
    1.16 +int xc_evtchn_close(int xce_handle);
    1.17 +
    1.18 +/*
    1.19 + * Return an fd that can be select()ed on for further calls to
    1.20 + * xc_evtchn_pending().
    1.21 + */
    1.22 +int xc_evtchn_fd(int xce_handle);
    1.23 +
    1.24 +/*
    1.25 + * Notify the given event channel. Returns -1 on failure, in which case
    1.26 + * errno will be set appropriately.
    1.27 + */
    1.28 +int xc_evtchn_notify(int xce_handle, evtchn_port_t port);
    1.29 +
    1.30 +/*
    1.31 + * Returns a new event port bound to the remote port for the given domain ID,
    1.32 + * or -1 on failure, in which case errno will be set appropriately.
    1.33 + */
    1.34 +evtchn_port_t xc_evtchn_bind_interdomain(int xce_handle, int domid,
    1.35 +    evtchn_port_t remote_port);
    1.36 +
    1.37 +/*
    1.38 + * Unbind the given event channel. Returns -1 on failure, in which case errno
    1.39 + * will be set appropriately.
    1.40 + */
    1.41 +int xc_evtchn_unbind(int xce_handle, evtchn_port_t port);
    1.42 +
    1.43 +/*
    1.44 + * Bind an event channel to the given VIRQ. Returns the event channel bound to
    1.45 + * the VIRQ, or -1 on failure, in which case errno will be set appropriately.
    1.46 + */
    1.47 +evtchn_port_t xc_evtchn_bind_virq(int xce_handle, unsigned int virq);
    1.48 +
    1.49 +/*
    1.50 + * Return the next event channel to become pending, or -1 on failure, in which
    1.51 + * case errno will be set appropriately.  
    1.52 + */
    1.53 +evtchn_port_t xc_evtchn_pending(int xce_handle);
    1.54 +
    1.55 +/*
    1.56 + * Unmask the given event channel. Returns -1 on failure, in which case errno
    1.57 + * will be set appropriately.
    1.58 + */
    1.59 +int xc_evtchn_unmask(int xce_handle, evtchn_port_t port);
    1.60 +
    1.61  #endif