Source-Changes-HG archive

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

[src/trunk]: src/sys/kern sched_curcpu_runnable_p(): cosmetic change.



details:   https://anonhg.NetBSD.org/src/rev/e2f3ce484b05
branches:  trunk
changeset: 746268:e2f3ce484b05
user:      ad <ad%NetBSD.org@localhost>
date:      Thu Mar 26 19:25:07 2020 +0000

description:
sched_curcpu_runnable_p(): cosmetic change.

diffstat:

 sys/kern/kern_runq.c |  13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diffs (36 lines):

diff -r 4f177f4e613f -r e2f3ce484b05 sys/kern/kern_runq.c
--- a/sys/kern/kern_runq.c      Thu Mar 26 19:23:18 2020 +0000
+++ b/sys/kern/kern_runq.c      Thu Mar 26 19:25:07 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_runq.c,v 1.63 2020/03/08 15:00:31 ad Exp $        */
+/*     $NetBSD: kern_runq.c,v 1.64 2020/03/26 19:25:07 ad Exp $        */
 
 /*-
  * Copyright (c) 2019, 2020 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.63 2020/03/08 15:00:31 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.64 2020/03/26 19:25:07 ad Exp $");
 
 #include "opt_dtrace.h"
 
@@ -1086,15 +1086,10 @@
        kpreempt_disable();
        ci = curcpu();
        spc = &ci->ci_schedstate;
-
+       rv = (spc->spc_count != 0);
 #ifndef __HAVE_FAST_SOFTINTS
-       if (ci->ci_data.cpu_softints) {
-               kpreempt_enable();
-               return true;
-       }
+       rv |= (ci->ci_data.cpu_softints != 0);
 #endif
-
-       rv = (spc->spc_count != 0) ? true : false;
        kpreempt_enable();
 
        return rv;



Home | Main Index | Thread Index | Old Index