summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-04-11 07:23:00 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-04-11 14:24:07 +0300
commit6eb3dd3483fa870176ffe6390bd964b67208dce0 (patch)
tree98381f69c4c5069d4f8a735b6bbb31ec8816586e /mark_rts.c
parentd80ce053ff9701ccac04506267bbdf30be350481 (diff)
downloadbdwgc-6eb3dd3483fa870176ffe6390bd964b67208dce0.tar.gz
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.
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c3
1 files changed, 3 insertions, 0 deletions
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;