projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix -fwarn-missing-import-lists (fix Trac #4489)
[ghc-hetmet.git]
/
rts
/
Messages.c
diff --git
a/rts/Messages.c
b/rts/Messages.c
index
91ee9a6
..
5e0fa25
100644
(file)
--- a/
rts/Messages.c
+++ b/
rts/Messages.c
@@
-161,7
+161,7
@@
nat messageBlackHole(Capability *cap, MessageBlackHole *msg)
const StgInfoTable *info;
StgClosure *p;
StgBlockingQueue *bq;
const StgInfoTable *info;
StgClosure *p;
StgBlockingQueue *bq;
- StgClosure *bh = msg->bh;
+ StgClosure *bh = UNTAG_CLOSURE(msg->bh);
StgTSO *owner;
debugTraceCap(DEBUG_sched, cap, "message: thread %d blocking on blackhole %p",
StgTSO *owner;
debugTraceCap(DEBUG_sched, cap, "message: thread %d blocking on blackhole %p",
@@
-175,6
+175,7
@@
nat messageBlackHole(Capability *cap, MessageBlackHole *msg)
// all.
if (info != &stg_BLACKHOLE_info &&
info != &stg_CAF_BLACKHOLE_info &&
// all.
if (info != &stg_BLACKHOLE_info &&
info != &stg_CAF_BLACKHOLE_info &&
+ info != &__stg_EAGER_BLACKHOLE_info &&
info != &stg_WHITEHOLE_info) {
// if it is a WHITEHOLE, then a thread is in the process of
// trying to BLACKHOLE it. But we know that it was once a
info != &stg_WHITEHOLE_info) {
// if it is a WHITEHOLE, then a thread is in the process of
// trying to BLACKHOLE it. But we know that it was once a
@@
-186,7
+187,9
@@
nat messageBlackHole(Capability *cap, MessageBlackHole *msg)
// The blackhole must indirect to a TSO, a BLOCKING_QUEUE, an IND,
// or a value.
loop:
// The blackhole must indirect to a TSO, a BLOCKING_QUEUE, an IND,
// or a value.
loop:
- p = UNTAG_CLOSURE(((StgInd*)bh)->indirectee);
+ // NB. VOLATILE_LOAD(), because otherwise gcc hoists the load
+ // and turns this into an infinite loop.
+ p = UNTAG_CLOSURE((StgClosure*)VOLATILE_LOAD(&((StgInd*)bh)->indirectee));
info = p->header.info;
if (info == &stg_IND_info)
info = p->header.info;
if (info == &stg_IND_info)