diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-12 01:26:11 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-11-12 01:26:11 +0000 |
commit | 6f622671e86434b2fa80299a0e9545fb83b45ca7 (patch) | |
tree | e7659c198c13ca9b253eef13911915a894742434 /sys/uvm/uvm_page.h | |
parent | 1cf132e0e8e9b2b0914a758674d9861559da7781 (diff) |
Bring in more changes from NetBSD. Mostly pagedaemon improvements.
Diffstat (limited to 'sys/uvm/uvm_page.h')
-rw-r--r-- | sys/uvm/uvm_page.h | 63 |
1 files changed, 2 insertions, 61 deletions
diff --git a/sys/uvm/uvm_page.h b/sys/uvm/uvm_page.h index aa5991137c2..9d3f67513ca 100644 --- a/sys/uvm/uvm_page.h +++ b/sys/uvm/uvm_page.h @@ -1,5 +1,5 @@ -/* $OpenBSD: uvm_page.h,v 1.12 2001/11/10 18:42:31 art Exp $ */ -/* $NetBSD: uvm_page.h,v 1.18 2000/11/27 08:40:05 chs Exp $ */ +/* $OpenBSD: uvm_page.h,v 1.13 2001/11/12 01:26:09 art Exp $ */ +/* $NetBSD: uvm_page.h,v 1.19 2000/12/28 08:24:55 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -412,65 +412,6 @@ PHYS_TO_VM_PAGE(pa) #define VM_PAGE_IS_FREE(entry) ((entry)->pqflags & PQ_FREE) -extern -simple_lock_data_t vm_page_queue_lock; /* lock on active and inactive - page queues */ -extern /* lock on free page queue */ -simple_lock_data_t vm_page_queue_free_lock; - -#define PAGE_ASSERT_WAIT(m, interruptible) { \ - (m)->flags |= PG_WANTED; \ - assert_wait((m), (interruptible)); \ - } - -#define PAGE_WAKEUP(m) { \ - (m)->flags &= ~PG_BUSY; \ - if ((m)->flags & PG_WANTED) { \ - (m)->flags &= ~PG_WANTED; \ - wakeup((m)); \ - } \ - } - -#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_set_modified(m) { (m)->flags &= ~PG_CLEAN; } - -#define VM_PAGE_INIT(mem, obj, offset) { \ - (mem)->flags = PG_BUSY | PG_CLEAN | PG_FAKE; \ - if (obj) \ - vm_page_insert((mem), (obj), (offset)); \ - else \ - (mem)->object = NULL; \ - (mem)->wire_count = 0; \ -} - -#if VM_PAGE_DEBUG - -/* - * VM_PAGE_CHECK: debugging check of a vm_page structure - */ -static __inline void -VM_PAGE_CHECK(mem) - struct vm_page *mem; -{ - int lcv; - - for (lcv = 0 ; lcv < vm_nphysseg ; lcv++) { - if ((unsigned int) mem >= (unsigned int) vm_physmem[lcv].pgs && - (unsigned int) mem <= (unsigned int) vm_physmem[lcv].lastpg) - break; - } - if (lcv == vm_nphysseg || - (mem->flags & (PG_ACTIVE|PG_INACTIVE)) == (PG_ACTIVE|PG_INACTIVE)) - panic("vm_page_check: not valid!"); - return; -} - -#else /* VM_PAGE_DEBUG */ -#define VM_PAGE_CHECK(mem) -#endif /* VM_PAGE_DEBUG */ - #endif /* _KERNEL */ #endif /* _UVM_UVM_PAGE_H_ */ |