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);
}
/*......................................................................*/
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);
}
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