[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxc: osdep: convert xc_evtchn_fd()
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1291369007 0 # Node ID 935755b3b2311e88acfe7a94a02cb25cfda4ff23 # Parent 70884d5a273d23757412e82fa69077c8dbf4d90f libxc: osdep: convert xc_evtchn_fd() Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Signed-off-by: Ian Jackson <ian.jackson.citrix.com> --- tools/libxc/xc_evtchn.c | 5 +++++ tools/libxc/xc_linux.c | 10 +++++++--- tools/libxc/xc_minios.c | 10 +++++++--- tools/libxc/xc_netbsd.c | 10 +++++++--- tools/libxc/xc_solaris.c | 10 +++++++--- tools/libxc/xenctrlosdep.h | 3 +++ 6 files changed, 36 insertions(+), 12 deletions(-) diff -r 70884d5a273d -r 935755b3b231 tools/libxc/xc_evtchn.c --- a/tools/libxc/xc_evtchn.c Fri Dec 03 09:36:47 2010 +0000 +++ b/tools/libxc/xc_evtchn.c Fri Dec 03 09:36:47 2010 +0000 @@ -77,3 +77,8 @@ int xc_evtchn_status(xc_interface *xch, return do_evtchn_op(xch, EVTCHNOP_status, status, sizeof(*status), 1); } + +int xc_evtchn_fd(xc_evtchn *xce) +{ + return xce->ops->u.evtchn.fd(xce, xce->ops_handle); +} diff -r 70884d5a273d -r 935755b3b231 tools/libxc/xc_linux.c --- a/tools/libxc/xc_linux.c Fri Dec 03 09:36:47 2010 +0000 +++ b/tools/libxc/xc_linux.c Fri Dec 03 09:36:47 2010 +0000 @@ -360,9 +360,9 @@ static int linux_evtchn_close(xc_evtchn return close(fd); } -int xc_evtchn_fd(xc_evtchn *xce) -{ - return xce->fd; +static int linux_evtchn_fd(xc_evtchn *xce, xc_osdep_handle h) +{ + return (int)h; } int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port) @@ -434,6 +434,10 @@ static struct xc_osdep_ops linux_evtchn_ static struct xc_osdep_ops linux_evtchn_ops = { .open = &linux_evtchn_open, .close = &linux_evtchn_close, + + .u.evtchn = { + .fd = &linux_evtchn_fd, + }, }; /* Optionally flush file to disk and discard page cache */ diff -r 70884d5a273d -r 935755b3b231 tools/libxc/xc_minios.c --- a/tools/libxc/xc_minios.c Fri Dec 03 09:36:47 2010 +0000 +++ b/tools/libxc/xc_minios.c Fri Dec 03 09:36:47 2010 +0000 @@ -226,9 +226,9 @@ void minios_evtchn_close_fd(int fd) files[fd].type = FTYPE_NONE; } -int xc_evtchn_fd(xc_evtchn *xce) -{ - return xce->fd; +static int minios_evtchn_fd(xc_evtchn *xce, xc_osdep_handle h) +{ + return (int)h; } int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port) @@ -400,6 +400,10 @@ static struct xc_osdep_ops minios_evtchn static struct xc_osdep_ops minios_evtchn_ops = { .open = &minios_evtchn_open, .close = &minios_evtchn_close, + + .u.evtchn = { + .fd = &minios_evtchn_fd, + }, }; /* Optionally flush file to disk and discard page cache */ diff -r 70884d5a273d -r 935755b3b231 tools/libxc/xc_netbsd.c --- a/tools/libxc/xc_netbsd.c Fri Dec 03 09:36:47 2010 +0000 +++ b/tools/libxc/xc_netbsd.c Fri Dec 03 09:36:47 2010 +0000 @@ -210,9 +210,9 @@ static int netbsd_evtchn_close(xc_evtchn return close(fd); } -int xc_evtchn_fd(xc_evtchn *xce) -{ - return xce->fd; +static int netbsd_evtchn_fd(xc_evtchn *xce, xc_osdep_handle h) +{ + return (int)h; } int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port) @@ -299,6 +299,10 @@ static struct xc_osdep_ops netbsd_evtchn static struct xc_osdep_ops netbsd_evtchn_ops = { .open = &netbsd_evtchn_open, .close = &netbsd_evtchn_close, + + .u.evtchn = { + .fd = &netbsd_evtchn_fd, + }, }; /* Optionally flush file to disk and discard page cache */ diff -r 70884d5a273d -r 935755b3b231 tools/libxc/xc_solaris.c --- a/tools/libxc/xc_solaris.c Fri Dec 03 09:36:47 2010 +0000 +++ b/tools/libxc/xc_solaris.c Fri Dec 03 09:36:47 2010 +0000 @@ -202,9 +202,9 @@ static int solaris_evtchn_close(xc_evtch return close(fd); } -int xc_evtchn_fd(xc_evtchn *xce) -{ - return xce->fd; +static int solaris_evtchn_fd(xc_evtchn *xce, xc_osdep_handle h) +{ + return (int)h; } int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port) @@ -276,6 +276,10 @@ static struct xc_osdep_ops solaris_evtch static struct xc_osdep_ops solaris_evtchn_ops = { .open = &solaris_evtchn_open, .close = &solaris_evtchn_close, + + .u.evtchn = { + .fd = &solaris_evtchn_fd, + }, }; /* Optionally flush file to disk and discard page cache */ diff -r 70884d5a273d -r 935755b3b231 tools/libxc/xenctrlosdep.h --- a/tools/libxc/xenctrlosdep.h Fri Dec 03 09:36:47 2010 +0000 +++ b/tools/libxc/xenctrlosdep.h Fri Dec 03 09:36:47 2010 +0000 @@ -74,6 +74,9 @@ struct xc_osdep_ops size_t chunksize, privcmd_mmap_entry_t entries[], int nentries); } privcmd; + struct { + int (*fd)(xc_evtchn *xce, xc_osdep_handle h); + } evtchn; } u; }; typedef struct xc_osdep_ops xc_osdep_ops; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |