Module Name: src
Committed By: skrll
Date: Sun Feb 21 08:46:28 UTC 2021
Modified Files:
src/sys/arch/arm/arm: arm_machdep.c
Log Message:
Some preemption updates - still not being used (yet)
To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/arm/arm/arm_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/arm/arm_machdep.c
diff -u src/sys/arch/arm/arm/arm_machdep.c:1.65 src/sys/arch/arm/arm/arm_machdep.c:1.66
--- src/sys/arch/arm/arm/arm_machdep.c:1.65 Tue Dec 1 02:43:13 2020
+++ src/sys/arch/arm/arm/arm_machdep.c Sun Feb 21 08:46:28 2021
@@ -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 @@ void
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 @@ arm_curcpu(void)
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