o Convert a vm_page_sleep_busy() into a vm_page_sleep_if_busy()

with appropriate page queue locking.
This commit is contained in:
alc 2002-08-04 06:27:37 +00:00
parent 4d5c4f2b17
commit 1d175a3d83

View File

@ -103,7 +103,9 @@ vm_pgmoveco(mapa, srcobj, kaddr, uaddr)
return(EFAULT);
}
if ((user_pg = vm_page_lookup(uobject, upindex)) != NULL) {
vm_page_sleep_busy(user_pg, 1, "vm_pgmoveco");
vm_page_lock_queues();
if (!vm_page_sleep_if_busy(user_pg, 1, "vm_pgmoveco"))
vm_page_unlock_queues();
pmap_remove(map->pmap, uaddr, uaddr+PAGE_SIZE);
vm_page_lock_queues();
vm_page_busy(user_pg);