Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 424 lines (357 sloc) 12.783 kb
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
1 /* ----------------------------------------------------------------------------
7f309f1 [project @ 1999-02-05 16:02:18 by simonm]
simonm authored
2 *
423d477 [project @ 2004-08-13 13:04:50 by simonmar]
simonmar authored
3 * (c) The GHC Team, 1998-2004
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
4 *
5 * Closures
6 *
7 * -------------------------------------------------------------------------- */
8
a2a67cd @simonmar RTS tidyup sweep, first phase
simonmar authored
9 #ifndef RTS_STORAGE_CLOSURES_H
10 #define RTS_STORAGE_CLOSURES_H
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
11
12 /*
13 * The Layout of a closure header depends on which kind of system we're
14 * compiling for: profiling, parallel, ticky, etc.
15 */
16
17 /* -----------------------------------------------------------------------------
18 The profiling header
19 -------------------------------------------------------------------------- */
20
21 typedef struct {
db61851 [project @ 2001-11-22 14:25:11 by simonmar]
simonmar authored
22 CostCentreStack *ccs;
23 union {
03dc2dd [project @ 2005-03-27 13:41:13 by panne]
panne authored
24 struct _RetainerSet *rs; /* Retainer Set */
25 StgWord ldvw; /* Lag/Drag/Void Word */
db61851 [project @ 2001-11-22 14:25:11 by simonmar]
simonmar authored
26 } hp;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
27 } StgProfHeader;
28
29 /* -----------------------------------------------------------------------------
0f3205e [project @ 2005-04-22 09:32:39 by simonmar]
simonmar authored
30 The SMP header
beb5737 make the smp way RTS-only, normal libraries now work with -smp
Simon Marlow authored
31
32 A thunk has a padding word to take the updated value. This is so
33 that the update doesn't overwrite the payload, so we can avoid
34 needing to lock the thunk during entry and update.
35
36 Note: this doesn't apply to THUNK_STATICs, which have no payload.
37
38 Note: we leave this padding word in all ways, rather than just SMP,
39 so that we don't have to recompile all our libraries for SMP.
0f3205e [project @ 2005-04-22 09:32:39 by simonmar]
simonmar authored
40 -------------------------------------------------------------------------- */
41
42 typedef struct {
43 StgWord pad;
44 } StgSMPThunkHeader;
45
46 /* -----------------------------------------------------------------------------
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
47 The full fixed-size closure header
48
49 The size of the fixed header is the sum of the optional parts plus a single
50 word for the entry code pointer.
51 -------------------------------------------------------------------------- */
52
53 typedef struct {
a2a67cd @simonmar RTS tidyup sweep, first phase
simonmar authored
54 const StgInfoTable* info;
612755b [project @ 1999-02-05 12:41:31 by sof]
sof authored
55 #ifdef PROFILING
0f3205e [project @ 2005-04-22 09:32:39 by simonmar]
simonmar authored
56 StgProfHeader prof;
612755b [project @ 1999-02-05 12:41:31 by sof]
sof authored
57 #endif
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
58 } StgHeader;
59
0f3205e [project @ 2005-04-22 09:32:39 by simonmar]
simonmar authored
60 typedef struct {
a2a67cd @simonmar RTS tidyup sweep, first phase
simonmar authored
61 const StgInfoTable* info;
0f3205e [project @ 2005-04-22 09:32:39 by simonmar]
simonmar authored
62 #ifdef PROFILING
63 StgProfHeader prof;
64 #endif
65 StgSMPThunkHeader smp;
66 } StgThunkHeader;
67
beb5737 make the smp way RTS-only, normal libraries now work with -smp
Simon Marlow authored
68 #define THUNK_EXTRA_HEADER_W (sizeofW(StgThunkHeader)-sizeofW(StgHeader))
69
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
70 /* -----------------------------------------------------------------------------
71 Closure Types
72
73 For any given closure type (defined in InfoTables.h), there is a
74 corresponding structure defined below. The name of the structure
75 is obtained by concatenating the closure type with '_closure'
76 -------------------------------------------------------------------------- */
77
78 /* All closures follow the generic format */
79
a2a67cd @simonmar RTS tidyup sweep, first phase
simonmar authored
80 typedef struct StgClosure_ {
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
81 StgHeader header;
aa84d93 [project @ 2001-08-29 17:24:25 by qrczak]
qrczak authored
82 struct StgClosure_ *payload[FLEXIBLE_ARRAY];
22574cf @simonmar fix comment (#7907)
simonmar authored
83 } *StgClosurePtr; // StgClosure defined in rts/Types.h
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
84
85 typedef struct {
0f3205e [project @ 2005-04-22 09:32:39 by simonmar]
simonmar authored
86 StgThunkHeader header;
87 struct StgClosure_ *payload[FLEXIBLE_ARRAY];
88 } StgThunk;
89
90 typedef struct {
91 StgThunkHeader header;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
92 StgClosure *selectee;
93 } StgSelector;
94
95 typedef struct {
96 StgHeader header;
0bffc41 [project @ 2002-12-11 15:36:20 by simonmar]
simonmar authored
97 StgHalfWord arity; /* zero if it is an AP */
98 StgHalfWord n_args;
99 StgClosure *fun; /* really points to a fun */
aa84d93 [project @ 2001-08-29 17:24:25 by qrczak]
qrczak authored
100 StgClosure *payload[FLEXIBLE_ARRAY];
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
101 } StgPAP;
102
0f3205e [project @ 2005-04-22 09:32:39 by simonmar]
simonmar authored
103 typedef struct {
104 StgThunkHeader header;
105 StgHalfWord arity; /* zero if it is an AP */
106 StgHalfWord n_args;
107 StgClosure *fun; /* really points to a fun */
108 StgClosure *payload[FLEXIBLE_ARRAY];
109 } StgAP;
0bffc41 [project @ 2002-12-11 15:36:20 by simonmar]
simonmar authored
110
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
111 typedef struct {
0f3205e [project @ 2005-04-22 09:32:39 by simonmar]
simonmar authored
112 StgThunkHeader header;
03dc2dd [project @ 2005-03-27 13:41:13 by panne]
panne authored
113 StgWord size; /* number of words in payload */
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
114 StgClosure *fun;
03dc2dd [project @ 2005-03-27 13:41:13 by panne]
panne authored
115 StgClosure *payload[FLEXIBLE_ARRAY]; /* contains a chunk of *stack* */
0bffc41 [project @ 2002-12-11 15:36:20 by simonmar]
simonmar authored
116 } StgAP_STACK;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
117
118 typedef struct {
418a70d [project @ 2000-08-15 11:48:06 by simonmar]
simonmar authored
119 StgHeader header;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
120 StgClosure *indirectee;
121 } StgInd;
122
123 typedef struct {
b75f6d0 [project @ 1999-03-09 14:24:43 by sewardj]
sewardj authored
124 StgHeader header;
ee3e75b [project @ 2001-01-29 17:23:40 by simonmar]
simonmar authored
125 StgClosure *indirectee;
126 StgClosure *static_link;
d0bfe30 @simonmar add a const
simonmar authored
127 const StgInfoTable *saved_info;
ee3e75b [project @ 2001-01-29 17:23:40 by simonmar]
simonmar authored
128 } StgIndStatic;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
129
5d52d9b @simonmar New implementation of BLACKHOLEs
simonmar authored
130 typedef struct StgBlockingQueue_ {
131 StgHeader header;
132 struct StgBlockingQueue_ *link; // here so it looks like an IND
133 StgClosure *bh; // the BLACKHOLE
134 StgTSO *owner;
135 struct MessageBlackHole_ *queue;
136 } StgBlockingQueue;
137
ac5ff64 @Tarrasch Comment on StgArrWords vs StgArrBytes
Tarrasch authored
138 /* This struct should be called StgArrBytes rather than StgArrWords.
139 *
140 * One might be very tempted to store the number of words in the bytes field,
141 * but the garbage collector will erase your data then.
142 *
143 * It's name is for historical reasons, see #3800
144 */
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
145 typedef struct {
146 StgHeader header;
17c8229 @aslatter FIX #38000 Store StgArrWords payload size in bytes
aslatter authored
147 StgWord bytes;
aa84d93 [project @ 2001-08-29 17:24:25 by qrczak]
qrczak authored
148 StgWord payload[FLEXIBLE_ARRAY];
ac5ff64 @Tarrasch Comment on StgArrWords vs StgArrBytes
Tarrasch authored
149 } StgArrWords; // TODO: s/StgArrWords/StgArrBytes (#8552)
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
150
151 typedef struct {
152 StgHeader header;
153 StgWord ptrs;
0417404 @simonmar Fix #650: use a card table to mark dirty sections of mutable arrays
simonmar authored
154 StgWord size; // ptrs plus card table
aa84d93 [project @ 2001-08-29 17:24:25 by qrczak]
qrczak authored
155 StgClosure *payload[FLEXIBLE_ARRAY];
0417404 @simonmar Fix #650: use a card table to mark dirty sections of mutable arrays
simonmar authored
156 // see also: StgMutArrPtrs macros in ClosureMacros.h
4391e44 [project @ 1999-01-13 17:25:37 by simonm]
simonm authored
157 } StgMutArrPtrs;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
158
159 typedef struct {
160 StgHeader header;
161 StgClosure *var;
162 } StgMutVar;
163
164 typedef struct _StgUpdateFrame {
165 StgHeader header;
166 StgClosure *updatee;
167 } StgUpdateFrame;
168
169 typedef struct {
170 StgHeader header;
ad3b79d @simonmar New asynchronous exception control API (ghc parts)
simonmar authored
171 StgWord exceptions_blocked;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
172 StgClosure *handler;
173 } StgCatchFrame;
174
175 typedef struct {
f30d527 @simonmar Implement stack chunks and separate TSO/STACK objects
simonmar authored
176 const StgInfoTable* info;
177 struct StgStack_ *next_chunk;
178 } StgUnderflowFrame;
179
180 typedef struct {
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
181 StgHeader header;
182 } StgStopFrame;
183
184 typedef struct {
185 StgHeader header;
186 StgWord data;
187 } StgIntCharlikeClosure;
188
189 /* statically allocated */
190 typedef struct {
191 StgHeader header;
192 } StgRetry;
193
ed4cd6d [project @ 1999-01-26 11:12:41 by simonm]
simonm authored
194 typedef struct _StgStableName {
195 StgHeader header;
196 StgWord sn;
197 } StgStableName;
5fec254 [project @ 2000-01-18 12:36:38 by simonmar]
simonmar authored
198
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
199 typedef struct _StgWeak { /* Weak v */
200 StgHeader header;
d61c623 @takano-akio Allow multiple C finalizers to be attached to a Weak#
takano-akio authored
201 StgClosure *cfinalizers;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
202 StgClosure *key;
203 StgClosure *value; /* v */
b41f38a [project @ 1999-02-11 14:22:53 by simonm]
simonm authored
204 StgClosure *finalizer;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
205 struct _StgWeak *link;
206 } StgWeak;
207
d61c623 @takano-akio Allow multiple C finalizers to be attached to a Weak#
takano-akio authored
208 typedef struct _StgCFinalizerList {
10b81c5 [project @ 1999-02-26 17:46:04 by simonm]
simonm authored
209 StgHeader header;
d61c623 @takano-akio Allow multiple C finalizers to be attached to a Weak#
takano-akio authored
210 StgClosure *link;
211 void (*fptr)(void);
212 void *ptr;
213 void *eptr;
214 StgWord flag; /* has environment (0 or 1) */
215 } StgCFinalizerList;
10b81c5 [project @ 1999-02-26 17:46:04 by simonm]
simonm authored
216
0bffc41 [project @ 2002-12-11 15:36:20 by simonmar]
simonmar authored
217 /* Byte code objects. These are fixed size objects with pointers to
218 * four arrays, designed so that a BCO can be easily "re-linked" to
219 * other BCOs, to facilitate GHC's intelligent recompilation. The
220 * array of instructions is static and not re-generated when the BCO
221 * is re-linked, but the other 3 arrays will be regenerated.
222 *
223 * A BCO represents either a function or a stack frame. In each case,
224 * it needs a bitmap to describe to the garbage collector the
225 * pointerhood of its arguments/free variables respectively, and in
b3f5308 [project @ 2003-03-24 14:46:53 by simonmar]
simonmar authored
226 * the case of a function it also needs an arity. These are stored
227 * directly in the BCO, rather than in the instrs array, for two
228 * reasons:
229 * (a) speed: we need to get at the bitmap info quickly when
230 * the GC is examining APs and PAPs that point to this BCO
231 * (b) a subtle interaction with the compacting GC. In compacting
232 * GC, the info that describes the size/layout of a closure
233 * cannot be in an object more than one level of indirection
234 * away from the current object, because of the order in
235 * which pointers are updated to point to their new locations.
0bffc41 [project @ 2002-12-11 15:36:20 by simonmar]
simonmar authored
236 */
237
238 typedef struct {
239 StgHeader header;
03dc2dd [project @ 2005-03-27 13:41:13 by panne]
panne authored
240 StgArrWords *instrs; /* a pointer to an ArrWords */
241 StgArrWords *literals; /* a pointer to an ArrWords */
242 StgMutArrPtrs *ptrs; /* a pointer to a MutArrPtrs */
243 StgHalfWord arity; /* arity of this BCO */
244 StgHalfWord size; /* size of this BCO (in words) */
245 StgWord bitmap[FLEXIBLE_ARRAY]; /* an StgLargeBitmap */
0bffc41 [project @ 2002-12-11 15:36:20 by simonmar]
simonmar authored
246 } StgBCO;
247
b3f5308 [project @ 2003-03-24 14:46:53 by simonmar]
simonmar authored
248 #define BCO_BITMAP(bco) ((StgLargeBitmap *)((StgBCO *)(bco))->bitmap)
0bffc41 [project @ 2002-12-11 15:36:20 by simonmar]
simonmar authored
249 #define BCO_BITMAP_SIZE(bco) (BCO_BITMAP(bco)->size)
250 #define BCO_BITMAP_BITS(bco) (BCO_BITMAP(bco)->bitmap)
251 #define BCO_BITMAP_SIZEW(bco) ((BCO_BITMAP_SIZE(bco) + BITS_IN(StgWord) - 1) \
252 / BITS_IN(StgWord))
253
254 /* A function return stack frame: used when saving the state for a
255 * garbage collection at a function entry point. The function
256 * arguments are on the stack, and we also save the function (its
257 * info table describes the pointerhood of the arguments).
258 *
259 * The stack frame size is also cached in the frame for convenience.
260 */
261 typedef struct {
a2a67cd @simonmar RTS tidyup sweep, first phase
simonmar authored
262 const StgInfoTable* info;
e7c0855 FIX recent PPC crashes introduced by the pointer-tagging patch (I hope)
Simon Marlow authored
263 StgWord size;
0bffc41 [project @ 2002-12-11 15:36:20 by simonmar]
simonmar authored
264 StgClosure * fun;
265 StgClosure * payload[FLEXIBLE_ARRAY];
266 } StgRetFun;
267
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
268 /* Concurrent communication objects */
269
f469222 @simonmar Change the representation of the MVar blocked queue
simonmar authored
270 typedef struct StgMVarTSOQueue_ {
271 StgHeader header;
272 struct StgMVarTSOQueue_ *link;
273 struct StgTSO_ *tso;
274 } StgMVarTSOQueue;
275
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
276 typedef struct {
f469222 @simonmar Change the representation of the MVar blocked queue
simonmar authored
277 StgHeader header;
278 struct StgMVarTSOQueue_ *head;
279 struct StgMVarTSOQueue_ *tail;
280 StgClosure* value;
4385968 [project @ 1998-12-02 13:17:09 by simonm]
simonm authored
281 } StgMVar;
282
55472d7 [project @ 2005-05-27 14:47:08 by tharris]
tharris authored
283
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
284 /* STM data structures
285 *
286 * StgTVar defines the only type that can be updated through the STM
287 * interface.
288 *
289 * Note that various optimisations may be possible in order to use less
290 * space for these data structures at the cost of more complexity in the
291 * implementation:
292 *
9cef40b STM invariants
tharris@microsoft.com authored
293 * - In StgTVar, current_value and first_watch_queue_entry could be held in
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
294 * the same field: if any thread is waiting then its expected_value for
295 * the tvar is the current value.
296 *
297 * - In StgTRecHeader, it might be worthwhile having separate chunks
298 * of read-only and read-write locations. This would save a
299 * new_value field in the read-only locations.
c5cd234 [project @ 2005-11-18 15:24:12 by simonmar]
simonmar authored
300 *
301 * - In StgAtomicallyFrame, we could combine the waiting bit into
302 * the header (maybe a different info tbl for a waiting transaction).
303 * This means we can specialise the code for the atomically frame
304 * (it immediately switches on frame->waiting anyway).
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
305 */
306
9cef40b STM invariants
tharris@microsoft.com authored
307 typedef struct StgTRecHeader_ StgTRecHeader;
308
309 typedef struct StgTVarWatchQueue_ {
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
310 StgHeader header;
9cef40b STM invariants
tharris@microsoft.com authored
311 StgClosure *closure; // StgTSO or StgAtomicInvariant
312 struct StgTVarWatchQueue_ *next_queue_entry;
313 struct StgTVarWatchQueue_ *prev_queue_entry;
314 } StgTVarWatchQueue;
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
315
316 typedef struct {
317 StgHeader header;
55472d7 [project @ 2005-05-27 14:47:08 by tharris]
tharris authored
318 StgClosure *volatile current_value;
9cef40b STM invariants
tharris@microsoft.com authored
319 StgTVarWatchQueue *volatile first_watch_queue_entry;
710d005 [project @ 2005-11-21 20:00:55 by tharris]
tharris authored
320 StgInt volatile num_updates;
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
321 } StgTVar;
322
9cef40b STM invariants
tharris@microsoft.com authored
323 typedef struct {
324 StgHeader header;
325 StgClosure *code;
326 StgTRecHeader *last_execution;
327 StgWord lock;
328 } StgAtomicInvariant;
329
03dc2dd [project @ 2005-03-27 13:41:13 by panne]
panne authored
330 /* new_value == expected_value for read-only accesses */
9cef40b STM invariants
tharris@microsoft.com authored
331 /* new_value is a StgTVarWatchQueue entry when trec in state TREC_WAITING */
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
332 typedef struct {
333 StgTVar *tvar;
334 StgClosure *expected_value;
335 StgClosure *new_value;
eba7b66 Merge the smp and threaded RTS ways
Simon Marlow authored
336 #if defined(THREADED_RTS)
710d005 [project @ 2005-11-21 20:00:55 by tharris]
tharris authored
337 StgInt num_updates;
ab3d1f2 [project @ 2005-06-06 08:49:07 by tharris]
tharris authored
338 #endif
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
339 } TRecEntry;
340
710d005 [project @ 2005-11-21 20:00:55 by tharris]
tharris authored
341 #define TREC_CHUNK_NUM_ENTRIES 16
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
342
343 typedef struct StgTRecChunk_ {
344 StgHeader header;
345 struct StgTRecChunk_ *prev_chunk;
346 StgWord next_entry_idx;
347 TRecEntry entries[TREC_CHUNK_NUM_ENTRIES];
348 } StgTRecChunk;
349
350 typedef enum {
03dc2dd [project @ 2005-03-27 13:41:13 by panne]
panne authored
351 TREC_ACTIVE, /* Transaction in progress, outcome undecided */
55472d7 [project @ 2005-05-27 14:47:08 by tharris]
tharris authored
352 TREC_CONDEMNED, /* Transaction in progress, inconsistent / out of date reads */
03dc2dd [project @ 2005-03-27 13:41:13 by panne]
panne authored
353 TREC_COMMITTED, /* Transaction has committed, now updating tvars */
354 TREC_ABORTED, /* Transaction has aborted, now reverting tvars */
355 TREC_WAITING, /* Transaction currently waiting */
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
356 } TRecState;
357
9cef40b STM invariants
tharris@microsoft.com authored
358 typedef struct StgInvariantCheckQueue_ {
359 StgHeader header;
360 StgAtomicInvariant *invariant;
361 StgTRecHeader *my_execution;
362 struct StgInvariantCheckQueue_ *next_queue_entry;
363 } StgInvariantCheckQueue;
364
365 struct StgTRecHeader_ {
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
366 StgHeader header;
367 struct StgTRecHeader_ *enclosing_trec;
368 StgTRecChunk *current_chunk;
9cef40b STM invariants
tharris@microsoft.com authored
369 StgInvariantCheckQueue *invariants_to_check;
7408b39 @simonmar Use message-passing to implement throwTo in the RTS
simonmar authored
370 TRecState state;
9cef40b STM invariants
tharris@microsoft.com authored
371 };
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
372
373 typedef struct {
9cef40b STM invariants
tharris@microsoft.com authored
374 StgHeader header;
375 StgClosure *code;
376 StgTVarWatchQueue *next_invariant_to_check;
dce2394 @simonmar propagate the result of atomically properly (fixes #3049)
simonmar authored
377 StgClosure *result;
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
378 } StgAtomicallyFrame;
379
380 typedef struct {
9cef40b STM invariants
tharris@microsoft.com authored
381 StgHeader header;
382 StgClosure *code;
383 StgClosure *handler;
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
384 } StgCatchSTMFrame;
385
386 typedef struct {
9cef40b STM invariants
tharris@microsoft.com authored
387 StgHeader header;
a7c0387 @simonmar Produce new-style Cmm from the Cmm parser
simonmar authored
388 StgWord running_alt_code;
9cef40b STM invariants
tharris@microsoft.com authored
389 StgClosure *first_code;
390 StgClosure *alt_code;
b61f70c [project @ 2004-11-18 09:56:07 by tharris]
tharris authored
391 } StgCatchRetryFrame;
392
7408b39 @simonmar Use message-passing to implement throwTo in the RTS
simonmar authored
393 /* ----------------------------------------------------------------------------
394 Messages
395 ------------------------------------------------------------------------- */
396
397 typedef struct Message_ {
398 StgHeader header;
399 struct Message_ *link;
400 } Message;
401
402 typedef struct MessageWakeup_ {
403 StgHeader header;
404 Message *link;
405 StgTSO *tso;
406 } MessageWakeup;
407
408 typedef struct MessageThrowTo_ {
409 StgHeader header;
5d52d9b @simonmar New implementation of BLACKHOLEs
simonmar authored
410 struct MessageThrowTo_ *link;
7408b39 @simonmar Use message-passing to implement throwTo in the RTS
simonmar authored
411 StgTSO *source;
412 StgTSO *target;
413 StgClosure *exception;
414 } MessageThrowTo;
415
5d52d9b @simonmar New implementation of BLACKHOLEs
simonmar authored
416 typedef struct MessageBlackHole_ {
417 StgHeader header;
418 struct MessageBlackHole_ *link;
419 StgTSO *tso;
420 StgClosure *bh;
421 } MessageBlackHole;
422
a2a67cd @simonmar RTS tidyup sweep, first phase
simonmar authored
423 #endif /* RTS_STORAGE_CLOSURES_H */
Something went wrong with that request. Please try again.