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

Carter Schonwald carter.schonwald at gmail.com
Sat Feb 15 17:54:09 UTC 2014


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>


More information about the ghc-devs mailing list