Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm Some preemption updates - still not being u...



details:   https://anonhg.NetBSD.org/src/rev/77f65a4cc27a
branches:  trunk
changeset: 1018910:77f65a4cc27a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Feb 21 08:46:28 2021 +0000

description:
Some preemption updates - still not being used (yet)

diffstat:

 sys/arch/arm/arm/arm_machdep.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 91fe5986888b -r 77f65a4cc27a sys/arch/arm/arm/arm_machdep.c
--- a/sys/arch/arm/arm/arm_machdep.c    Sun Feb 21 08:31:36 2021 +0000
+++ b/sys/arch/arm/arm/arm_machdep.c    Sun Feb 21 08:46:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arm_machdep.c,v 1.65 2020/12/01 02:43:13 rin Exp $     */
+/*     $NetBSD: arm_machdep.c,v 1.66 2021/02/21 08:46:28 skrll Exp $   */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.65 2020/12/01 02:43:13 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.66 2021/02/21 08:46:28 skrll Exp $");
 
 #include <sys/atomic.h>
 #include <sys/cpu.h>
@@ -223,6 +223,8 @@
 cpu_need_resched(struct cpu_info *ci, struct lwp *l, int flags)
 {
 
+       KASSERT(kpreempt_disabled());
+
        if (flags & RESCHED_IDLE) {
 #ifdef MULTIPROCESSOR
                /*
@@ -322,13 +324,17 @@
 bool
 cpu_kpreempt_enter(uintptr_t where, int s)
 {
+
+       KASSERT(kpreempt_disabled());
+
        return s == IPL_NONE;
 }
 
 void
 cpu_kpreempt_exit(uintptr_t where)
 {
-       atomic_and_uint(&curcpu()->ci_astpending, (unsigned int)~__BIT(1));
+
+       /* do nothing */
 }
 
 bool



Home | Main Index | Thread Index | Old Index