diff options
author | jhb <jhb@FreeBSD.org> | 2001-05-23 19:52:23 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-05-23 19:52:23 +0000 |
commit | a5ffebeaaae18bc6157357ecf47110e2a7438426 (patch) | |
tree | 13b7e9a4ed6237d08c4cedbcf5505ec440083821 /sys | |
parent | 719e9bc0bffe8a7eb80e359f9c43a28b7c65fd14 (diff) | |
download | FreeBSD-src-a5ffebeaaae18bc6157357ecf47110e2a7438426.zip FreeBSD-src-a5ffebeaaae18bc6157357ecf47110e2a7438426.tar.gz |
Set the phys_pager_alloc_lock to 1 when it is acquired so that it is
actually locked.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/phys_pager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index d34672b..b3355c7 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; |