From c52f090cfba006e670e9a6b85f0eb6fd580b8473 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 23 May 2001 19:52:23 +0000 Subject: [PATCH] Set the phys_pager_alloc_lock to 1 when it is acquired so that it is actually locked. --- sys/vm/phys_pager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index d34672b29e53..b3355c7f5eee 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -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;