Replace mlock() calls with lock_pages().

Signed-off-by: Russell Blaine <russell.blaine@sun.com>
This commit is contained in:
kaf24@localhost.localdomain committed 2007-01-26 13:31:59 +00:00
1 parent 15fa409662
commit aacbdffaf8
1 file changed
+9 -9
+9 -9
View File
@@ -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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.