Fold integer-simple.git into ghc.git (re #8545)
[ghc.git] / rts / sm / Sanity.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-1999
4 *
5 * Prototypes for functions in Sanity.c
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #ifndef SANITY_H
10 #define SANITY_H
11
12 #ifdef DEBUG
13
14 #include "BeginPrivate.h"
15
16 # if defined(PAR)
17 # define PVM_PE_MASK 0xfffc0000
18 # define MAX_PVM_PES MAX_PES
19 # define MAX_PVM_TIDS MAX_PES
20 # define MAX_SLOTS 100000
21 # endif
22
23 /* debugging routines */
24 void checkSanity ( rtsBool after_gc, rtsBool major_gc );
25 void checkNurserySanity ( nursery *nursery );
26 void checkHeapChain ( bdescr *bd );
27 void checkHeapChunk ( StgPtr start, StgPtr end );
28 void checkLargeObjects ( bdescr *bd );
29 void checkTSO ( StgTSO* tso );
30 void checkGlobalTSOList ( rtsBool checkTSOs );
31 void checkStaticObjects ( StgClosure* static_objects );
32 void checkStackChunk ( StgPtr sp, StgPtr stack_end );
33 StgOffset checkStackFrame ( StgPtr sp );
34 StgOffset checkClosure ( StgClosure* p );
35
36 void checkRunQueue (Capability *cap);
37
38 void memInventory (rtsBool show);
39
40 void checkBQ (StgTSO *bqe, StgClosure *closure);
41
42 #include "EndPrivate.h"
43
44 #endif /* DEBUG */
45
46 #endif /* SANITY_H */