projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the gmp/Integer primops from the compiler
[ghc-hetmet.git]
/
includes
/
SMPClosureOps.h
diff --git
a/includes/SMPClosureOps.h
b/includes/SMPClosureOps.h
index
a43222d
..
f46dbde
100644
(file)
--- a/
includes/SMPClosureOps.h
+++ b/
includes/SMPClosureOps.h
@@
-9,6
+9,14
@@
#ifndef SMPCLOSUREOPS_H
#define SMPCLOSUREOPS_H
#ifndef SMPCLOSUREOPS_H
#define SMPCLOSUREOPS_H
+#ifdef CMINUSMINUS
+
+#define unlockClosure(ptr,info) \
+ prim %write_barrier() []; \
+ StgHeader_info(ptr) = info;
+
+#else
+
EXTERN_INLINE StgInfoTable *lockClosure(StgClosure *p);
EXTERN_INLINE void unlockClosure(StgClosure *p, const StgInfoTable *info);
EXTERN_INLINE StgInfoTable *lockClosure(StgClosure *p);
EXTERN_INLINE void unlockClosure(StgClosure *p, const StgInfoTable *info);
@@
-65,4
+73,6
@@
EXTERN_INLINE void unlockTSO(StgTSO *tso);
EXTERN_INLINE void unlockTSO(StgTSO *tso)
{ unlockClosure((StgClosure*)tso, (const StgInfoTable *)&stg_TSO_info); }
EXTERN_INLINE void unlockTSO(StgTSO *tso)
{ unlockClosure((StgClosure*)tso, (const StgInfoTable *)&stg_TSO_info); }
+#endif /* CMINUSMINUS */
+
#endif /* SMPCLOSUREOPS_H */
#endif /* SMPCLOSUREOPS_H */