Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/include Make sure TPIDRPRw_IS_CURLWP is being u...



details:   https://anonhg.NetBSD.org/src/rev/6e0ba602ea2e
branches:  trunk
changeset: 337271:6e0ba602ea2e
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Apr 08 20:42:09 2015 +0000

description:
Make sure TPIDRPRw_IS_CURLWP is being used when __HAVE_PREEEMPTION is defined.

diffstat:

 sys/arch/arm/include/cpu.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 2daabcf5b104 -r 6e0ba602ea2e sys/arch/arm/include/cpu.h
--- a/sys/arch/arm/include/cpu.h        Wed Apr 08 18:10:44 2015 +0000
+++ b/sys/arch/arm/include/cpu.h        Wed Apr 08 20:42:09 2015 +0000
@@ -209,6 +209,9 @@
 // curcpu() expands into two instructions: a mrc and a ldr
 #define        curcpu()        lwp_getcpu(_curlwp())
 #elif defined(TPIDRPRW_IS_CURCPU)
+#ifdef __HAVE_PREEMPTION
+#error __HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP
+#endif
 static inline struct cpu_info *
 curcpu(void)
 {
@@ -216,8 +219,10 @@
 }
 #elif !defined(MULTIPROCESSOR)
 #define        curcpu()        (&cpu_info_store)
+#elif !defined(__HAVE_PREEEMPTION)
+#error MULTIPROCESSOR && !__HAVE_PREEMPTION requires TPIDRPRW_IS_CURCPU or TPIDRPRW_IS_CURLWP
 #else
-#error MULTIPROCESSOR requires TPIDRPRW_IS_CURCPU or TPIDRPRW_IS_CURLWP
+#error MULTIPROCESSOR && __HAVE_PREEMPTION requires TPIDRPRW_IS_CURLWP
 #endif /* !TPIDRPRW_IS_CURCPU && !TPIDRPRW_IS_CURLWP */
 
 #ifndef curlwp



Home | Main Index | Thread Index | Old Index