]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
tools/libs/call: Avoid xc_memalign in netbsd and solaris backends
authorIan Campbell <ian.campbell@citrix.com>
Tue, 22 Sep 2015 11:40:51 +0000 (12:40 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 22 Jan 2016 12:24:21 +0000 (12:24 +0000)
These are already arch specific, so just use the appropriate
interfaces (as determined by looking at the xc_memalign backend).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libs/call/netbsd.c
tools/libs/call/solaris.c

index 2aa02f14a835d493da74e2e7b5b2481677c8f811..e96fbf16f7e11652e41543ee6000e491c1e7c56f 100644 (file)
@@ -74,8 +74,8 @@ void *osdep_alloc_hypercall_buffer(xencall_handle *xcall, size_t npages)
     size_t size = npages * XC_PAGE_SIZE;
     void *p;
 
-    p = xc_memalign(xcall, XC_PAGE_SIZE, size);
-    if (!p)
+    ret = posix_memalign(&p, XC_PAGE_SIZE, size);
+    if ( ret != 0 || !p )
         return NULL;
 
     if ( mlock(p, size) < 0 )
index 945d8673ac3047238c81d9d788cd6cdad471256f..5aa330e4ebff75302260a6695a0ae7315989b7f7 100644 (file)
@@ -71,7 +71,7 @@ int osdep_xencall_close(xencall_handle *xcall)
 
 void *osdep_alloc_hypercall_buffer(xencall_handle *xcall, size_t npages)
 {
-    return xc_memalign(xcall, XC_PAGE_SIZE, npages * XC_PAGE_SIZE);
+    return memalign(XC_PAGE_SIZE, npages * XC_PAGE_SIZE);
 }
 
 void osdep_free_hypercall_buffer(xencall_handle *xcall, void *ptr,