[commit: ghc] master, ghc-lwc2: Only emit %write_barrier primitive for THREADED_RTS (b7ae3cd)
Ian Lynagh
igloo at earth.li
Thu Feb 28 15:20:14 CET 2013
Repository : http://darcs.haskell.org/ghc.git/
On branches: master,ghc-lwc2
http://hackage.haskell.org/trac/ghc/changeset/b7ae3cd9273da044384de4a327a4a5d71190129e
>---------------------------------------------------------------
commit b7ae3cd9273da044384de4a327a4a5d71190129e
Author: Gabor Greif <ggreif at gmail.com>
Date: Mon Feb 25 23:03:23 2013 +0100
Only emit %write_barrier primitive for THREADED_RTS
>---------------------------------------------------------------
includes/Cmm.h | 8 +++++++-
includes/rts/storage/SMPClosureOps.h | 4 ++--
rts/Updates.h | 4 ++--
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 1505b1c..ca8e51a 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -1,6 +1,6 @@
/* -----------------------------------------------------------------------------
*
- * (c) The University of Glasgow 2004-2012
+ * (c) The University of Glasgow 2004-2013
*
* This file is included at the top of all .cmm source files (and
* *only* .cmm files). It defines a collection of useful macros for
@@ -583,6 +583,12 @@
#define OVERWRITING_CLOSURE(c) /* nothing */
#endif
+#ifdef THREADED_RTS
+#define prim_write_barrier prim %write_barrier()
+#else
+#define prim_write_barrier /* nothing */
+#endif
+
/* -----------------------------------------------------------------------------
Ticky macros
-------------------------------------------------------------------------- */
diff --git a/includes/rts/storage/SMPClosureOps.h b/includes/rts/storage/SMPClosureOps.h
index cd6a789..3934987 100644
--- a/includes/rts/storage/SMPClosureOps.h
+++ b/includes/rts/storage/SMPClosureOps.h
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
*
- * (c) The GHC Team, 2005
+ * (c) The GHC Team, 2005-2013
*
* Macros for THREADED_RTS support
*
@@ -12,7 +12,7 @@
#ifdef CMINUSMINUS
#define unlockClosure(ptr,info) \
- prim %write_barrier(); \
+ prim_write_barrier; \
StgHeader_info(ptr) = info;
#else
diff --git a/rts/Updates.h b/rts/Updates.h
index b4ff7d1..1bd742a 100644
--- a/rts/Updates.h
+++ b/rts/Updates.h
@@ -1,6 +1,6 @@
/* -----------------------------------------------------------------------------
*
- * (c) The GHC Team, 1998-2004
+ * (c) The GHC Team, 1998-2013
*
* Performing updates.
*
@@ -46,7 +46,7 @@
\
OVERWRITING_CLOSURE(p1); \
StgInd_indirectee(p1) = p2; \
- prim %write_barrier(); \
+ prim_write_barrier; \
SET_INFO(p1, stg_BLACKHOLE_info); \
LDV_RECORD_CREATE(p1); \
bd = Bdescr(p1); \
More information about the ghc-commits
mailing list