X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FSTM.c;h=3de42e20906f664534709450796712f16dc129f4;hb=209e093599d0d4db5487d124895d817c55b7c052;hp=ed5a7224efa33c89e4fdc9d03ed9f2a5f7ac9308;hpb=5270423a6afe69f1dc57e5e5a474812182718d40;p=ghc-hetmet.git diff --git a/rts/STM.c b/rts/STM.c index ed5a722..3de42e2 100644 --- 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); } @@ -1180,6 +1179,7 @@ void stmAddInvariantToCheck(Capability *cap, SET_HDR (invariant, &stg_ATOMIC_INVARIANT_info, CCS_SYSTEM); invariant -> code = code; invariant -> last_execution = NO_TREC; + invariant -> lock = 0; // 2. Allocate an StgInvariantCheckQueue entry, link it to the current trec