1 /* -----------------------------------------------------------------------------
2 * $Id: Sanity.h,v 1.8 2001/03/22 03:51:10 hwloidl 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, StgPtr start );
21 extern void checkHeapChunk ( StgPtr start, StgPtr end );
22 extern void checkChain ( bdescr *bd );
23 extern void checkStack ( StgPtr sp, StgPtr stack_end, StgUpdateFrame* su );
24 extern void checkTSO ( StgTSO* tso );
25 extern void checkGlobalTSOList (rtsBool checkTSOs);
26 extern void checkStaticObjects ( void );
28 extern void checkTSOsSanity(void);
29 extern rtsBool checkThreadQSanity (PEs proc, rtsBool check_TSO_too);
30 extern rtsBool checkThreadQsSanity (rtsBool check_TSO_too);
33 extern void checkBQ (StgBlockingQueueElement *bqe, StgClosure *closure);
34 extern void checkLAGAtable(rtsBool check_closures);
35 extern void checkHeapChunk(StgPtr start, StgPtr end);
37 extern void checkBQ (StgTSO *bqe, StgClosure *closure);
40 extern StgOffset checkClosure( StgClosure* p );
42 /* test whether an object is already on update list */
43 extern rtsBool isBlackhole( StgTSO* tso, StgClosure* p );