aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_evtchn.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_evtchn.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_evtchn.c')
-rw-r--r--tools/libxc/xc_evtchn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/libxc/xc_evtchn.c b/tools/libxc/xc_evtchn.c
index 8192a73c4b..8c795bce7a 100644
--- a/tools/libxc/xc_evtchn.c
+++ b/tools/libxc/xc_evtchn.c
@@ -18,16 +18,16 @@ static int do_evtchn_op(int xc_handle, int cmd, void *arg, size_t arg_size)
hypercall.arg[0] = cmd;
hypercall.arg[1] = (unsigned long)arg;
- if ( mlock(arg, arg_size) != 0 )
+ if ( lock_pages(arg, arg_size) != 0 )
{
- PERROR("do_evtchn_op: arg mlock failed");
+ PERROR("do_evtchn_op: arg lock failed");
goto out;
}
if ((ret = do_xen_hypercall(xc_handle, &hypercall)) < 0)
ERROR("do_evtchn_op: HYPERVISOR_event_channel_op failed: %d", ret);
- safe_munlock(arg, arg_size);
+ unlock_pages(arg, arg_size);
out:
return ret;
}