/* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.8 1999/01/14 11:11:29 simonm Exp $
+ * $Id: GC.c,v 1.9 1999/01/15 17:57:08 simonm Exp $
*
* Two-space garbage collector
*
case CAF_BLACKHOLE:
case BLACKHOLE:
- to = copy(q,BLACKHOLE_sizeW(),bd);
+ case BLACKHOLE_BQ:
+ /* ToDo: don't need to copy all the blackhole, some of it is
+ * just padding.
+ */
+ to = copy(q,BLACKHOLE_sizeW(),bd);
upd_evacuee(q,to);
return to;
case CAF_UNENTERED:
case CAF_BLACKHOLE:
case BLACKHOLE:
+ case BLACKHOLE_BQ:
/* not evaluated yet */
break;
case CAF_BLACKHOLE:
case BLACKHOLE:
+ p += BLACKHOLE_sizeW();
+ break;
+
+ case BLACKHOLE_BQ:
{
StgBlackHole *bh = (StgBlackHole *)p;
(StgClosure *)bh->blocking_queue =
case CAF_BLACKHOLE:
case BLACKHOLE:
+ break;
+
+ case BLACKHOLE_BQ:
{
StgBlackHole *bh = (StgBlackHole *)p;
(StgClosure *)bh->blocking_queue =
goto follow_srt;
/* Specialised code for update frames, since they're so common.
- * We *know* the updatee points to a BLACKHOLE or CAF_BLACKHOLE,
- * so just inline the code to evacuate it here.
+ * We *know* the updatee points to a BLACKHOLE, CAF_BLACKHOLE,
+ * or BLACKHOLE_BQ, so just inline the code to evacuate it here.
*/
case UPDATE_FRAME:
{
continue;
} else {
bdescr *bd = Bdescr((P_)frame->updatee);
- ASSERT(type == BLACKHOLE || type == CAF_BLACKHOLE);
- if (bd->gen->no >= evac_gen && bd->gen->no > N) { continue; }
+ ASSERT(type == BLACKHOLE ||
+ type == CAF_BLACKHOLE ||
+ type == BLACKHOLE_BQ);
+ if (bd->gen->no > N) {
+ if (bd->gen->no < evac_gen) {
+ failed_to_evac = rtsTrue;
+ }
+ continue;
+ }
to = copy(frame->updatee, BLACKHOLE_sizeW(), bd);
upd_evacuee(frame->updatee,to);
frame->updatee = to;
* above optimisation doesn't apply.
*/
if (bh->header.info != &BLACKHOLE_info
+ && bh->header.info != &BLACKHOLE_BQ_info
&& bh->header.info != &CAF_BLACKHOLE_info) {
SET_INFO(bh,&BLACKHOLE_info);
- bh->blocking_queue = END_TSO_QUEUE;
}
update_frame = update_frame->link;
* slower --SDM
*/
#if 0 /* do it properly... */
- if (GET_INFO(updatee_bypass) == BLACKHOLE_info
- || GET_INFO(updatee_bypass) == CAF_BLACKHOLE_info
- ) {
+ if (GET_INFO(updatee_bypass) == BLACKHOLE_BQ_info) {
/* Sigh. It has one. Don't lose those threads! */
- if (GET_INFO(updatee_keep) == BLACKHOLE_info
- || GET_INFO(updatee_keep) == CAF_BLACKHOLE_info
- ) {
+ if (GET_INFO(updatee_keep) == BLACKHOLE_BQ_info) {
/* Urgh. Two queues. Merge them. */
P_ keep_tso = ((StgBlackHole *)updatee_keep)->blocking_queue;
if (is_update_frame) {
StgBlackHole *bh = (StgBlackHole *)frame->updatee;
if (bh->header.info != &BLACKHOLE_info
+ && bh->header.info != &BLACKHOLE_BQ_info
&& bh->header.info != &CAF_BLACKHOLE_info
) {
SET_INFO(bh,&BLACKHOLE_info);
- bh->blocking_queue = END_TSO_QUEUE;
}
}