thread_PAP((StgPAP *)p);
continue;
+ case TREC_CHUNK:
+ {
+ StgWord i;
+ StgTRecChunk *tc = (StgTRecChunk *)p;
+ TRecEntry *e = &(tc -> entries[0]);
+ thread((StgPtr)&tc->prev_chunk);
+ for (i = 0; i < tc -> next_entry_idx; i ++, e++ ) {
+ thread((StgPtr)&e->tvar);
+ thread((StgPtr)&e->expected_value);
+ thread((StgPtr)&e->new_value);
+ }
+ continue;
+ }
+
default:
barf("update_fwd_large: unknown/strange object %d", (int)(info->type));
}
case FUN:
case CONSTR:
- case FOREIGN:
case STABLE_NAME:
case IND_PERM:
case MUT_VAR:
StgTVar *tvar = (StgTVar *)p;
thread((StgPtr)&tvar->current_value);
thread((StgPtr)&tvar->first_wait_queue_entry);
-#if defined(SMP)
- thread((StgPtr)&tvar->last_update_by);
-#endif
return p + sizeofW(StgTVar);
}
StgInfoTable *info;
nat size, free_blocks;
- bd = free_bd = stp->blocks;
+ bd = free_bd = stp->old_blocks;
free = free_bd->start;
free_blocks = 1;
freeChain(free_bd->link);
free_bd->link = NULL;
}
- stp->n_blocks = free_blocks;
return free_blocks;
}
// the weak pointer lists...
if (weak_ptr_list != NULL) {
- thread((StgPtr)&weak_ptr_list);
+ thread((StgPtr)(void *)&weak_ptr_list);
}
if (old_weak_ptr_list != NULL) {
- thread((StgPtr)&old_weak_ptr_list); // tmp
+ thread((StgPtr)(void *)&old_weak_ptr_list); // tmp
}
// mutable lists
}
// the global thread list
- thread((StgPtr)&all_threads);
+ thread((StgPtr)(void *)&all_threads);
// any threads resurrected during this GC
- thread((StgPtr)&resurrected_threads);
+ thread((StgPtr)(void *)&resurrected_threads);
- // the main threads list
+ // the task list
{
- StgMainThread *m;
- for (m = main_threads; m != NULL; m = m->link) {
- thread((StgPtr)&m->tso);
+ Task *task;
+ for (task = all_tasks; task != NULL; task = task->all_link) {
+ if (task->tso) {
+ thread((StgPtr)&task->tso);
+ }
}
}
// 2. update forward ptrs
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
for (s = 0; s < generations[g].n_steps; s++) {
+ if (g==0 && s ==0) continue;
stp = &generations[g].steps[s];
IF_DEBUG(gc, debugBelch("update_fwd: %d.%d\n", stp->gen->no, stp->no););
- update_fwd(stp->to_blocks);
+ update_fwd(stp->blocks);
update_fwd_large(stp->scavenged_large_objects);
- if (g == RtsFlags.GcFlags.generations-1 && stp->blocks != NULL) {
+ if (g == RtsFlags.GcFlags.generations-1 && stp->old_blocks != NULL) {
IF_DEBUG(gc, debugBelch("update_fwd: %d.%d (compact)\n", stp->gen->no, stp->no););
- update_fwd_compact(stp->blocks);
+ update_fwd_compact(stp->old_blocks);
}
}
}
// 3. update backward ptrs
stp = &oldest_gen->steps[0];
- if (stp->blocks != NULL) {
+ if (stp->old_blocks != NULL) {
blocks = update_bkwd_compact(stp);
IF_DEBUG(gc, debugBelch("update_bkwd: %d.%d (compact, old: %d blocks, now %d blocks)\n",
stp->gen->no, stp->no,
- stp->n_blocks, blocks););
- stp->n_blocks = blocks;
+ stp->n_old_blocks, blocks););
+ stp->n_old_blocks = blocks;
}
}