summaryrefslogtreecommitdiff
path: root/headers.c
diff options
context:
space:
mode:
Diffstat (limited to 'headers.c')
-rw-r--r--headers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/headers.c b/headers.c
index 4236ceca..d2c283c5 100644
--- a/headers.c
+++ b/headers.c
@@ -313,15 +313,15 @@ GC_INNER void GC_remove_counts(struct hblk *h, size_t sz/* bytes */)
}
}
-/* Apply fn to all allocated blocks */
-/*VARARGS1*/
+/* Apply fn to all allocated blocks. It is the caller responsibility */
+/* to avoid data race during the function execution (e.g. by holding */
+/* the allocation lock). */
void GC_apply_to_all_blocks(void (*fn)(struct hblk *h, word client_data),
word client_data)
{
signed_word j;
bottom_index * index_p;
- GC_ASSERT(I_HOLD_LOCK());
for (index_p = GC_all_bottom_indices; index_p != 0;
index_p = index_p -> asc_link) {
for (j = BOTTOM_SZ-1; j >= 0;) {