aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_tbuf.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-23 09:52:51 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-23 09:52:51 +0100
commita3fc4d842ee8ff9de41a234d0dfc4252ea3f19ec (patch)
tree206b826018b807ed533391714457157a1b11d888 /tools/libxc/xc_tbuf.c
parent7aae32885d19d76db269b7231a313d3c91a1e10a (diff)
downloadxen-a3fc4d842ee8ff9de41a234d0dfc4252ea3f19ec.tar.gz
xen-a3fc4d842ee8ff9de41a234d0dfc4252ea3f19ec.tar.bz2
xen-a3fc4d842ee8ff9de41a234d0dfc4252ea3f19ec.zip
[SOLARIS] Don't mlock() hypercall buffers.
On solaris mlock requires a page aligned address and mlock doesn't ensure the pages won't minor page fault. Signed-off-by: Mark Johnson <mark.johnson@sun.com>
Diffstat (limited to 'tools/libxc/xc_tbuf.c')
-rw-r--r--tools/libxc/xc_tbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxc/xc_tbuf.c b/tools/libxc/xc_tbuf.c
index 13614f0f8a..a30d1fb1fc 100644
--- a/tools/libxc/xc_tbuf.c
+++ b/tools/libxc/xc_tbuf.c
@@ -104,7 +104,7 @@ int xc_tbuf_set_cpu_mask(int xc_handle, uint32_t mask)
set_xen_guest_handle(sysctl.u.tbuf_op.cpu_mask.bitmap, (uint8_t *)&mask);
sysctl.u.tbuf_op.cpu_mask.nr_cpus = sizeof(mask) * 8;
- if ( mlock(&mask, sizeof(mask)) != 0 )
+ if ( lock_pages(&mask, sizeof(mask)) != 0 )
{
PERROR("Could not lock memory for Xen hypercall");
goto out;
@@ -112,7 +112,7 @@ int xc_tbuf_set_cpu_mask(int xc_handle, uint32_t mask)
ret = do_sysctl(xc_handle, &sysctl);
- safe_munlock(&mask, sizeof(mask));
+ unlock_pages(&mask, sizeof(mask));
out:
return ret;