add definition of unmark()
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: GCCompact.h,v 1.1 2001/07/23 17:23:19 simonmar Exp $
+ * $Id: GCCompact.h,v 1.2 2001/07/30 13:06:18 simonmar Exp $
*
* (c) The GHC Team 1998-1999
*
*
* (c) The GHC Team 1998-1999
*
*bitmap_word |= bit_mask;
}
*bitmap_word |= bit_mask;
}
+static inline void
+unmark(StgPtr p, bdescr *bd)
+{
+ nat offset_within_block = p - bd->start; // in words
+ StgPtr bitmap_word = (StgPtr)bd->u.bitmap +
+ (offset_within_block / (sizeof(W_)*BITS_PER_BYTE));
+ nat bit_mask = 1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1));
+ *bitmap_word &= ~bit_mask;
+}
+
static inline int
is_marked(StgPtr p, bdescr *bd)
{
static inline int
is_marked(StgPtr p, bdescr *bd)
{