diff options
| author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-16 02:17:56 +0200 |
|---|---|---|
| committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-20 18:59:44 +0200 |
| commit | 156c7dd3bf3e3d1be41a992b61408cf1d82e95f1 (patch) | |
| tree | 38c61ef1ce40792dfca13689ae4e637f6f4e30ca | |
| parent | b46167a5677fae017e7baeb85beea303115a8582 (diff) | |
yyy vm: turn page queue lock into a general lock
| -rw-r--r-- | vm/vm_page.h | 7 | ||||
| -rw-r--r-- | vm/vm_resident.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/vm/vm_page.h b/vm/vm_page.h index e6a8c49..90599a1 100644 --- a/vm/vm_page.h +++ b/vm/vm_page.h @@ -180,8 +180,7 @@ int vm_page_external_count; /* How many pages for external objects? */ -decl_simple_lock_data(extern,vm_page_queue_lock)/* lock on active and inactive - page queues */ +struct lock vm_page_queue_lock; /* lock on active and inactive page queues */ decl_simple_lock_data(extern,vm_page_queue_free_lock) /* lock on free page queue */ @@ -292,8 +291,8 @@ extern unsigned int vm_page_info( #define VM_PAGE_WAIT(continuation) vm_page_wait(continuation) -#define vm_page_lock_queues() simple_lock(&vm_page_queue_lock) -#define vm_page_unlock_queues() simple_unlock(&vm_page_queue_lock) +#define vm_page_lock_queues() lock_write(&vm_page_queue_lock) +#define vm_page_unlock_queues() lock_write_done(&vm_page_queue_lock) #define VM_PAGE_QUEUES_REMOVE(mem) \ MACRO_BEGIN \ diff --git a/vm/vm_resident.c b/vm/vm_resident.c index c70fa73..427c8f5 100644 --- a/vm/vm_resident.c +++ b/vm/vm_resident.c @@ -147,7 +147,7 @@ vm_offset_t vm_page_fictitious_addr = (vm_offset_t) -1; */ queue_head_t vm_page_queue_active; queue_head_t vm_page_queue_inactive; -decl_simple_lock_data(,vm_page_queue_lock) +struct lock vm_page_queue_lock; int vm_page_active_count; int vm_page_inactive_count; int vm_page_wire_count; @@ -231,7 +231,7 @@ void vm_page_bootstrap( */ simple_lock_init(&vm_page_queue_free_lock); - simple_lock_init(&vm_page_queue_lock); + lock_init(&vm_page_queue_lock, FALSE); vm_page_queue_free = VM_PAGE_NULL; vm_page_queue_fictitious = VM_PAGE_NULL; |
