aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_evtchn.c
diff options
context:
space:
mode:
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-10-22 15:51:39 +0000
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-10-22 15:51:39 +0000
commit6f46072ed02afb1fa6c9b2d72231b27e9b776958 (patch)
treeb52e67f5d354c277458a79bec882b148251a8598 /tools/libxc/xc_evtchn.c
parentb9d51015ab983c8ce436fb170461c88ae1507756 (diff)
downloadxen-6f46072ed02afb1fa6c9b2d72231b27e9b776958.tar.gz
xen-6f46072ed02afb1fa6c9b2d72231b27e9b776958.tar.bz2
xen-6f46072ed02afb1fa6c9b2d72231b27e9b776958.zip
bitkeeper revision 1.1159.130.1 (41792c8bfIrnaq8cezNM7nbYpseVFQ)
Extend Xen's evtchn interface.
Diffstat (limited to 'tools/libxc/xc_evtchn.c')
-rw-r--r--tools/libxc/xc_evtchn.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/tools/libxc/xc_evtchn.c b/tools/libxc/xc_evtchn.c
index 52f7377467..2f78ef7936 100644
--- a/tools/libxc/xc_evtchn.c
+++ b/tools/libxc/xc_evtchn.c
@@ -31,6 +31,26 @@ static int do_evtchn_op(int xc_handle, evtchn_op_t *op)
}
+int xc_evtchn_alloc_unbound(int xc_handle,
+ u32 dom,
+ int *port)
+{
+ evtchn_op_t op;
+ int rc;
+
+ op.cmd = EVTCHNOP_alloc_unbound;
+ op.u.alloc_unbound.dom = (domid_t)dom;
+
+ if ( (rc = do_evtchn_op(xc_handle, &op)) == 0 )
+ {
+ if ( port != NULL )
+ *port = op.u.alloc_unbound.port;
+ }
+
+ return rc;
+}
+
+
int xc_evtchn_bind_interdomain(int xc_handle,
u32 dom1,
u32 dom2,
@@ -41,9 +61,12 @@ int xc_evtchn_bind_interdomain(int xc_handle,
int rc;
op.cmd = EVTCHNOP_bind_interdomain;
- op.u.bind_interdomain.dom1 = (domid_t)dom1;
- op.u.bind_interdomain.dom2 = (domid_t)dom2;
-
+ op.u.bind_interdomain.dom1 = (domid_t)dom1;
+ op.u.bind_interdomain.dom2 = (domid_t)dom2;
+ op.u.bind_interdomain.port1 = (port1 != NULL) ? *port1 : 0;
+ op.u.bind_interdomain.port2 = (port2 != NULL) ? *port2 : 0;
+
+
if ( (rc = do_evtchn_op(xc_handle, &op)) == 0 )
{
if ( port1 != NULL )