MiscClosures.h 13.9 KB
Newer Older
1
2
/* ----------------------------------------------------------------------------
 *
3
 * (c) The GHC Team, 1998-2009
4
 *
5
 * Declarations for various symbols exported by the RTS.
6
 *
7
8
9
 * ToDo: many of the symbols in here don't need to be exported, but
 * our Cmm code generator doesn't know how to generate local symbols
 * for the RTS bits (it assumes all RTS symbols are external).
10
 *
11
12
 * See wiki:Commentary/Compiler/Backends/PprC#Prototypes
 *
13
14
15
 * Do not #include this file directly: #include "Rts.h" instead.
 *
 * To understand the structure of the RTS headers, see the wiki:
16
 *   http://ghc.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
17
 *
18
19
20
21
22
23
24
25
26
27
 * --------------------------------------------------------------------------*/

#ifndef STGMISCCLOSURES_H
#define STGMISCCLOSURES_H

#if IN_STG_CODE
#  define RTS_RET_INFO(i)   extern W_(i)[]
#  define RTS_FUN_INFO(i)   extern W_(i)[]
#  define RTS_THUNK_INFO(i) extern W_(i)[]
#  define RTS_INFO(i)       extern W_(i)[]
28
#  define RTS_CLOSURE(i)    extern W_(i ## _static_closure)[]
29
#  define RTS_FUN_DECL(f)   extern DLL_IMPORT_RTS StgFunPtr f(void)
30
31
32
33
34
#else
#  define RTS_RET_INFO(i)   extern DLL_IMPORT_RTS const StgRetInfoTable i
#  define RTS_FUN_INFO(i)   extern DLL_IMPORT_RTS const StgFunInfoTable i
#  define RTS_THUNK_INFO(i) extern DLL_IMPORT_RTS const StgThunkInfoTable i
#  define RTS_INFO(i)       extern DLL_IMPORT_RTS const StgInfoTable i
35
#  define RTS_CLOSURE(i)    extern DLL_IMPORT_RTS StgClosure i ## _static_closure
36
#  define RTS_FUN_DECL(f)   extern DLL_IMPORT_RTS StgFunPtr f(void)
37
#endif
38

39
#ifdef TABLES_NEXT_TO_CODE
40
41
42
43
#  define RTS_RET(f)      RTS_INFO(f##_info)
#  define RTS_ENTRY(f)    RTS_INFO(f##_info)
#  define RTS_FUN(f)      RTS_FUN_INFO(f##_info)
#  define RTS_THUNK(f)    RTS_THUNK_INFO(f##_info)
44
#else
45
46
47
48
#  define RTS_RET(f)      RTS_INFO(f##_info);  RTS_FUN_DECL(f##_ret)
#  define RTS_ENTRY(f)    RTS_INFO(f##_info);  RTS_FUN_DECL(f##_entry)
#  define RTS_FUN(f)      RTS_FUN_INFO(f##_info); RTS_FUN_DECL(f##_entry)
#  define RTS_THUNK(f)    RTS_THUNK_INFO(f##_info); RTS_FUN_DECL(f##_entry)
49
#endif
50

51
/* Stack frames */
52
53
54
55
56
57
58
59
60
RTS_RET(stg_upd_frame);
RTS_RET(stg_bh_upd_frame);
RTS_RET(stg_marked_upd_frame);
RTS_RET(stg_noupd_frame);
RTS_RET(stg_catch_frame);
RTS_RET(stg_catch_retry_frame);
RTS_RET(stg_atomically_frame);
RTS_RET(stg_atomically_waiting_frame);
RTS_RET(stg_catch_stm_frame);
61
62
63
RTS_RET(stg_unmaskAsyncExceptionszh_ret);
RTS_RET(stg_maskUninterruptiblezh_ret);
RTS_RET(stg_maskAsyncExceptionszh_ret);
64
RTS_RET(stg_stack_underflow_frame);
65
RTS_RET(stg_restore_cccs);
66

67
68
69
70
71
72
// RTS_FUN(stg_interp_constr_entry);
//
// This is referenced using the FFI in the compiler (ByteCodeItbls),
// so we can't give it the correct type here because the prototypes
// would clash (FFI references are always declared with type StgWord[]
// in the generated C code).
73
74

