Set the phys_pager_alloc_lock to 1 when it is acquired so that it is

actually locked.
This commit is contained in:
John Baldwin 2001-05-23 19:52:23 +00:00
parent 5bd57bc8b7
commit c52f090cfb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77062

View File

@ -78,6 +78,7 @@ phys_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
phys_pager_alloc_lock = -1;
msleep(&phys_pager_alloc_lock, &vm_mtx, PVM, "swpalc", 0);
}
phys_pager_alloc_lock = 1;
/*
* Look up pager, creating as necessary.
@ -102,7 +103,7 @@ phys_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
if (OFF_TO_IDX(foff + size) > object->size)
object->size = OFF_TO_IDX(foff + size);
}
if (phys_pager_alloc_lock)
if (phys_pager_alloc_lock == -1)
wakeup(&phys_pager_alloc_lock);
phys_pager_alloc_lock = 0;