diff options
Diffstat (limited to 'tools/libxc/xc_solaris.c')
| -rw-r--r-- | tools/libxc/xc_solaris.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c index b0155e1de4..40ee6f03ca 100644 --- a/tools/libxc/xc_solaris.c +++ b/tools/libxc/xc_solaris.c @@ -167,7 +167,7 @@ int do_xen_hypercall(xc_interface *xch, privcmd_hypercall_t *hypercall) (unsigned long)hypercall); } -int xc_evtchn_open(void) +int xc_evtchn_open_core(xc_evtchn *xce) { int fd; @@ -180,37 +180,37 @@ int xc_evtchn_open(void) return fd; } -int xc_evtchn_close(int xce_handle) +int xc_evtchn_close_core(xc_evtchn *xce) { - return close(xce_handle); + return close(xce->fd); } -int xc_evtchn_fd(int xce_handle) +int xc_evtchn_fd(xc_evtchn *xce) { - return xce_handle; + return xce->fd; } -int xc_evtchn_notify(int xce_handle, evtchn_port_t port) +int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port) { struct ioctl_evtchn_notify notify; notify.port = port; - return ioctl(xce_handle, IOCTL_EVTCHN_NOTIFY, ¬ify); + return ioctl(xce->fd, IOCTL_EVTCHN_NOTIFY, ¬ify); } evtchn_port_or_error_t -xc_evtchn_bind_unbound_port(int xce_handle, int domid) +xc_evtchn_bind_unbound_port(xc_evtchn *xce, int domid) { struct ioctl_evtchn_bind_unbound_port bind; bind.remote_domain = domid; - return ioctl(xce_handle, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind); + return ioctl(xce->fd, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind); } evtchn_port_or_error_t -xc_evtchn_bind_interdomain(int xce_handle, int domid, +xc_evtchn_bind_interdomain(xc_evtchn *xce, int domid, evtchn_port_t remote_port) { struct ioctl_evtchn_bind_interdomain bind; @@ -218,42 +218,42 @@ xc_evtchn_bind_interdomain(int xce_handle, int domid, bind.remote_domain = domid; bind.remote_port = remote_port; - return ioctl(xce_handle, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind); + return ioctl(xce->fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind); } evtchn_port_or_error_t -xc_evtchn_bind_virq(int xce_handle, unsigned int virq) +xc_evtchn_bind_virq(xc_evtchn *xce, unsigned int virq) { struct ioctl_evtchn_bind_virq bind; bind.virq = virq; - return ioctl(xce_handle, IOCTL_EVTCHN_BIND_VIRQ, &bind); + return ioctl(xce->fd, IOCTL_EVTCHN_BIND_VIRQ, &bind); } -int xc_evtchn_unbind(int xce_handle, evtchn_port_t port) +int xc_evtchn_unbind(xc_evtchn *xce, evtchn_port_t port) { struct ioctl_evtchn_unbind unbind; unbind.port = port; - return ioctl(xce_handle, IOCTL_EVTCHN_UNBIND, &unbind); + return ioctl(xce->fd, IOCTL_EVTCHN_UNBIND, &unbind); } evtchn_port_or_error_t -xc_evtchn_pending(int xce_handle) +xc_evtchn_pending(xc_evtchn *xce) { evtchn_port_t port; - if ( read_exact(xce_handle, (char *)&port, sizeof(port)) == -1 ) + if ( read_exact(xce->fd, (char *)&port, sizeof(port)) == -1 ) return -1; return port; } -int xc_evtchn_unmask(int xce_handle, evtchn_port_t port) +int xc_evtchn_unmask(xc_evtchn *xce, evtchn_port_t port) { - return write_exact(xce_handle, (char *)&port, sizeof(port)); + return write_exact(xce->fd, (char *)&port, sizeof(port)); } /* Optionally flush file to disk and discard page cache */ |