/* Magic glue code for when compiled code returns a value in R1/F1/D1
75
   or a VoidRep to the interpreter. */
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
RTS_RET(stg_ctoi_R1p);
RTS_RET(stg_ctoi_R1unpt);
RTS_RET(stg_ctoi_R1n);
RTS_RET(stg_ctoi_F1);
RTS_RET(stg_ctoi_D1);
RTS_RET(stg_ctoi_L1);
RTS_RET(stg_ctoi_V);

RTS_RET(stg_apply_interp);

RTS_ENTRY(stg_IND);
RTS_ENTRY(stg_IND_direct);
RTS_ENTRY(stg_IND_STATIC);
RTS_ENTRY(stg_IND_PERM);
RTS_ENTRY(stg_BLACKHOLE);
RTS_ENTRY(stg_CAF_BLACKHOLE);
RTS_ENTRY(__stg_EAGER_BLACKHOLE);
RTS_ENTRY(stg_WHITEHOLE);
RTS_ENTRY(stg_BLOCKING_QUEUE_CLEAN);
RTS_ENTRY(stg_BLOCKING_QUEUE_DIRTY);

RTS_FUN(stg_BCO);
RTS_ENTRY(stg_EVACUATED);
RTS_ENTRY(stg_WEAK);
RTS_ENTRY(stg_DEAD_WEAK);
101
RTS_ENTRY(stg_C_FINALIZER_LIST);
102
103
104
RTS_ENTRY(stg_STABLE_NAME);
RTS_ENTRY(stg_MVAR_CLEAN);
RTS_ENTRY(stg_MVAR_DIRTY);
105
106
RTS_ENTRY(stg_TVAR_CLEAN);
RTS_ENTRY(stg_TVAR_DIRTY);
107
RTS_ENTRY(stg_TSO);
108
RTS_ENTRY(stg_STACK);
109
110
111
112
113
114
RTS_ENTRY(stg_ARR_WORDS);
RTS_ENTRY(stg_MUT_ARR_WORDS);
RTS_ENTRY(stg_MUT_ARR_PTRS_CLEAN);
RTS_ENTRY(stg_MUT_ARR_PTRS_DIRTY);
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN);
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN0);
115
116
117
118
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_CLEAN);
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_DIRTY);
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN);
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN0);
119
120
121
RTS_ENTRY(stg_MUT_VAR_CLEAN);
RTS_ENTRY(stg_MUT_VAR_DIRTY);
RTS_ENTRY(stg_END_TSO_QUEUE);
122
RTS_ENTRY(stg_GCD_CAF);
Ben Gamari's avatar
Ben Gamari committed
123
RTS_ENTRY(stg_STM_AWOKEN);
124
125
126
127
128
129
130
131
132
133
RTS_ENTRY(stg_MSG_TRY_WAKEUP);
RTS_ENTRY(stg_MSG_THROWTO);
RTS_ENTRY(stg_MSG_BLACKHOLE);
RTS_ENTRY(stg_MSG_NULL);
RTS_ENTRY(stg_MVAR_TSO_QUEUE);
RTS_ENTRY(stg_catch);
RTS_ENTRY(stg_PAP);
RTS_ENTRY(stg_AP);
RTS_ENTRY(stg_AP_NOUPD);
RTS_ENTRY(stg_AP_STACK);
134
RTS_ENTRY(stg_AP_STACK_NOUPD);
135
136
137
RTS_ENTRY(stg_dummy_ret);
RTS_ENTRY(stg_raise);
RTS_ENTRY(stg_raise_ret);
138
RTS_ENTRY(stg_atomically);
139
140
141
142
143
144
145
146
147
RTS_ENTRY(stg_TVAR_WATCH_QUEUE);
RTS_ENTRY(stg_INVARIANT_CHECK_QUEUE);
RTS_ENTRY(stg_ATOMIC_INVARIANT);
RTS_ENTRY(stg_TREC_CHUNK);
RTS_ENTRY(stg_TREC_HEADER);
RTS_ENTRY(stg_END_STM_WATCH_QUEUE);
RTS_ENTRY(stg_END_INVARIANT_CHECK_QUEUE);
RTS_ENTRY(stg_END_STM_CHUNK_LIST);
RTS_ENTRY(stg_NO_TREC);
148

149
150
/* closures */

151
152
153
154
155
RTS_CLOSURE(stg_END_TSO_QUEUE);
RTS_CLOSURE(stg_STM_AWOKEN);
RTS_CLOSURE(stg_NO_FINALIZER);
RTS_CLOSURE(stg_dummy_ret);
RTS_CLOSURE(stg_forceIO);
156

