[PATCH] includes/stg/SMP.h: use 'NOSMP' instead of never defined 'WITHSMP'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] includes/stg/SMP.h: use 'NOSMP' instead of never defined 'WITHSMP'

Sergei Trofimovich
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


Reply | Threaded
Open this post in threaded view
|

[PATCH] includes/stg/SMP.h: use 'NOSMP' instead of never defined 'WITHSMP'

Carter Schonwald
Could you open a trac ticket for these patches and post em there? :-)
-Carter

On Saturday, February 15, 2014, <slyich at gmail.com> wrote:

> From: Sergei Trofimovich <slyfox at gentoo.org <javascript:;>>
>
> Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org <javascript:;>>
> ---
>  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
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org <javascript:;>
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140215/07df6c69/attachment.html>

Reply | Threaded
Open this post in threaded view
|

[PATCH] includes/stg/SMP.h: use 'NOSMP' instead of never defined 'WITHSMP'

Sergei Trofimovich
On Sat, 15 Feb 2014 12:54:09 -0500
Carter Schonwald <carter.schonwald at gmail.com> wrote:

> Could you open a trac ticket for these patches and post em there? :-)
> -Carter

Sure! done as:
    https://ghc.haskell.org/trac/ghc/ticket/8789

> On Saturday, February 15, 2014, <slyich at gmail.com> wrote:
>
> > From: Sergei Trofimovich <slyfox at gentoo.org <javascript:;>>
> >
> > Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org <javascript:;>>

What a funny semicolon quote

--

  Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140215/36574459/attachment.sig>