faulting_p = false;
if (atomic::load(&safepoint_fep_p)) {
- atomic::store(&safepoint_fep_p, false);
if (atomic::load(&sampling_profiler_p))
end_sampling_profiler();
std::cout << "Interrupted\n";
/* Ctrl-Break throws an exception, interrupting the main thread, same
as the "t" command in the factorbug debugger. But for Ctrl-Break to
work we don't require the debugger to be activated, or even enabled. */
+ atomic::store(&safepoint_fep_p, false);
general_error(ERROR_INTERRUPT, false_object, false_object);
FACTOR_ASSERT(false);
}
factorbug();
+ atomic::store(&safepoint_fep_p, false);
} else if (atomic::load(&sampling_profiler_p)) {
FACTOR_ASSERT(code->seg->in_segment_p(pc));
code_block* block = code->code_block_for_address(pc);
#if defined(WINDOWS)
thread_id(GetCurrentThreadId()),
ctrl_break_thread(NULL),
- stop_on_ctrl_break(false),
#endif
callback_id(0),
c_to_factor_func(NULL),
full_output(false),
last_nano_count(0),
signal_callstack_seg(NULL),
- safepoint_fep_p(false) {
+ safepoint_fep_p(false),
+ stop_on_ctrl_break(false) {
primitive_reset_dispatch_stats();
}
// Two fep_p variants, one might be redundant.
volatile cell safepoint_fep_p;
+ // Allow Ctrl-Break a busy loop in the Listener, only used on Windows
+ volatile bool stop_on_ctrl_break;
+
// contexts
context* new_context();
void init_context(context* ctx);
void primitive_die();
void primitive_enable_ctrl_break();
void primitive_disable_ctrl_break();
- volatile bool stop_on_ctrl_break;
// arrays
inline void set_array_nth(array* array, cell slot, cell value);