mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/libs/call: Avoid xc_memalign in netbsd and solaris backends
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>
This commit is contained in:
1 parent
139ff8ffc9
commit
bf8f8fdeb4
2 files changed
+3
-3
No files matched your search
@@ -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 )
|
||||
|
||||
@@ -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,
|
||||
|
||||