Add freeScheduler/freeTaskManager and call it later than exitScheduler
[ghc-hetmet.git] / rts / ClosureFlags.c
1 /* -----------------------------------------------------------------------------
2  *
3  * (c) The GHC Team 1998-1999
4  *
5  * Closure type flags
6  *
7  * ---------------------------------------------------------------------------*/
8
9 #include "PosixSource.h"
10 #include "Rts.h"
11
12 StgWord16 closure_flags[] = {
13
14 /* 
15  * These *must* be in the same order as the closure types in
16  * ClosureTypes.h.
17  */
18
19 /* ToDo: some of these flags seem to be duplicated.
20  *       - NS is the same as HNF, and the negation of THU
21  * (however, we set NS for indirections, which is probably the
22  *  right thing to do, since we never get indirections pointing
23  *  to thunks.)
24  */
25
26 /*                              0    1    2    3    4   5   6   7 */
27 /*                            HNF  BTM   NS  STA  THU MUT UPT SRT */
28
29 /* INVALID_OBJECT       = */ ( 0                                         ),
30 /* CONSTR               = */ (_HNF|     _NS                              ),
31 /* CONSTR_1_0           = */ (_HNF|     _NS                              ),
32 /* CONSTR_0_1           = */ (_HNF|     _NS                              ),
33 /* CONSTR_2_0           = */ (_HNF|     _NS                              ),
34 /* CONSTR_1_1           = */ (_HNF|     _NS                              ),
35 /* CONSTR_0_2           = */ (_HNF|     _NS                              ),
36 /* CONSTR_STATIC        = */ (_HNF|     _NS|_STA                         ),
37 /* CONSTR_NOCAF_STATIC  = */ (_HNF|     _NS|_STA                         ),
38 /* FUN                  = */ (_HNF|     _NS|                  _SRT       ),
39 /* FUN_1_0              = */ (_HNF|     _NS|                  _SRT       ),
40 /* FUN_0_1              = */ (_HNF|     _NS|                  _SRT       ),
41 /* FUN_2_0              = */ (_HNF|     _NS|                  _SRT       ),
42 /* FUN_1_1              = */ (_HNF|     _NS|                  _SRT       ),
43 /* FUN_0_2              = */ (_HNF|     _NS|                  _SRT       ),
44 /* FUN_STATIC           = */ (_HNF|     _NS|_STA|             _SRT       ),
45 /* THUNK                = */ (     _BTM|         _THU|        _SRT       ),
46 /* THUNK_1_0            = */ (     _BTM|         _THU|        _SRT       ),
47 /* THUNK_0_1            = */ (     _BTM|         _THU|        _SRT       ),
48 /* THUNK_2_0            = */ (     _BTM|         _THU|        _SRT       ),
49 /* THUNK_1_1            = */ (     _BTM|         _THU|        _SRT       ),
50 /* THUNK_0_2            = */ (     _BTM|         _THU|        _SRT       ),
51 /* THUNK_STATIC         = */ (     _BTM|    _STA|_THU|        _SRT       ),
52 /* THUNK_SELECTOR       = */ (     _BTM|         _THU|        _SRT       ),
53 /* BCO                  = */ (_HNF|     _NS                              ),
54 /* AP                   = */ (                   _THU                    ),
55 /* PAP                  = */ (_HNF|     _NS                              ),
56 /* AP_STACK             = */ (                   _THU                    ),
57 /* IND                  = */ (          _NS|                        _IND ),
58 /* IND_OLDGEN           = */ (          _NS|                        _IND ),
59 /* IND_PERM             = */ (          _NS|                        _IND ),
60 /* IND_OLDGEN_PERM      = */ (          _NS|                        _IND ),
61 /* IND_STATIC           = */ (          _NS|_STA|                   _IND ),
62 /* RET_BCO              = */ (     _BTM                                  ),
63 /* RET_SMALL            = */ (     _BTM|                       _SRT      ),
64 /* RET_VEC_SMALL        = */ (     _BTM|                       _SRT      ),
65 /* RET_BIG              = */ (                                 _SRT      ),
66 /* RET_VEC_BIG          = */ (                                 _SRT      ),
67 /* RET_DYN              = */ (                                 _SRT      ),
68 /* RET_FUN              = */ ( 0                                         ),
69 /* UPDATE_FRAME         = */ (     _BTM                                  ),
70 /* CATCH_FRAME          = */ (     _BTM                                  ),
71 /* STOP_FRAME           = */ (     _BTM                                  ),
72 /* CAF_BLACKHOLE        = */ (     _BTM|_NS|              _UPT           ),
73 /* BLACKHOLE            = */ (          _NS|              _UPT           ),
74 /* SE_BLACKHOLE         = */ (          _NS|              _UPT           ),
75 /* SE_CAF_BLACKHOLE     = */ (          _NS|              _UPT           ),
76 /* MVAR                 = */ (_HNF|     _NS|         _MUT|_UPT           ),
77 /* ARR_WORDS            = */ (_HNF|     _NS|              _UPT           ),
78 /* MUT_ARR_PTRS_CLEAN   = */ (_HNF|     _NS|         _MUT|_UPT           ),
79 /* MUT_ARR_PTRS_DIRTY   = */ (_HNF|     _NS|         _MUT|_UPT           ),
80 /* MUT_ARR_PTRS_FROZEN0 = */ (_HNF|     _NS|         _MUT|_UPT           ),
81 /* MUT_ARR_PTRS_FROZEN  = */ (_HNF|     _NS|              _UPT           ),
82 /* MUT_VAR_CLEAN        = */ (_HNF|     _NS|         _MUT|_UPT           ),
83 /* MUT_VAR_DIRTY        = */ (_HNF|     _NS|         _MUT|_UPT           ),
84 /* WEAK                 = */ (_HNF|     _NS|              _UPT           ),
85 /* STABLE_NAME          = */ (_HNF|     _NS|              _UPT           ),
86 /* TSO                  = */ (_HNF|     _NS|         _MUT|_UPT           ),
87 /* BLOCKED_FETCH        = */ (_HNF|     _NS|         _MUT|_UPT           ),
88 /* FETCH_ME             = */ (_HNF|     _NS|         _MUT|_UPT           ),
89 /* FETCH_ME_BQ          = */ (          _NS|         _MUT|_UPT           ),
90 /* RBH                  = */ (          _NS|         _MUT|_UPT           ),
91 /* EVACUATED            = */ ( 0                                         ),
92 /* REMOTE_REF           = */ (_HNF|     _NS|              _UPT           ),
93 /* TVAR_WATCH_QUEUE     = */ (          _NS|         _MUT|_UPT           ),
94 /* INVARIANT_CHECK_QUEUE= */ (          _NS|         _MUT|_UPT           ),
95 /* ATOMIC_INVARIANT     = */ (          _NS|         _MUT|_UPT           ),
96 /* TVAR                 = */ (_HNF|     _NS|         _MUT|_UPT           ), 
97 /* TREC_CHUNK           = */ (          _NS|         _MUT|_UPT           ),
98 /* TREC_HEADER          = */ (          _NS|         _MUT|_UPT           ),
99 /* ATOMICALLY_FRAME     = */ (     _BTM                                  ),
100 /* CATCH_RETRY_FRAME    = */ (     _BTM                                  ),
101 /* CATCH_STM_FRAME      = */ (     _BTM                                  )
102 };
103
104 #if N_CLOSURE_TYPES != 73
105 #error Closure types changed: update ClosureFlags.c!
106 #endif