fix warnings
authorSimon Marlow <marlowsd@gmail.com>
Wed, 30 Jan 2013 09:46:37 +0000 (09:46 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 30 Jan 2013 10:50:14 +0000 (10:50 +0000)
includes/rts/storage/TSO.h
rts/STM.c

index e9c2655..187b668 100644 (file)
@@ -253,6 +253,5 @@ void dirty_STACK (Capability *cap, StgStack *stack);
 
 /* 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 STM_AWOKEN     ((StgTSO *)(void*)&stg_STM_AWOKEN_closure)
 
 #endif /* RTS_STORAGE_TSO_H */
index 7400d57..eee0f46 100644 (file)
--- a/rts/STM.c
+++ b/rts/STM.c
@@ -385,11 +385,12 @@ static void unpark_tso(Capability *cap, StgTSO *tso) {
     // This way we can avoid sending further wakeup messages in the
     // future.
     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);
     } else if (tso -> why_blocked == BlockedOnSTM) {
       TRACE("unpark_tso on tso=%p", tso);
-      tso->block_info.closure = STM_AWOKEN;
+      tso->block_info.closure = &stg_STM_AWOKEN_closure;
       tryWakeupThread(cap,tso);
     } else {
       TRACE("spurious unpark_tso on tso=%p", tso);