projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Instead of a separate context-switch flag, set HpLim to zero
[ghc-hetmet.git]
/
rts
/
Threads.c
diff --git
a/rts/Threads.c
b/rts/Threads.c
index
65eaf8d
..
936b90e
100644
(file)
--- a/
rts/Threads.c
+++ b/
rts/Threads.c
@@
-505,8
+505,10
@@
unblockOne_ (Capability *cap, StgTSO *tso,
}
tso->cap = cap;
appendToRunQueue(cap,tso);
}
tso->cap = cap;
appendToRunQueue(cap,tso);
- // we're holding a newly woken thread, make sure we context switch
- // quickly so we can migrate it if necessary.
+
+ // context-switch soonish so we can migrate the new thread if
+ // necessary. NB. not contextSwitchCapability(cap), which would
+ // force a context switch immediately.
cap->context_switch = 1;
} else {
// we'll try to wake it up on the Capability it was last on.
cap->context_switch = 1;
} else {
// we'll try to wake it up on the Capability it was last on.
@@
-514,6
+516,10
@@
unblockOne_ (Capability *cap, StgTSO *tso,
}
#else
appendToRunQueue(cap,tso);
}
#else
appendToRunQueue(cap,tso);
+
+ // context-switch soonish so we can migrate the new thread if
+ // necessary. NB. not contextSwitchCapability(cap), which would
+ // force a context switch immediately.
cap->context_switch = 1;
#endif
cap->context_switch = 1;
#endif
@@
-763,6
+769,11
@@
printThreadStatus(StgTSO *t)
default:
printThreadBlockage(t);
}
default:
printThreadBlockage(t);
}
+ if (t->flags & TSO_DIRTY) {
+ debugBelch(" (TSO_DIRTY)");
+ } else if (t->flags & TSO_LINK_DIRTY) {
+ debugBelch(" (TSO_LINK_DIRTY)");
+ }
debugBelch("\n");
}
}
debugBelch("\n");
}
}