157
158
159
160
RTS_CLOSURE(stg_END_STM_WATCH_QUEUE);
RTS_CLOSURE(stg_END_INVARIANT_CHECK_QUEUE);
RTS_CLOSURE(stg_END_STM_CHUNK_LIST);
RTS_CLOSURE(stg_NO_TREC);
161

162
RTS_ENTRY(stg_NO_FINALIZER_entry);
163

164
#if IN_STG_CODE
165
166
extern DLL_IMPORT_RTS StgWordArray stg_CHARLIKE_static_closure;
extern DLL_IMPORT_RTS StgWordArray stg_INTLIKE_static_closure;
167
#else
168
169
extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_CHARLIKE_static_closure[];
extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_INTLIKE_static_closure[];
170
171
172
173
#endif

/* StgStartup */

174
175
RTS_RET(stg_forceIO);
RTS_RET(stg_noforceIO);
176

177
/* standard entry points */
178

179
180
/* standard selector thunks */

181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
RTS_ENTRY(stg_sel_0_upd);
RTS_ENTRY(stg_sel_1_upd);
RTS_ENTRY(stg_sel_2_upd);
RTS_ENTRY(stg_sel_3_upd);
RTS_ENTRY(stg_sel_4_upd);
RTS_ENTRY(stg_sel_5_upd);
RTS_ENTRY(stg_sel_6_upd);
RTS_ENTRY(stg_sel_7_upd);
RTS_ENTRY(stg_sel_8_upd);
RTS_ENTRY(stg_sel_9_upd);
RTS_ENTRY(stg_sel_10_upd);
RTS_ENTRY(stg_sel_11_upd);
RTS_ENTRY(stg_sel_12_upd);
RTS_ENTRY(stg_sel_13_upd);
RTS_ENTRY(stg_sel_14_upd);
RTS_ENTRY(stg_sel_15_upd);

RTS_ENTRY(stg_sel_0_noupd);
RTS_ENTRY(stg_sel_1_noupd);
RTS_ENTRY(stg_sel_2_noupd);
RTS_ENTRY(stg_sel_3_noupd);
RTS_ENTRY(stg_sel_4_noupd);
RTS_ENTRY(stg_sel_5_noupd);
RTS_ENTRY(stg_sel_6_noupd);
RTS_ENTRY(stg_sel_7_noupd);
RTS_ENTRY(stg_sel_8_noupd);
RTS_ENTRY(stg_sel_9_noupd);
RTS_ENTRY(stg_sel_10_noupd);
RTS_ENTRY(stg_sel_11_noupd);
RTS_ENTRY(stg_sel_12_noupd);
RTS_ENTRY(stg_sel_13_noupd);
RTS_ENTRY(stg_sel_14_noupd);
RTS_ENTRY(stg_sel_15_noupd);
214
215
216

/* standard ap thunks */

217
218
219
220
221
222
223
RTS_THUNK(stg_ap_1_upd);
RTS_THUNK(stg_ap_2_upd);
RTS_THUNK(stg_ap_3_upd);
RTS_THUNK(stg_ap_4_upd);
RTS_THUNK(stg_ap_5_upd);
RTS_THUNK(stg_ap_6_upd);
RTS_THUNK(stg_ap_7_upd);
224

225
/* standard application routines (see also utils/genapply,
226
227
 * and compiler/codeGen/CgStackery.lhs).
 */
228
229
230
231
RTS_RET(stg_ap_v);
RTS_RET(stg_ap_f);
RTS_RET(stg_ap_d);
RTS_RET(stg_ap_l);
232
RTS_RET(stg_ap_v16);
233
RTS_RET(stg_ap_v32);
234
RTS_RET(stg_ap_v64);
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
RTS_RET(stg_ap_n);
RTS_RET(stg_ap_p);
RTS_RET(stg_ap_pv);
RTS_RET(stg_ap_pp);
RTS_RET(stg_ap_ppv);
RTS_RET(stg_ap_ppp);
RTS_RET(stg_ap_pppv);
RTS_RET(stg_ap_pppp);
RTS_RET(stg_ap_ppppp);
RTS_RET(stg_ap_pppppp);

