projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add shared Typeable support
[ghc-hetmet.git]
/
includes
/
SMP.h
diff --git
a/includes/SMP.h
b/includes/SMP.h
index
d985576
..
515516a
100644
(file)
--- a/
includes/SMP.h
+++ b/
includes/SMP.h
@@
-76,8
+76,9
@@
cas(StgVolatilePtr p, StgWord o, StgWord n)
" stwcx. %2, 0, %3\n"
" bne- 1b\n"
"2:"
" stwcx. %2, 0, %3\n"
" bne- 1b\n"
"2:"
- :"=r" (result)
+ :"=&r" (result)
:"r" (o), "r" (n), "r" (p)
:"r" (o), "r" (n), "r" (p)
+ :"cc", "memory"
);
return result;
#else
);
return result;
#else
@@
-96,7
+97,7
@@
cas(StgVolatilePtr p, StgWord o, StgWord n)
* that require it (not x86 or x86_64).
*/
INLINE_HEADER void
* that require it (not x86 or x86_64).
*/
INLINE_HEADER void
-wb(void) {
+write_barrier(void) {
#if i386_HOST_ARCH || x86_64_HOST_ARCH
__asm__ __volatile__ ("" : : : "memory");
#elif powerpc_HOST_ARCH
#if i386_HOST_ARCH || x86_64_HOST_ARCH
__asm__ __volatile__ ("" : : : "memory");
#elif powerpc_HOST_ARCH
@@
-136,7
+137,7
@@
unlockClosure(StgClosure *p, StgInfoTable *info)
{
#if i386_HOST_ARCH || x86_64_HOST_ARCH || powerpc_HOST_ARCH
// This is a strictly ordered write, so we need a wb():
{
#if i386_HOST_ARCH || x86_64_HOST_ARCH || powerpc_HOST_ARCH
// This is a strictly ordered write, so we need a wb():
- wb();
+ write_barrier();
p->header.info = info;
#else
RELEASE_SM_LOCK;
p->header.info = info;
#else
RELEASE_SM_LOCK;
@@
-145,7
+146,7
@@
unlockClosure(StgClosure *p, StgInfoTable *info)
#else /* !THREADED_RTS */
#else /* !THREADED_RTS */
-#define wb() /* nothing */
+#define write_barrier() /* nothing */
INLINE_HEADER StgWord
xchg(StgPtr p, StgWord w)
INLINE_HEADER StgWord
xchg(StgPtr p, StgWord w)