[PATCH] includes/stg/SMP.h: use 'NOSMP' instead of never defined 'WITHSMP'
slyich at gmail.com
slyich at gmail.com
Sat Feb 15 13:52:15 UTC 2014
From: Sergei Trofimovich <slyfox at gentoo.org>
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
---
includes/stg/SMP.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
index 01663dd..8d819c7 100644
--- a/includes/stg/SMP.h
+++ b/includes/stg/SMP.h
@@ -154,7 +154,7 @@ xchg(StgPtr p, StgWord w)
: "r" (w), "r" (p)
: "memory"
);
-#elif !defined(WITHSMP)
+#elif defined(NOSMP)
result = *p;
*p = w;
#else
@@ -225,7 +225,7 @@ cas(StgVolatilePtr p, StgWord o, StgWord n)
: "cc","memory");
return result;
-#elif !defined(WITHSMP)
+#elif defined(NOSMP)
StgWord result;
result = *p;
if (result == o) {
@@ -313,7 +313,7 @@ write_barrier(void) {
__asm__ __volatile__ ("" : : : "memory");
#elif arm_HOST_ARCH && !defined(arm_HOST_ARCH_PRE_ARMv7)
__asm__ __volatile__ ("dmb st" : : : "memory");
-#elif !defined(WITHSMP)
+#elif defined(NOSMP)
return;
#else
#error memory barriers unimplemented on this architecture
@@ -332,7 +332,7 @@ store_load_barrier(void) {
__asm__ __volatile__ ("membar #StoreLoad" : : : "memory");
#elif arm_HOST_ARCH && !defined(arm_HOST_ARCH_PRE_ARMv7)
__asm__ __volatile__ ("dmb" : : : "memory");
-#elif !defined(WITHSMP)
+#elif defined(NOSMP)
return;
#else
#error memory barriers unimplemented on this architecture
@@ -352,7 +352,7 @@ load_load_barrier(void) {
__asm__ __volatile__ ("" : : : "memory");
#elif arm_HOST_ARCH && !defined(arm_HOST_ARCH_PRE_ARMv7)
__asm__ __volatile__ ("dmb" : : : "memory");
-#elif !defined(WITHSMP)
+#elif defined(NOSMP)
return;
#else
#error memory barriers unimplemented on this architecture
--
1.8.5.2
More information about the ghc-devs
mailing list