diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2007-04-04 17:44:46 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2007-04-04 17:44:46 +0000 |
commit | 1e4c5717dc31673eddb41e5fe6349f210997597d (patch) | |
tree | a2ba686f67d53130c3004e616dd895908890dcdd /sys/uvm/uvm_pdaemon.c | |
parent | 6ae935fc92c15c37369f2eb54d2b618e30337f7c (diff) |
Mechanically rename the "flags" and "version" fields in struct vm_page
to "pg_flags" and "pg_version", so that they are a bit easier to work with.
Whoever uses generic names like this for a popular struct obviously doesn't
read much code.
Most architectures compile and there are no functionality changes.
deraadt@ ok ("if something fails to compile, we fix that by hand")
Diffstat (limited to 'sys/uvm/uvm_pdaemon.c')
-rw-r--r-- | sys/uvm/uvm_pdaemon.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c index 2bb5ad5e4be..0ca61319c31 100644 --- a/sys/uvm/uvm_pdaemon.c +++ b/sys/uvm/uvm_pdaemon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pdaemon.c,v 1.30 2006/07/31 11:51:29 mickey Exp $ */ +/* $OpenBSD: uvm_pdaemon.c,v 1.31 2007/04/04 17:44:45 art Exp $ */ /* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */ /* @@ -492,7 +492,7 @@ uvmpd_scan_inactive(pglst) p->pqflags |= PQ_ANON; /* anon now owns it */ } - if (p->flags & PG_BUSY) { + if (p->pg_flags & PG_BUSY) { simple_unlock(&anon->an_lock); uvmexp.pdbusy++; /* someone else owns page, skip it */ @@ -506,7 +506,7 @@ uvmpd_scan_inactive(pglst) /* lock failed, skip this page */ continue; } - if (p->flags & PG_BUSY) { + if (p->pg_flags & PG_BUSY) { simple_unlock(&uobj->vmobjlock); uvmexp.pdbusy++; /* someone else owns page, skip it */ @@ -521,7 +521,7 @@ uvmpd_scan_inactive(pglst) * can free it now and continue. */ - if (p->flags & PG_CLEAN) { + if (p->pg_flags & PG_CLEAN) { if (p->pqflags & PQ_SWAPBACKED) { /* this page now lives only in swap */ simple_lock(&uvm.swap_data_lock); @@ -619,7 +619,7 @@ uvmpd_scan_inactive(pglst) */ swap_backed = ((p->pqflags & PQ_SWAPBACKED) != 0); - p->flags |= PG_BUSY; /* now we own it */ + p->pg_flags |= PG_BUSY; /* now we own it */ UVM_PAGE_OWN(p, "scan_inactive"); pmap_page_protect(p, VM_PROT_READ); uvmexp.pgswapout++; @@ -656,7 +656,7 @@ uvmpd_scan_inactive(pglst) TRUE); if (swslot == 0) { /* no swap? give up! */ - p->flags &= ~PG_BUSY; + p->pg_flags &= ~PG_BUSY; UVM_PAGE_OWN(p, NULL); if (anon) simple_unlock( @@ -846,15 +846,15 @@ uvmpd_scan_inactive(pglst) #endif /* handle PG_WANTED now */ - if (p->flags & PG_WANTED) + if (p->pg_flags & PG_WANTED) /* still holding object lock */ wakeup(p); - p->flags &= ~(PG_BUSY|PG_WANTED); + p->pg_flags &= ~(PG_BUSY|PG_WANTED); UVM_PAGE_OWN(p, NULL); /* released during I/O? */ - if (p->flags & PG_RELEASED) { + if (p->pg_flags & PG_RELEASED) { if (anon) { /* remove page so we can get nextpg */ anon->u.an_page = NULL; @@ -903,7 +903,7 @@ uvmpd_scan_inactive(pglst) /* pageout was a success... */ pmap_clear_reference(p); pmap_clear_modify(p); - p->flags |= PG_CLEAN; + p->pg_flags |= PG_CLEAN; } } @@ -1035,7 +1035,7 @@ uvmpd_scan() p != NULL && (inactive_shortage > 0 || swap_shortage > 0); p = nextpg) { nextpg = TAILQ_NEXT(p, pageq); - if (p->flags & PG_BUSY) + if (p->pg_flags & PG_BUSY) continue; /* quick check before trying to lock */ /* @@ -1062,7 +1062,7 @@ uvmpd_scan() * skip this page if it's busy. */ - if ((p->flags & PG_BUSY) != 0) { + if ((p->pg_flags & PG_BUSY) != 0) { if (p->pqflags & PQ_ANON) simple_unlock(&p->uanon->an_lock); else @@ -1079,7 +1079,7 @@ uvmpd_scan() if ((p->pqflags & PQ_ANON) && p->uanon->an_swslot) { uvm_swap_free(p->uanon->an_swslot, 1); p->uanon->an_swslot = 0; - p->flags &= ~PG_CLEAN; + p->pg_flags &= ~PG_CLEAN; swap_shortage--; } if (p->pqflags & PQ_AOBJ) { @@ -1087,7 +1087,7 @@ uvmpd_scan() p->offset >> PAGE_SHIFT, 0); if (slot) { uvm_swap_free(slot, 1); - p->flags &= ~PG_CLEAN; + p->pg_flags &= ~PG_CLEAN; swap_shortage--; } } |