summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mark_rts.c b/mark_rts.c
index 6acd80f5..710d4e95 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -317,7 +317,6 @@ STATIC void GC_remove_root_at_pos(int i)
#if defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE) \
|| defined(PCR) || defined(CYGWIN32)
-/* Internal use only; lock held. */
STATIC void GC_remove_tmp_roots(void)
{
int i;
@@ -325,6 +324,7 @@ STATIC void GC_remove_tmp_roots(void)
int old_n_roots = n_root_sets;
# endif
+ GC_ASSERT(I_HOLD_LOCK());
for (i = 0; i < n_root_sets; ) {
if (GC_static_roots[i].r_tmp) {
GC_remove_root_at_pos(i);
@@ -853,6 +853,7 @@ GC_INNER void (*GC_push_typed_structures)(void) = 0;
GC_INNER void GC_cond_register_dynamic_libraries(void)
{
+ GC_ASSERT(I_HOLD_LOCK());
# if (defined(DYNAMIC_LOADING) && !defined(MSWIN_XBOX1)) \
|| defined(CYGWIN32) || defined(MSWIN32) || defined(MSWINCE) \
|| defined(PCR)
@@ -877,13 +878,14 @@ STATIC void GC_push_regs_and_stack(ptr_t cold_gc_frame)
/* accessible pointer. If all is false, arrange to push only possibly */
/* altered values. Cold_gc_frame is an address inside a GC frame that */
/* remains valid until all marking is complete; a NULL value indicates */
-/* that it is OK to miss some register values. Called with the */
-/* allocation lock held. */
+/* that it is OK to miss some register values. */
GC_INNER void GC_push_roots(GC_bool all, ptr_t cold_gc_frame GC_ATTR_UNUSED)
{
int i;
unsigned kind;
+ GC_ASSERT(I_HOLD_LOCK());
+
/* Next push static data. This must happen early on, since it is */
/* not robust against mark stack overflow. */
/* Re-register dynamic libraries, in case one got added. */