1 /* -----------------------------------------------------------------------------
2 * $Id: Sanity.h,v 1.10 2002/12/11 15:36:50 simonmar Exp $
4 * (c) The GHC Team, 1998-1999
6 * Prototypes for functions in Sanity.c
8 * ---------------------------------------------------------------------------*/
13 # define PVM_PE_MASK 0xfffc0000
14 # define MAX_PVM_PES MAX_PES
15 # define MAX_PVM_TIDS MAX_PES
16 # define MAX_SLOTS 100000
19 /* debugging routines */
20 extern void checkHeap ( bdescr *bd );
21 extern void checkHeapChunk ( StgPtr start, StgPtr end );
22 extern void checkChain ( bdescr *bd );
23 extern void checkTSO ( StgTSO* tso );
24 extern void checkGlobalTSOList ( rtsBool checkTSOs );
25 extern void checkStaticObjects ( StgClosure* static_objects );
26 extern void checkStackChunk ( StgPtr sp, StgPtr stack_end );
27 extern StgOffset checkStackFrame ( StgPtr sp );
28 extern StgOffset checkClosure ( StgClosure* p );
30 extern void checkMutableList ( StgMutClosure *p, nat gen );
31 extern void checkMutOnceList ( StgMutClosure *p, nat gen );
34 extern void checkTSOsSanity(void);
35 extern rtsBool checkThreadQSanity (PEs proc, rtsBool check_TSO_too);
36 extern rtsBool checkThreadQsSanity (rtsBool check_TSO_too);
40 extern void checkBQ (StgBlockingQueueElement *bqe, StgClosure *closure);
42 extern void checkBQ (StgTSO *bqe, StgClosure *closure);
46 extern void checkLAGAtable(rtsBool check_closures);
47 extern void checkHeapChunk(StgPtr start, StgPtr end);
50 /* test whether an object is already on update list */
51 extern rtsBool isBlackhole( StgTSO* tso, StgClosure* p );