From 6eb3dd3483fa870176ffe6390bd964b67208dce0 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 11 Apr 2023 07:23:00 +0300 Subject: Document assumption about GC lock for GC_clear_exclusion_table * include/gc/gc.h (GC_clear_exclusion_table): Add comment about GC lock. * mark_rts.c (GC_clear_exclusion_table): Likewise. * mark_rts.c (GC_clear_exclusion_table): Copy comment from gc.h. --- mark_rts.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mark_rts.c') diff --git a/mark_rts.c b/mark_rts.c index 8e61fd31..5caff4af 100644 --- a/mark_rts.c +++ b/mark_rts.c @@ -525,6 +525,9 @@ struct exclusion GC_excl_table[MAX_EXCLUSIONS]; -- address order. */ +/* Clear the number of entries in the exclusion table. The caller */ +/* should acquire the GC lock (to avoid data race) but no assertion */ +/* about it by design. */ GC_API void GC_CALL GC_clear_exclusion_table(void) { GC_excl_table_entries = 0; -- cgit v1.2.1