RTS_FUN_DECL(stg_ap_0_fast);
RTS_FUN_DECL(stg_ap_v_fast);
RTS_FUN_DECL(stg_ap_f_fast);
RTS_FUN_DECL(stg_ap_d_fast);
RTS_FUN_DECL(stg_ap_l_fast);
251
RTS_FUN_DECL(stg_ap_v16_fast);
252
RTS_FUN_DECL(stg_ap_v32_fast);
253
RTS_FUN_DECL(stg_ap_v64_fast);
254
255
256
257
258
259
260
261
262
263
264
RTS_FUN_DECL(stg_ap_n_fast);
RTS_FUN_DECL(stg_ap_p_fast);
RTS_FUN_DECL(stg_ap_pv_fast);
RTS_FUN_DECL(stg_ap_pp_fast);
RTS_FUN_DECL(stg_ap_ppv_fast);
RTS_FUN_DECL(stg_ap_ppp_fast);
RTS_FUN_DECL(stg_ap_pppv_fast);
RTS_FUN_DECL(stg_ap_pppp_fast);
RTS_FUN_DECL(stg_ap_ppppp_fast);
RTS_FUN_DECL(stg_ap_pppppp_fast);
RTS_FUN_DECL(stg_PAP_apply);
265

266
267
/* standard GC & stack check entry points, all defined in HeapStackCheck.hc */

268
269
RTS_FUN_DECL(stg_gc_noregs);

270
271
RTS_RET(stg_enter_checkbh);

272
273
274
275
276
277
RTS_RET(stg_ret_v);
RTS_RET(stg_ret_p);
RTS_RET(stg_ret_n);
RTS_RET(stg_ret_f);
RTS_RET(stg_ret_d);
RTS_RET(stg_ret_l);
278

279
RTS_FUN_DECL(stg_gc_prim);
280
281
282
283
RTS_FUN_DECL(stg_gc_prim_p);
RTS_FUN_DECL(stg_gc_prim_pp);
RTS_FUN_DECL(stg_gc_prim_n);

284
285
286
RTS_RET(stg_gc_prim_p_ll_ret);
RTS_FUN_DECL(stg_gc_prim_p_ll);

287
RTS_RET(stg_enter);
288
289
290
291
292
293
294
RTS_FUN_DECL(__stg_gc_enter_1);

RTS_FUN_DECL(stg_gc_unpt_r1);
RTS_FUN_DECL(stg_gc_unbx_r1);
RTS_FUN_DECL(stg_gc_f1);
RTS_FUN_DECL(stg_gc_d1);
RTS_FUN_DECL(stg_gc_l1);
295
296
297
RTS_FUN_DECL(stg_gc_pp);
RTS_FUN_DECL(stg_gc_ppp);
RTS_FUN_DECL(stg_gc_pppp);
298
299
300
301
302
303
304
305
306
307

RTS_RET(stg_gc_fun);
RTS_FUN_DECL(__stg_gc_fun);

RTS_FUN_DECL(stg_yield_noregs);
RTS_FUN_DECL(stg_yield_to_interpreter);
RTS_FUN_DECL(stg_block_noregs);
RTS_FUN_DECL(stg_block_blackhole);
RTS_FUN_DECL(stg_block_blackhole_finally);
RTS_FUN_DECL(stg_block_takemvar);
308
RTS_FUN_DECL(stg_block_readmvar);
309
RTS_RET(stg_block_takemvar);
310
RTS_RET(stg_block_readmvar);
311
312
RTS_FUN_DECL(stg_block_putmvar);
RTS_RET(stg_block_putmvar);
313
#ifdef mingw32_HOST_OS
314
315
316
317
RTS_FUN_DECL(stg_block_async);
RTS_RET(stg_block_async);
RTS_FUN_DECL(stg_block_async_void);
RTS_RET(stg_block_async_void);
318
#endif
319
320
321
RTS_FUN_DECL(stg_block_stmwait);
RTS_FUN_DECL(stg_block_throwto);
RTS_RET(stg_block_throwto);
322
323
324

/* Entry/exit points from StgStartup.cmm */

325
RTS_RET(stg_stop_thread);
326

327
328
329
330
331
RTS_FUN_DECL(stg_returnToStackTop);
RTS_FUN_DECL(stg_returnToSched);
RTS_FUN_DECL(stg_returnToSchedNotPaused);
RTS_FUN_DECL(stg_returnToSchedButFirst);
RTS_FUN_DECL(stg_threadFinished);
332

333
334
RTS_FUN_DECL(stg_init_finish);
RTS_FUN_DECL(stg_init);
335

336
RTS_FUN_DECL(StgReturn);
337

338
339
340
341
/* -----------------------------------------------------------------------------
   PrimOps
   -------------------------------------------------------------------------- */

