diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2018-04-06 19:45:23 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-04-06 19:45:23 +0300 |
commit | 72f159b81640d8e5ab706b4104868eb6d9677fb2 (patch) | |
tree | 342c6d6681fa0b6b95685622f8557e3d4797ebb7 /mark.c | |
parent | 8fe21d8b12180f77ba6fbd63e7a5aba59685fd0d (diff) | |
download | bdwgc-72f159b81640d8e5ab706b4104868eb6d9677fb2.tar.gz |
Add assertions about held lock for apply_to_each_object callers
(code refactoring of commit 5e6cc59b0)
* alloc.c (GC_stopped_mark, GC_finish_collection): Add assertion (at
the beginning of the function) that the allocation lock is held.
* backgraph.c [MAKE_BACK_GRAPH] (GC_build_back_graph,
GC_traverse_back_graph): Likewise.
* mark.c (GC_initiate_gc): Likewise.
* alloc.c (GC_stopped_mark): Remove comment about the held lock
(because there is an assertion about it).
Diffstat (limited to 'mark.c')
-rw-r--r-- | mark.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -259,6 +259,7 @@ GC_INNER void GC_clear_marks(void) /* mark state is invalid. */ GC_INNER void GC_initiate_gc(void) { + GC_ASSERT(I_HOLD_LOCK()); # ifndef GC_DISABLE_INCREMENTAL if (GC_incremental) { # ifdef CHECKSUMS |