__predict_false() DIAGNOSTIC error checks.

This commit is contained in:
thorpej 2000-05-08 23:11:53 +00:00
parent 39294d89e5
commit d45c9982df

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_page_i.h,v 1.12 2000/03/26 20:54:47 kleink Exp $ */
/* $NetBSD: uvm_page_i.h,v 1.13 2000/05/08 23:11:53 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@ -215,7 +215,7 @@ uvm_pagedeactivate(pg)
}
if ((pg->pqflags & PQ_INACTIVE) == 0) {
#ifdef DIAGNOSTIC
if (pg->wire_count)
if (__predict_false(pg->wire_count))
panic("uvm_pagedeactivate: caller did not check "
"wire count");
#endif
@ -311,7 +311,7 @@ uvm_page_lookup_freelist(pg)
lcv = vm_physseg_find(atop(VM_PAGE_TO_PHYS(pg)), NULL);
#ifdef DIAGNOSTIC
if (lcv == -1)
if (__predict_false(lcv == -1))
panic("uvm_page_lookup_freelist: unable to locate physseg");
#endif
return (vm_physmem[lcv].free_list);