WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Replace mlock() calls with lock_pages().

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Replace mlock() calls with lock_pages().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 27 Jan 2007 13:00:13 -0800
Delivery-date: Sat, 27 Jan 2007 13:00:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxxx
# Date 1169818319 0
# Node ID 16f7f5ac80ed601f06b0b2b3b2ec8472dd5aa0e2
# Parent  e0291e3ed603f5437d1e88c7b746b6617346792c
Replace mlock() calls with lock_pages().
Signed-off-by: Russell Blaine <russell.blaine@xxxxxxx>
---
 tools/libxc/xc_misc.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff -r e0291e3ed603 -r 16f7f5ac80ed tools/libxc/xc_misc.c
--- a/tools/libxc/xc_misc.c     Fri Jan 26 13:27:01 2007 +0000
+++ b/tools/libxc/xc_misc.c     Fri Jan 26 13:31:59 2007 +0000
@@ -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;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Replace mlock() calls with lock_pages()., Xen patchbot-unstable <=