461da8b2ceb174803d781090d81ba914ad5f35d5
[ghc-hetmet.git] / ghc / rts / Sanity.h
1 /* -----------------------------------------------------------------------------
2  * $Id: Sanity.h,v 1.6 2000/03/31 03:09:36 hwloidl Exp $
3  *
4  * (c) The GHC Team, 1998-1999
5  *
6  * Prototypes for functions in Sanity.c
7  *
8  * ---------------------------------------------------------------------------*/
9
10 #ifdef DEBUG
11 /* debugging routines */
12 extern void checkHeap  ( bdescr *bd, StgPtr start );
13 extern void checkChain ( bdescr *bd );
14 extern void checkStack ( StgPtr sp, StgPtr stack_end, StgUpdateFrame* su );
15 extern void checkTSO   ( StgTSO* tso );
16 extern void checkGlobalTSOList (rtsBool checkTSOs);
17 extern void checkStaticObjects ( void );
18 #if defined(GRAN)
19 extern void checkTSOsSanity(void);
20 extern rtsBool checkThreadQSanity (PEs proc, rtsBool check_TSO_too);
21 extern rtsBool checkThreadQsSanity (rtsBool check_TSO_too);
22 #endif
23 #if defined(PAR)
24 extern void checkBQ (StgBlockingQueueElement *bqe, StgClosure *closure);
25 extern void checkLAGAtable(rtsBool check_closures);
26 extern void checkHeapChunk(StgPtr start, StgPtr end);
27 #else
28 extern void checkBQ (StgTSO *bqe, StgClosure *closure);
29 #endif
30
31 extern StgOffset checkClosure( StgClosure* p );
32
33 /* test whether an object is already on update list */
34 extern rtsBool isBlackhole( StgTSO* tso, StgClosure* p );
35
36 #endif /* DEBUG */
37