Since a page can be on only one of ACTIVE or INACTIVE queues at

any given time, turn two consecutive if statements into an if-else-if
construct.
This commit is contained in:
thorpej 2001-06-27 23:57:16 +00:00
parent 3e8e591c7f
commit 8217ab697c
2 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_page.c,v 1.64 2001/06/27 21:18:34 thorpej Exp $ */
/* $NetBSD: uvm_page.c,v 1.65 2001/06/27 23:57:16 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -1312,8 +1312,7 @@ uvm_pagefree(pg)
TAILQ_REMOVE(&uvm.page_active, pg, pageq);
pg->pqflags &= ~PQ_ACTIVE;
uvmexp.active--;
}
if (pg->pqflags & PQ_INACTIVE) {
} else if (pg->pqflags & PQ_INACTIVE) {
TAILQ_REMOVE(&uvm.page_inactive, pg, pageq);
pg->pqflags &= ~PQ_INACTIVE;
uvmexp.inactive--;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_page_i.h,v 1.18 2001/05/25 04:06:16 chs Exp $ */
/* $NetBSD: uvm_page_i.h,v 1.19 2001/06/27 23:57:17 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -158,8 +158,7 @@ uvm_pagewire(pg)
TAILQ_REMOVE(&uvm.page_active, pg, pageq);
pg->pqflags &= ~PQ_ACTIVE;
uvmexp.active--;
}
if (pg->pqflags & PQ_INACTIVE) {
} else if (pg->pqflags & PQ_INACTIVE) {
TAILQ_REMOVE(&uvm.page_inactive, pg, pageq);
pg->pqflags &= ~PQ_INACTIVE;
uvmexp.inactive--;