summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-12-08 11:31:50 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:52 +0200
commit197742f24da7b83431132559f8e306d5da5df8f0 (patch)
treebe7f00595a6c6e838382aca96b58f4c88e9211a3 /misc.c
parent02b76359f5f6429151a9d1c15ccf4302eb927e80 (diff)
2009-12-08 Ivan Maidanski <ivmai@mail.ru>
* darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call GC_push_all_stack() instead of GC_push_all_stack_frames()). * include/private/gc_priv.h (GC_push_all_stack_frames, GC_push_all_register_frames): Rename to GC_push_all_stack_sections and GC_push_all_register_sections, respectively. * mark_rts.c (GC_push_all_stack_frames, GC_push_all_register_frames, GC_push_all_stack_part_eager_frames, GC_push_current_stack): Ditto. * pthread_stop_world.c (GC_push_all_stacks): Ditto. * win32_threads.c (GC_push_stack_for): Ditto. * misc.c (GC_call_with_gc_active): Rename "frame" local variable to "stacksect". * pthread_support.c (GC_call_with_gc_active): Ditto. * win32_threads.c (GC_call_with_gc_active): Ditto. * pthread_support.c (GC_call_with_gc_active): Update FIXME for Darwin. * win32_threads.c (GC_Thread_Rep): Update the comment for traced_stack_sect.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/misc.c b/misc.c
index 1c8d00a..7fa5899 100644
--- a/misc.c
+++ b/misc.c
@@ -1487,43 +1487,43 @@ GC_INNER struct GC_traced_stack_sect_s *GC_traced_stack_sect = NULL;
GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn,
void * client_data)
{
- struct GC_traced_stack_sect_s frame;
+ struct GC_traced_stack_sect_s stacksect;
GC_ASSERT(GC_is_initialized);
/* Adjust our stack base value (this could happen if */
/* GC_get_main_stack_base() is unimplemented or broken for */
/* the platform). */
- if (GC_stackbottom HOTTER_THAN (ptr_t)(&frame))
- GC_stackbottom = (ptr_t)(&frame);
+ if (GC_stackbottom HOTTER_THAN (ptr_t)(&stacksect))
+ GC_stackbottom = (ptr_t)(&stacksect);
if (GC_blocked_sp == NULL) {
/* We are not inside GC_do_blocking() - do nothing more. */
return fn(client_data);
}
- /* Setup new "frame". */
- frame.saved_stack_ptr = GC_blocked_sp;
+ /* Setup new "stack section". */
+ stacksect.saved_stack_ptr = GC_blocked_sp;
# ifdef IA64
/* This is the same as in GC_call_with_stack_base(). */
- frame.backing_store_end = GC_save_regs_in_stack();
+ stacksect.backing_store_end = GC_save_regs_in_stack();
/* Unnecessarily flushes register stack, */
/* but that probably doesn't hurt. */
- frame.saved_backing_store_ptr = GC_blocked_register_sp;
+ stacksect.saved_backing_store_ptr = GC_blocked_register_sp;
# endif
- frame.prev = GC_traced_stack_sect;
+ stacksect.prev = GC_traced_stack_sect;
GC_blocked_sp = NULL;
- GC_traced_stack_sect = &frame;
+ GC_traced_stack_sect = &stacksect;
client_data = fn(client_data);
GC_ASSERT(GC_blocked_sp == NULL);
- GC_ASSERT(GC_traced_stack_sect == &frame);
+ GC_ASSERT(GC_traced_stack_sect == &stacksect);
- /* Restore original "frame". */
- GC_traced_stack_sect = frame.prev;
+ /* Restore original "stack section". */
+ GC_traced_stack_sect = stacksect.prev;
# ifdef IA64
- GC_blocked_register_sp = frame.saved_backing_store_ptr;
+ GC_blocked_register_sp = stacksect.saved_backing_store_ptr;
# endif
- GC_blocked_sp = frame.saved_stack_ptr;
+ GC_blocked_sp = stacksect.saved_stack_ptr;
return client_data; /* result */
}