342
343
RTS_FUN_DECL(stg_decodeFloatzuIntzh);
RTS_FUN_DECL(stg_decodeDoublezu2Intzh);
344
RTS_FUN_DECL(stg_decodeDoublezuInt64zh);
345
346

RTS_FUN_DECL(stg_unsafeThawArrayzh);
347
RTS_FUN_DECL(stg_casArrayzh);
348
349
350
RTS_FUN_DECL(stg_newByteArrayzh);
RTS_FUN_DECL(stg_newPinnedByteArrayzh);
RTS_FUN_DECL(stg_newAlignedPinnedByteArrayzh);
351
RTS_FUN_DECL(stg_shrinkMutableByteArrayzh);
Gabor Greif's avatar
Gabor Greif committed
352
RTS_FUN_DECL(stg_resizzeMutableByteArrayzh);
353
RTS_FUN_DECL(stg_casIntArrayzh);
354
RTS_FUN_DECL(stg_newArrayzh);
355
RTS_FUN_DECL(stg_newArrayArrayzh);
tibbe's avatar
tibbe committed
356
357
358
359
RTS_FUN_DECL(stg_copyArrayzh);
RTS_FUN_DECL(stg_copyMutableArrayzh);
RTS_FUN_DECL(stg_copyArrayArrayzh);
RTS_FUN_DECL(stg_copyMutableArrayArrayzh);
360
361
362
363
RTS_FUN_DECL(stg_cloneArrayzh);
RTS_FUN_DECL(stg_cloneMutableArrayzh);
RTS_FUN_DECL(stg_freezzeArrayzh);
RTS_FUN_DECL(stg_thawArrayzh);
364

365
366
367
368
369
370
371
372
373
374
RTS_FUN_DECL(stg_newSmallArrayzh);
RTS_FUN_DECL(stg_unsafeThawSmallArrayzh);
RTS_FUN_DECL(stg_cloneSmallArrayzh);
RTS_FUN_DECL(stg_cloneSmallMutableArrayzh);
RTS_FUN_DECL(stg_freezzeSmallArrayzh);
RTS_FUN_DECL(stg_thawSmallArrayzh);
RTS_FUN_DECL(stg_copySmallArrayzh);
RTS_FUN_DECL(stg_copySmallMutableArrayzh);
RTS_FUN_DECL(stg_casSmallArrayzh);

375
376
RTS_FUN_DECL(stg_newMutVarzh);
RTS_FUN_DECL(stg_atomicModifyMutVarzh);
Simon Marlow's avatar
Simon Marlow committed
377
RTS_FUN_DECL(stg_casMutVarzh);
378
379
380
381
382

RTS_FUN_DECL(stg_isEmptyMVarzh);
RTS_FUN_DECL(stg_newMVarzh);
RTS_FUN_DECL(stg_takeMVarzh);
RTS_FUN_DECL(stg_putMVarzh);
383
RTS_FUN_DECL(stg_readMVarzh);
384
385
RTS_FUN_DECL(stg_tryTakeMVarzh);
RTS_FUN_DECL(stg_tryPutMVarzh);
386
RTS_FUN_DECL(stg_tryReadMVarzh);
387
388
389
390

RTS_FUN_DECL(stg_waitReadzh);
RTS_FUN_DECL(stg_waitWritezh);
RTS_FUN_DECL(stg_delayzh);
391
#ifdef mingw32_HOST_OS
392
393
394
RTS_FUN_DECL(stg_asyncReadzh);
RTS_FUN_DECL(stg_asyncWritezh);
RTS_FUN_DECL(stg_asyncDoProczh);
sof's avatar
sof committed
395
#endif
396

397
398
399
400
401
402
403
404
405
406
407
RTS_FUN_DECL(stg_catchzh);
RTS_FUN_DECL(stg_raisezh);
RTS_FUN_DECL(stg_raiseIOzh);

RTS_FUN_DECL(stg_makeStableNamezh);
RTS_FUN_DECL(stg_makeStablePtrzh);
RTS_FUN_DECL(stg_deRefStablePtrzh);

