Source-Changes-HG archive

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

[src/trunk]: src/sys/kern ktrgenio(): __predict_false() ktrwrite() failing.



details:   https://anonhg.NetBSD.org/src/rev/d260f5bb30a6
branches:  trunk
changeset: 485919:d260f5bb30a6
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon May 08 20:01:05 2000 +0000

description:
ktrgenio(): __predict_false() ktrwrite() failing.
ktrwrite(): __predict_true() no error occuring.

diffstat:

 sys/kern/kern_ktrace.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e0daf140c63e -r d260f5bb30a6 sys/kern/kern_ktrace.c
--- a/sys/kern/kern_ktrace.c    Mon May 08 19:59:48 2000 +0000
+++ b/sys/kern/kern_ktrace.c    Mon May 08 20:01:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_ktrace.c,v 1.39 2000/04/19 19:14:17 thorpej Exp $ */
+/*     $NetBSD: kern_ktrace.c,v 1.40 2000/05/08 20:01:05 thorpej Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -241,7 +241,7 @@
 
                kth.ktr_len = cnt + sizeof(struct ktr_genio);
 
-               if (ktrwrite(p, v, &kth) != 0)
+               if (__predict_false(ktrwrite(p, v, &kth) != 0))
                        break;
 
                iov->iov_base = (caddr_t)iov->iov_base + cnt;
@@ -629,7 +629,7 @@
                error = VOP_WRITE(vp, &auio, IO_UNIT|IO_APPEND, p->p_ucred);
                VOP_UNLOCK(vp, 0);
        }
-       if (error == 0)
+       if (__predict_true(error == 0))
                return (0);
        /*
         * If error encountered, give up tracing on this vnode.  Don't report



Home | Main Index | Thread Index | Old Index