GC_API void GC_CALL GC_set_start_callback(GC_start_callback_proc);
GC_API GC_start_callback_proc GC_CALL GC_get_start_callback(void);
+/* Slow/general mark bit manipulation. The caller must hold the */
+/* allocation lock. */
+GC_API int GC_CALL GC_is_marked(void *);
+GC_API void GC_CALL GC_clear_mark_bit(void *);
+GC_API void GC_CALL GC_set_mark_bit(void *);
+
#ifdef __cplusplus
} /* end of extern "C" */
#endif
GC_INNER void GC_dirty_init(void);
#endif /* !GC_DISABLE_INCREMENTAL */
-/* Slow/general mark bit manipulation: */
-GC_API_PRIV GC_bool GC_is_marked(ptr_t p);
-GC_INNER void GC_clear_mark_bit(ptr_t p);
-GC_INNER void GC_set_mark_bit(ptr_t p);
-
/* Stubborn objects: */
void GC_read_changed(void); /* Analogous to GC_read_dirty */
GC_bool GC_page_was_changed(struct hblk * h);
}
/* Slow but general routines for setting/clearing/asking about mark bits */
-GC_INNER void GC_set_mark_bit(ptr_t p)
+GC_API void GC_CALL GC_set_mark_bit(void *p)
{
struct hblk *h = HBLKPTR(p);
hdr * hhdr = HDR(h);
- word bit_no = MARK_BIT_NO(p - (ptr_t)h, hhdr -> hb_sz);
+ word bit_no = MARK_BIT_NO((ptr_t)p - (ptr_t)h, hhdr -> hb_sz);
if (!mark_bit_from_hdr(hhdr, bit_no)) {
set_mark_bit_from_hdr(hhdr, bit_no);
}
}
-GC_INNER void GC_clear_mark_bit(ptr_t p)
+GC_API void GC_CALL GC_clear_mark_bit(void *p)
{
struct hblk *h = HBLKPTR(p);
hdr * hhdr = HDR(h);
- word bit_no = MARK_BIT_NO(p - (ptr_t)h, hhdr -> hb_sz);
+ word bit_no = MARK_BIT_NO((ptr_t)p - (ptr_t)h, hhdr -> hb_sz);
if (mark_bit_from_hdr(hhdr, bit_no)) {
size_t n_marks;
}
}
-GC_bool GC_is_marked(ptr_t p)
+GC_API int GC_CALL GC_is_marked(void *p)
{
struct hblk *h = HBLKPTR(p);
hdr * hhdr = HDR(h);
- word bit_no = MARK_BIT_NO(p - (ptr_t)h, hhdr -> hb_sz);
+ word bit_no = MARK_BIT_NO((ptr_t)p - (ptr_t)h, hhdr -> hb_sz);
return((GC_bool)mark_bit_from_hdr(hhdr, bit_no));
}