summaryrefslogtreecommitdiff
path: root/rts/sm/Compact.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/sm/Compact.c')
-rw-r--r--rts/sm/Compact.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c
index 7c89418ab9..247f1a01c6 100644
--- a/rts/sm/Compact.c
+++ b/rts/sm/Compact.c
@@ -442,6 +442,7 @@ thread_TSO (StgTSO *tso)
thread_(&tso->global_link);
if ( tso->why_blocked == BlockedOnMVar
+ || tso->why_blocked == BlockedOnMVarRead
|| tso->why_blocked == BlockedOnBlackHole
|| tso->why_blocked == BlockedOnMsgThrowTo
|| tso->why_blocked == NotBlocked
@@ -620,7 +621,7 @@ thread_obj (StgInfoTable *info, StgPtr p)
case WEAK:
{
StgWeak *w = (StgWeak *)p;
- thread(&w->cfinalizer);
+ thread(&w->cfinalizers);
thread(&w->key);
thread(&w->value);
thread(&w->finalizer);
@@ -917,17 +918,20 @@ compact(StgClosure *static_objects)
markScheduler((evac_fn)thread_root, NULL);
// the weak pointer lists...
- if (weak_ptr_list != NULL) {
- thread((void *)&weak_ptr_list);
+ for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
+ if (generations[g].weak_ptr_list != NULL) {
+ thread((void *)&generations[g].weak_ptr_list);
+ }
}
- if (old_weak_ptr_list != NULL) {
- thread((void *)&old_weak_ptr_list); // tmp
+
+ if (dead_weak_ptr_list != NULL) {
+ thread((void *)&dead_weak_ptr_list); // tmp
}
// mutable lists
for (g = 1; g < RtsFlags.GcFlags.generations; g++) {
- bdescr *bd;
- StgPtr p;
+ bdescr *bd;
+ StgPtr p;
for (n = 0; n < n_capabilities; n++) {
for (bd = capabilities[n].mut_lists[g];
bd != NULL; bd = bd->link) {