diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2006-11-29 14:16:36 -0600 |
---|---|---|
committer | Hollis Blanchard <hollisb@us.ibm.com> | 2006-11-29 14:16:36 -0600 |
commit | ab26a6a563a0acb589af87a8e063c0e171d75665 (patch) | |
tree | 71a432bde5d016e928ab3ad7860fca01312ec787 /tools/libxc/xc_tbuf.c | |
parent | d3be8a6ca1aa9312cc01e780a2fea56ab8ec12b4 (diff) | |
parent | 1c804664cf63f0c2e80d0420e52d5f82c3956685 (diff) | |
download | xen-ab26a6a563a0acb589af87a8e063c0e171d75665.tar.gz xen-ab26a6a563a0acb589af87a8e063c0e171d75665.tar.bz2 xen-ab26a6a563a0acb589af87a8e063c0e171d75665.zip |
Merge with xen-unstable.hg.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Diffstat (limited to 'tools/libxc/xc_tbuf.c')
-rw-r--r-- | tools/libxc/xc_tbuf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libxc/xc_tbuf.c b/tools/libxc/xc_tbuf.c index 13614f0f8a..920c5b5abd 100644 --- a/tools/libxc/xc_tbuf.c +++ b/tools/libxc/xc_tbuf.c @@ -57,7 +57,7 @@ int xc_tbuf_get_size(int xc_handle, unsigned long *size) return rc; } -int xc_tbuf_enable(int xc_handle, size_t cnt, unsigned long *mfn, +int xc_tbuf_enable(int xc_handle, unsigned long pages, unsigned long *mfn, unsigned long *size) { DECLARE_SYSCTL; @@ -68,7 +68,7 @@ int xc_tbuf_enable(int xc_handle, size_t cnt, unsigned long *mfn, * set (since trace buffers cannot be reallocated). If we really have no * buffers at all then tbuf_enable() will fail, so this is safe. */ - (void)xc_tbuf_set_size(xc_handle, cnt); + (void)xc_tbuf_set_size(xc_handle, pages); if ( tbuf_enable(xc_handle, 1) != 0 ) return -1; @@ -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; |