Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Add a __predict_true() to an extremely common case.



details:   https://anonhg.NetBSD.org/src/rev/a8e3758fc471
branches:  trunk
changeset: 508532:a8e3758fc471
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Apr 12 21:11:47 2001 +0000

description:
Add a __predict_true() to an extremely common case.

diffstat:

 sys/uvm/uvm_km.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 30acfd42b6e7 -r a8e3758fc471 sys/uvm/uvm_km.c
--- a/sys/uvm/uvm_km.c  Thu Apr 12 21:08:25 2001 +0000
+++ b/sys/uvm/uvm_km.c  Thu Apr 12 21:11:47 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_km.c,v 1.44 2001/04/12 21:08:25 thorpej Exp $      */
+/*     $NetBSD: uvm_km.c,v 1.45 2001/04/12 21:11:47 thorpej Exp $      */
 
 /* 
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -542,7 +542,7 @@
        while (loopsize) {
                simple_lock(&obj->vmobjlock);
                pg = uvm_pagealloc(obj, offset, NULL, 0);
-               if (pg) {
+               if (__predict_true(pg != NULL)) {
                        pg->flags &= ~PG_BUSY;  /* new page */
                        UVM_PAGE_OWN(pg, NULL);
                }



Home | Main Index | Thread Index | Old Index