summaryrefslogtreecommitdiff
path: root/rts/STM.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/STM.c')
-rw-r--r--rts/STM.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/rts/STM.c b/rts/STM.c
index 058eec7409..abb44172dd 100644
--- a/rts/STM.c
+++ b/rts/STM.c
@@ -332,24 +332,7 @@ static void unpark_tso(Capability *cap, StgTSO *tso) {
// queues: it's up to the thread itself to remove it from the wait queues
// if it decides to do so when it is scheduled.
- // Unblocking a TSO from BlockedOnSTM is done under the TSO lock,
- // to avoid multiple CPUs unblocking the same TSO, and also to
- // synchronise with throwTo(). The first time the TSO is unblocked
- // we mark this fact by setting block_info.closure == STM_AWOKEN.
- // This way we can avoid sending further wakeup messages in the
- // future.
- lockTSO(tso);
- if (tso->why_blocked == BlockedOnSTM &&
- tso->block_info.closure == &stg_STM_AWOKEN_closure) {
- TRACE("unpark_tso already woken up tso=%p", tso);
- } else if (tso -> why_blocked == BlockedOnSTM) {
- TRACE("unpark_tso on tso=%p", tso);
- tso->block_info.closure = &stg_STM_AWOKEN_closure;
- tryWakeupThread(cap,tso);
- } else {
- TRACE("spurious unpark_tso on tso=%p", tso);
- }
- unlockTSO(tso);
+ tryWakeupThread(cap,tso);
}
static void unpark_waiters_on(Capability *cap, StgTVar *s) {