Repository : ssh://[email protected]/ghc

On branch  : ghc-parmake-gsoc
Link       : 
http://ghc.haskell.org/trac/ghc/changeset/1f5338e7b71f56c6d2451b9b23608c851bf90c8a/ghc

>---------------------------------------------------------------

commit 1f5338e7b71f56c6d2451b9b23608c851bf90c8a
Author: Patrick Palka <[email protected]>
Date:   Wed Sep 4 14:49:51 2013 -0400

    Fix bootstrapping of GHC with earlier versions
    
    We can no longer use atomic_inc() in the stage1 compiler because its
    prototype was recently changed.
    
    Since the stage1 compiler is always single-threaded, only use
    atomic_inc() when THREADED_RTS is defined.


>---------------------------------------------------------------

1f5338e7b71f56c6d2451b9b23608c851bf90c8a
 compiler/cbits/genSym.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/compiler/cbits/genSym.c b/compiler/cbits/genSym.c
index 4217e63..08d403d 100644
--- a/compiler/cbits/genSym.c
+++ b/compiler/cbits/genSym.c
@@ -4,10 +4,14 @@
 static HsInt GenSymCounter = 0;
 
 HsInt genSym(void) {
+#if defined(THREADED_RTS)
     if (n_capabilities == 1) {
         return GenSymCounter++;
     } else {
         return atomic_inc((StgWord *)&GenSymCounter, 1);
     }
+#else
+    return GenSymCounter++;
+#endif
 }
 


_______________________________________________
ghc-commits mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-commits

Reply via email to