Reorganisation to fix problems related to the gct register variable
[ghc.git] / rts / sm / GC.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team 1998-2006
4 *
5 * Generational garbage collector
6 *
7 * Documentation on the architecture of the Garbage Collector can be
8 * found in the online commentary:
9 *
10 * http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/GC
11 *
12 * ---------------------------------------------------------------------------*/
13
14 #ifndef GC_H
15 #define GC_H
16
17 extern nat N;
18 extern rtsBool major_gc;
19
20 extern bdescr *mark_stack_bdescr;
21 extern StgPtr *mark_stack;
22 extern StgPtr *mark_sp;
23 extern StgPtr *mark_splim;
24
25 extern rtsBool mark_stack_overflowed;
26 extern bdescr *oldgen_scan_bd;
27 extern StgPtr oldgen_scan;
28
29 extern long copied;
30
31 #ifdef DEBUG
32 extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS;
33 #endif
34
35 extern void markSomeCapabilities (evac_fn evac, void *user, nat i0, nat delta);
36
37 #ifdef THREADED_RTS
38 extern SpinLock gc_alloc_block_sync;
39 #endif
40
41 #if defined(PROF_SPIN) && defined(THREADED_RTS)
42 StgWord64 whitehole_spin;
43 #endif
44
45 #define WORK_UNIT_WORDS 128
46
47 #endif /* GC_H */