diff options
author | jake <jake@FreeBSD.org> | 2001-07-31 04:03:53 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2001-07-31 04:03:53 +0000 |
commit | 2c20bb4e7b91ede8ffbf678ec91a6a634cdaff07 (patch) | |
tree | 5fc2f36353e6b7408e91f89f94fabe3f66617e7e | |
parent | 7abfb73d23676dff0e85c761b72112196601796b (diff) | |
download | FreeBSD-src-2c20bb4e7b91ede8ffbf678ec91a6a634cdaff07.zip FreeBSD-src-2c20bb4e7b91ede8ffbf678ec91a6a634cdaff07.tar.gz |
Remove the use of atomic ops to manipulate vm_object and vm_page flags.
Giant is required here, so they are superfluous.
Discussed with: dillon
-rw-r--r-- | sys/vm/vm_object.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 995fdc6..fe7e8c6 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -219,40 +219,35 @@ void vm_object_set_flag(vm_object_t object, u_short bits) { GIANT_REQUIRED; - atomic_set_short(&object->flags, bits); - /* object->flags |= bits; */ + object->flags |= bits; } void vm_object_clear_flag(vm_object_t object, u_short bits) { GIANT_REQUIRED; - atomic_clear_short(&object->flags, bits); - /* object->flags &= ~bits; */ + object->flags &= ~bits; } void vm_object_pip_add(vm_object_t object, short i) { GIANT_REQUIRED; - atomic_add_short(&object->paging_in_progress, i); - /* object->paging_in_progress += i; */ + object->paging_in_progress += i; } void vm_object_pip_subtract(vm_object_t object, short i) { GIANT_REQUIRED; - atomic_subtract_short(&object->paging_in_progress, i); - /* object->paging_in_progress -= i; */ + object->paging_in_progress -= i; } void vm_object_pip_wakeup(vm_object_t object) { GIANT_REQUIRED; - atomic_subtract_short(&object->paging_in_progress, 1); - /* object->paging_in_progress--; */ + object->paging_in_progress--; if ((object->flags & OBJ_PIPWNT) && object->paging_in_progress == 0) { vm_object_clear_flag(object, OBJ_PIPWNT); wakeup(object); @@ -264,7 +259,7 @@ vm_object_pip_wakeupn(vm_object_t object, short i) { GIANT_REQUIRED; if (i) - atomic_subtract_short(&object->paging_in_progress, i); + object->paging_in_progress -= i; if ((object->flags & OBJ_PIPWNT) && object->paging_in_progress == 0) { vm_object_clear_flag(object, OBJ_PIPWNT); wakeup(object); |