The 'current_gc' handle doesn't need to be volatile, just the state of GC-ness
assert(!data->high_fragmentation_p());
current_gc = new gc_state(op,this);
+ atomic::store(¤t_gc_p, true);
/* Keep trying to GC higher and higher generations until we don't run
out of space in the target generation. */
end_gc();
+ atomic::store(¤t_gc_p, false);
delete current_gc;
current_gc = NULL;
safepoint_fep_p(false),
gc_off(false),
current_gc(NULL),
+ current_gc_p(false),
+ current_jit_p(false),
gc_events(NULL),
fep_p(false),
fep_help_was_shown(false),
callback_heap *callbacks;
/* Only set if we're performing a GC */
- volatile gc_state *current_gc;
+ gc_state *current_gc;
+ volatile cell current_gc_p;
+
+ /* Set if we're in the jit */
+ volatile cell current_jit_p;
/* Mark stack */
std::vector<cell> mark_stack;