Commit dbefe7b8 authored by Simon Marlow's avatar Simon Marlow
Browse files

fix warnings

parent a23661d2
...@@ -253,6 +253,5 @@ void dirty_STACK (Capability *cap, StgStack *stack); ...@@ -253,6 +253,5 @@ void dirty_STACK (Capability *cap, StgStack *stack);
/* this is the NIL ptr for a TSO queue (e.g. runnable queue) */ /* this is the NIL ptr for a TSO queue (e.g. runnable queue) */
#define END_TSO_QUEUE ((StgTSO *)(void*)&stg_END_TSO_QUEUE_closure) #define END_TSO_QUEUE ((StgTSO *)(void*)&stg_END_TSO_QUEUE_closure)
#define STM_AWOKEN ((StgTSO *)(void*)&stg_STM_AWOKEN_closure)
#endif /* RTS_STORAGE_TSO_H */ #endif /* RTS_STORAGE_TSO_H */
...@@ -385,11 +385,12 @@ static void unpark_tso(Capability *cap, StgTSO *tso) { ...@@ -385,11 +385,12 @@ static void unpark_tso(Capability *cap, StgTSO *tso) {
// This way we can avoid sending further wakeup messages in the // This way we can avoid sending further wakeup messages in the
// future. // future.
lockTSO(tso); lockTSO(tso);
if (tso->why_blocked == BlockedOnSTM && tso->block_info.closure == STM_AWOKEN) { if (tso->why_blocked == BlockedOnSTM &&
tso->block_info.closure == &stg_STM_AWOKEN_closure) {
TRACE("unpark_tso already woken up tso=%p", tso); TRACE("unpark_tso already woken up tso=%p", tso);
} else if (tso -> why_blocked == BlockedOnSTM) { } else if (tso -> why_blocked == BlockedOnSTM) {
TRACE("unpark_tso on tso=%p", tso); TRACE("unpark_tso on tso=%p", tso);
tso->block_info.closure = STM_AWOKEN; tso->block_info.closure = &stg_STM_AWOKEN_closure;
tryWakeupThread(cap,tso); tryWakeupThread(cap,tso);
} else { } else {
TRACE("spurious unpark_tso on tso=%p", tso); TRACE("spurious unpark_tso on tso=%p", tso);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment