[project @ 2001-03-22 03:51:08 by hwloidl]
[ghc-hetmet.git] / ghc / rts / Sanity.h
1 /* -----------------------------------------------------------------------------
2  * $Id: Sanity.h,v 1.8 2001/03/22 03:51:10 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
12 # if defined(PAR)
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
17 # endif
18
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 );
27 #if defined(GRAN)
28 extern void checkTSOsSanity(void);
29 extern rtsBool checkThreadQSanity (PEs proc, rtsBool check_TSO_too);
30 extern rtsBool checkThreadQsSanity (rtsBool check_TSO_too);
31 #endif
32 #if defined(PAR)
33 extern void checkBQ (StgBlockingQueueElement *bqe, StgClosure *closure);
34 extern void checkLAGAtable(rtsBool check_closures);
35 extern void checkHeapChunk(StgPtr start, StgPtr end);
36 #else
37 extern void checkBQ (StgTSO *bqe, StgClosure *closure);
38 #endif
39
40 extern StgOffset checkClosure( StgClosure* p );
41
42 /* test whether an object is already on update list */
43 extern rtsBool isBlackhole( StgTSO* tso, StgClosure* p );
44
45 #endif /* DEBUG */
46