Commit b7ae3cd9 authored by Gabor Greif's avatar Gabor Greif 💬

Only emit %write_barrier primitive for THREADED_RTS

parent 20b98f35
/* -----------------------------------------------------------------------------
*
* (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
-------------------------------------------------------------------------- */
......
/* ----------------------------------------------------------------------------
*
* (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
......
/* -----------------------------------------------------------------------------
*
* (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); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment