summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/gc_mark.h6
-rw-r--r--include/private/gc_priv.h5
-rw-r--r--mark.c12
3 files changed, 12 insertions, 11 deletions
diff --git a/include/gc_mark.h b/include/gc_mark.h
index 34fedb54..17dbf71b 100644
--- a/include/gc_mark.h
+++ b/include/gc_mark.h
@@ -219,6 +219,12 @@ typedef void (GC_CALLBACK * GC_start_callback_proc)(void);
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
diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h
index d28d8078..4952d04e 100644
--- a/include/private/gc_priv.h
+++ b/include/private/gc_priv.h
@@ -1932,11 +1932,6 @@ GC_EXTERN GC_bool GC_print_back_height;
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);
diff --git a/mark.c b/mark.c
index 2ea24b9a..467c13e7 100644
--- a/mark.c
+++ b/mark.c
@@ -190,11 +190,11 @@ static void clear_marks_for_block(struct hblk *h, word dummy GC_ATTR_UNUSED)
}
/* 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);
@@ -202,11 +202,11 @@ GC_INNER void GC_set_mark_bit(ptr_t p)
}
}
-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;
@@ -224,11 +224,11 @@ GC_INNER void GC_clear_mark_bit(ptr_t p)
}
}
-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));
}