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:
Ian Campbell committed 2016-01-22 12:24:21 +00:00
1 parent 139ff8ffc9
commit bf8f8fdeb4
2 files changed
+3 -3

No files matched your search

+2 -2
View 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 )
+1 -1
View 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,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.