diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-04-10 07:54:03 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-04-10 13:28:20 +0300 |
commit | 05ee810c3b24c10c348f3c8ce367bf952aa65207 (patch) | |
tree | d77a6404e0fb709f7f297510ac5e5f6bf8aee020 /include | |
parent | 3ac611cf95250de0298a00aac3a4fe84f329626b (diff) | |
download | bdwgc-05ee810c3b24c10c348f3c8ce367bf952aa65207.tar.gz |
Acquire lock in GC_register_disclaim_proc
GC_obj_kinds should be updated with the allocation lock held.
* fnlz_mlc.c [ENABLE_DISCLAIM] (GC_register_disclaim_proc): Wrap the
code into LOCK/UNLOCK.
* include/gc/gc_disclaim.h (GC_register_disclaim_proc): Add comment
that the function acquires the lock.
Diffstat (limited to 'include')
-rw-r--r-- | include/gc/gc_disclaim.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gc/gc_disclaim.h b/include/gc/gc_disclaim.h index 5f588981..ca5ba79f 100644 --- a/include/gc/gc_disclaim.h +++ b/include/gc/gc_disclaim.h @@ -40,7 +40,7 @@ typedef int (GC_CALLBACK * GC_disclaim_proc)(void * /*obj*/); /* collection if "mark_from_all" is non-zero, but at the expense that */ /* long chains of objects will take many cycles to reclaim. */ /* Calls to GC_free() will free its argument without inquiring "proc". */ -/* No-op in the leak-finding mode. */ +/* Acquires the allocation lock. No-op in the leak-finding mode. */ GC_API void GC_CALL GC_register_disclaim_proc(int /*kind*/, GC_disclaim_proc /*proc*/, int /*mark_from_all*/) GC_ATTR_NONNULL(2); |