diff options
author | tharris@microsoft.com <unknown> | 2006-10-07 12:29:07 +0000 |
---|---|---|
committer | tharris@microsoft.com <unknown> | 2006-10-07 12:29:07 +0000 |
commit | 9cef40bd4dd2536c7a370a1a9b78461c152805cc (patch) | |
tree | 7a9657ce6af6880cc73775ddeeaccab4cecb7e12 /rts/Sanity.c | |
parent | 87c36991c22f208623c96506c64c6c163361e45b (diff) | |
download | haskell-9cef40bd4dd2536c7a370a1a9b78461c152805cc.tar.gz |
STM invariants
Diffstat (limited to 'rts/Sanity.c')
-rw-r--r-- | rts/Sanity.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/rts/Sanity.c b/rts/Sanity.c index 33ec988106..48d913c46e 100644 --- a/rts/Sanity.c +++ b/rts/Sanity.c @@ -447,19 +447,36 @@ checkClosure( StgClosure* p ) #endif - case TVAR_WAIT_QUEUE: + case TVAR_WATCH_QUEUE: { - StgTVarWaitQueue *wq = (StgTVarWaitQueue *)p; + StgTVarWatchQueue *wq = (StgTVarWatchQueue *)p; ASSERT(LOOKS_LIKE_CLOSURE_PTR(wq->next_queue_entry)); ASSERT(LOOKS_LIKE_CLOSURE_PTR(wq->prev_queue_entry)); - return sizeofW(StgTVarWaitQueue); + return sizeofW(StgTVarWatchQueue); + } + + case INVARIANT_CHECK_QUEUE: + { + StgInvariantCheckQueue *q = (StgInvariantCheckQueue *)p; + ASSERT(LOOKS_LIKE_CLOSURE_PTR(q->invariant)); + ASSERT(LOOKS_LIKE_CLOSURE_PTR(q->my_execution)); + ASSERT(LOOKS_LIKE_CLOSURE_PTR(q->next_queue_entry)); + return sizeofW(StgInvariantCheckQueue); + } + + case ATOMIC_INVARIANT: + { + StgAtomicInvariant *invariant = (StgAtomicInvariant *)p; + ASSERT(LOOKS_LIKE_CLOSURE_PTR(invariant->code)); + ASSERT(LOOKS_LIKE_CLOSURE_PTR(invariant->last_execution)); + return sizeofW(StgAtomicInvariant); } case TVAR: { StgTVar *tv = (StgTVar *)p; ASSERT(LOOKS_LIKE_CLOSURE_PTR(tv->current_value)); - ASSERT(LOOKS_LIKE_CLOSURE_PTR(tv->first_wait_queue_entry)); + ASSERT(LOOKS_LIKE_CLOSURE_PTR(tv->first_watch_queue_entry)); return sizeofW(StgTVar); } |