RTS_FUN_DECL(stg_forkzh);
RTS_FUN_DECL(stg_forkOnzh);
RTS_FUN_DECL(stg_yieldzh);
408
RTS_FUN_DECL(stg_killMyself);
409
RTS_FUN_DECL(stg_killThreadzh);
410
411
412
413
RTS_FUN_DECL(stg_getMaskingStatezh);
RTS_FUN_DECL(stg_maskAsyncExceptionszh);
RTS_FUN_DECL(stg_maskUninterruptiblezh);
RTS_FUN_DECL(stg_unmaskAsyncExceptionszh);
414
415
416
417
418
419
RTS_FUN_DECL(stg_myThreadIdzh);
RTS_FUN_DECL(stg_labelThreadzh);
RTS_FUN_DECL(stg_isCurrentThreadBoundzh);
RTS_FUN_DECL(stg_threadStatuszh);

RTS_FUN_DECL(stg_mkWeakzh);
420
RTS_FUN_DECL(stg_mkWeakNoFinalizzerzh);
421
RTS_FUN_DECL(stg_mkWeakForeignzh);
422
RTS_FUN_DECL(stg_addCFinalizzerToWeakzh);
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
RTS_FUN_DECL(stg_finalizzeWeakzh);
RTS_FUN_DECL(stg_deRefWeakzh);

RTS_FUN_DECL(stg_newBCOzh);
RTS_FUN_DECL(stg_mkApUpd0zh);

RTS_FUN_DECL(stg_retryzh);
RTS_FUN_DECL(stg_catchRetryzh);
RTS_FUN_DECL(stg_catchSTMzh);
RTS_FUN_DECL(stg_atomicallyzh);
RTS_FUN_DECL(stg_newTVarzh);
RTS_FUN_DECL(stg_readTVarzh);
RTS_FUN_DECL(stg_readTVarIOzh);
RTS_FUN_DECL(stg_writeTVarzh);
RTS_FUN_DECL(stg_checkzh);

RTS_FUN_DECL(stg_unpackClosurezh);
RTS_FUN_DECL(stg_getApStackValzh);
RTS_FUN_DECL(stg_getSparkzh);
Simon Marlow's avatar
Simon Marlow committed
442
RTS_FUN_DECL(stg_numSparkszh);
443
444
445
446
447

RTS_FUN_DECL(stg_noDuplicatezh);

RTS_FUN_DECL(stg_traceCcszh);
RTS_FUN_DECL(stg_traceEventzh);
448
RTS_FUN_DECL(stg_traceMarkerzh);
449

450
/* Other misc stuff */
451
// See wiki:Commentary/Compiler/Backends/PprC#Prototypes
452
453
454

#if IN_STG_CODE && !IN_STGCRUN

455
456
457
458
459
// Interpreter.c
extern StgWord rts_stop_next_breakpoint[];
extern StgWord rts_stop_on_exception[];
extern StgWord rts_breakpoint_io_action[];

460
461
462
463
464
465
466
467
468
// Schedule.c
extern StgWord RTS_VAR(blocked_queue_hd), RTS_VAR(blocked_queue_tl);
extern StgWord RTS_VAR(sleeping_queue);
extern StgWord RTS_VAR(blackhole_queue);
extern StgWord RTS_VAR(sched_mutex);

// Apply.cmm
// canned bitmap for each arg type
extern StgWord stg_arg_bitmaps[];
469
470
extern StgWord stg_ap_stack_entries[];
extern StgWord stg_stack_save_entries[];
471
472

// Storage.c
473
extern unsigned int RTS_VAR(g0);
474
extern unsigned int RTS_VAR(large_alloc_lim);
475
476
477
478
479
480
extern StgWord RTS_VAR(atomic_modify_mutvar_mutex);

// RtsFlags
extern StgWord RTS_VAR(RtsFlags); // bogus type

// Stable.c
481
extern StgWord RTS_VAR(stable_ptr_table);
482
extern StgWord RTS_VAR(stable_name_table);
483
484
485
486

// Profiling.c
extern unsigned int RTS_VAR(era);
extern unsigned int RTS_VAR(entering_PAP);
Gabor Greif's avatar
Gabor Greif committed
487
extern StgWord      RTS_VAR(CC_LIST);          /* registered CC list */
488
extern StgWord      RTS_VAR(CCS_LIST);         /* registered CCS list */
489
extern StgWord      CCS_SYSTEM[];
Gabor Greif's avatar
Gabor Greif committed
490
extern unsigned int RTS_VAR(CC_ID);            /* global ids */
491
extern unsigned int RTS_VAR(CCS_ID);
492
493
RTS_FUN_DECL(enterFunCCS);
RTS_FUN_DECL(pushCostCentre);
494

495
496
497
// Capability.c
extern unsigned int n_capabilities;

498
499
#endif

500
#endif /* STGMISCCLOSURES_H */