New implementation of BLACKHOLEs
[ghc-hetmet.git] / rts / STM.c
index ed5a722..f98d201 100644 (file)
--- a/rts/STM.c
+++ b/rts/STM.c
@@ -352,8 +352,7 @@ static StgBool watcher_is_tso(StgTVarWatchQueue *q) {
 
 static StgBool watcher_is_invariant(StgTVarWatchQueue *q) {
   StgClosure *c = q -> closure;
-  StgInfoTable *info = get_itbl(c);
-  return (info -> type) == ATOMIC_INVARIANT;
+  return (c->header.info == &stg_ATOMIC_INVARIANT_info);
 }
 
 /*......................................................................*/
@@ -378,7 +377,7 @@ static void unpark_tso(Capability *cap, StgTSO *tso) {
     lockTSO(tso);
     if (tso -> why_blocked == BlockedOnSTM) {
        TRACE("unpark_tso on tso=%p", tso);
-       unblockOne(cap,tso);
+        tryWakeupThread(cap,tso);
     } else {
        TRACE("spurious unpark_tso on tso=%p", tso);
     }