Skip to content
Snippets Groups Projects
Commit 0491574d authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1999-12-10 15:50:10 by simonmar]

Unbreak finalization.
parent 5204750a
No related merge requests found
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Weak.c,v 1.11 1999/07/06 15:05:49 sof Exp $ * $Id: Weak.c,v 1.12 1999/12/10 15:50:10 simonmar Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -58,15 +58,17 @@ void ...@@ -58,15 +58,17 @@ void
scheduleFinalizers(StgWeak *list) scheduleFinalizers(StgWeak *list)
{ {
StgWeak *w; StgWeak *w;
StgTSO *t;
for (w = list; w; w = w->link) { for (w = list; w; w = w->link) {
IF_DEBUG(weak,fprintf(stderr,"Finalising weak pointer at %p -> %p\n", w, w->key)); IF_DEBUG(weak,fprintf(stderr,"Finalising weak pointer at %p -> %p\n", w, w->key));
if (w->finalizer != &NO_FINALIZER_closure) { if (w->finalizer != &NO_FINALIZER_closure) {
#ifdef INTERPRETER #ifdef INTERPRETER
createGenThread(RtsFlags.GcFlags.initialStkSize, w->finalizer); t = createGenThread(RtsFlags.GcFlags.initialStkSize, w->finalizer);
#else #else
createIOThread(RtsFlags.GcFlags.initialStkSize, w->finalizer); t = createIOThread(RtsFlags.GcFlags.initialStkSize, w->finalizer);
#endif #endif
scheduleThread(t);
} }
w->header.info = &DEAD_WEAK_info; w->header.info = &DEAD_WEAK_info;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment