Module Name:    src
Committed By:   matt
Date:           Wed Apr  8 20:42:09 UTC 2015

Modified Files:
        src/sys/arch/arm/include: cpu.h

Log Message:
Make sure TPIDRPRw_IS_CURLWP is being used when __HAVE_PREEEMPTION is defined.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/arm/include/cpu.h

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/include/cpu.h
diff -u src/sys/arch/arm/include/cpu.h:1.87 src/sys/arch/arm/include/cpu.h:1.88
--- src/sys/arch/arm/include/cpu.h:1.87	Wed Apr  8 18:10:44 2015
+++ src/sys/arch/arm/include/cpu.h	Wed Apr  8 20:42:09 2015
@@ -209,6 +209,9 @@ static inline struct cpu_info *lwp_getcp
 // 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 @@ curcpu(void)
 }
 #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

Reply via email to