diff options
author | kaf24@localhost.localdomain <kaf24@localhost.localdomain> | 2007-01-26 13:31:59 +0000 |
---|---|---|
committer | kaf24@localhost.localdomain <kaf24@localhost.localdomain> | 2007-01-26 13:31:59 +0000 |
commit | aacbdffaf8d19408facb5e8213bb7af8e22f3136 (patch) | |
tree | e6303a16a12c93bbb158022ee9f5b012f6f4e36f /tools/libxc/xc_misc.c | |
parent | 15fa409662234cce30c965b5f2fb2dc5ae97521e (diff) | |
download | xen-aacbdffaf8d19408facb5e8213bb7af8e22f3136.tar.gz xen-aacbdffaf8d19408facb5e8213bb7af8e22f3136.tar.bz2 xen-aacbdffaf8d19408facb5e8213bb7af8e22f3136.zip |
Replace mlock() calls with lock_pages().
Signed-off-by: Russell Blaine <russell.blaine@sun.com>
Diffstat (limited to 'tools/libxc/xc_misc.c')
-rw-r--r-- | tools/libxc/xc_misc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c index 216dff94f8..b2a648528a 100644 --- a/tools/libxc/xc_misc.c +++ b/tools/libxc/xc_misc.c @@ -110,15 +110,15 @@ int xc_hvm_set_pci_intx_level( arg.intx = intx; arg.level = level; - if ( mlock(&arg, sizeof(arg)) != 0 ) + if ( (rc = lock_pages(&arg, sizeof(arg))) != 0 ) { PERROR("Could not lock memory"); - return -1; + return rc; } rc = do_xen_hypercall(xc_handle, &hypercall); - safe_munlock(&arg, sizeof(arg)); + unlock_pages(&arg, sizeof(arg)); return rc; } @@ -140,15 +140,15 @@ int xc_hvm_set_isa_irq_level( arg.isa_irq = isa_irq; arg.level = level; - if ( mlock(&arg, sizeof(arg)) != 0 ) + if ( (rc = lock_pages(&arg, sizeof(arg))) != 0 ) { PERROR("Could not lock memory"); - return -1; + return rc; } rc = do_xen_hypercall(xc_handle, &hypercall); - safe_munlock(&arg, sizeof(arg)); + unlock_pages(&arg, sizeof(arg)); return rc; } @@ -168,15 +168,15 @@ int xc_hvm_set_pci_link_route( arg.link = link; arg.isa_irq = isa_irq; - if ( mlock(&arg, sizeof(arg)) != 0 ) + if ( (rc = lock_pages(&arg, sizeof(arg))) != 0 ) { PERROR("Could not lock memory"); - return -1; + return rc; } rc = do_xen_hypercall(xc_handle, &hypercall); - safe_munlock(&arg, sizeof(arg)); + unlock_pages(&arg, sizeof(arg)); return rc; } |