diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2011-10-06 19:38:01 +0100 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2011-10-06 19:38:01 +0100 |
commit | 399a74471de9f7525e84441c59aa9601133ba828 (patch) | |
tree | b62aa5d71814c09909c358c424ddb861c8f2db8e /tools/libxc/xc_private.c | |
parent | 1f5552006de96f879ea0bcf342dcf4d9b3b06354 (diff) | |
download | xen-399a74471de9f7525e84441c59aa9601133ba828.tar.gz xen-399a74471de9f7525e84441c59aa9601133ba828.tar.bz2 xen-399a74471de9f7525e84441c59aa9601133ba828.zip |
libxc: add xc_gntshr_* functions
These functions and the xc_gntshr device (/dev/xen/gntalloc on linux)
allow applications to create pages shared with other domains.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xc_private.c')
-rw-r--r-- | tools/libxc/xc_private.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c index 09c8f23ca5..09a91e75ad 100644 --- a/tools/libxc/xc_private.c +++ b/tools/libxc/xc_private.c @@ -258,6 +258,19 @@ int xc_gnttab_close(xc_gnttab *xcg) return xc_interface_close_common(xcg); } +xc_gntshr *xc_gntshr_open(xentoollog_logger *logger, + unsigned open_flags) +{ + return xc_interface_open_common(logger, NULL, open_flags, + XC_OSDEP_GNTSHR); +} + +int xc_gntshr_close(xc_gntshr *xcg) +{ + return xc_interface_close_common(xcg); +} + + static pthread_key_t errbuf_pkey; static pthread_once_t errbuf_pkey_once = PTHREAD_ONCE_INIT; |