VM: instead of enqueue_safepoint() just call set_safepoint_guard() directly
parent
5a39631b4b
commit
316b16f377
|
@ -2,15 +2,11 @@
|
||||||
|
|
||||||
namespace factor {
|
namespace factor {
|
||||||
|
|
||||||
void safepoint_state::enqueue_safepoint(factor_vm* parent) volatile {
|
|
||||||
parent->code->set_safepoint_guard(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void safepoint_state::enqueue_fep(factor_vm* parent) volatile {
|
void safepoint_state::enqueue_fep(factor_vm* parent) volatile {
|
||||||
if (parent->fep_p)
|
if (parent->fep_p)
|
||||||
fatal_error("Low-level debugger interrupted", 0);
|
fatal_error("Low-level debugger interrupted", 0);
|
||||||
atomic::store(&fep_p, true);
|
atomic::store(&fep_p, true);
|
||||||
enqueue_safepoint(parent);
|
parent->code->set_safepoint_guard(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void safepoint_state::enqueue_samples(factor_vm* parent,
|
void safepoint_state::enqueue_samples(factor_vm* parent,
|
||||||
|
@ -32,7 +28,7 @@ void safepoint_state::enqueue_samples(factor_vm* parent,
|
||||||
if (!parent->code->seg->in_segment_p(pc))
|
if (!parent->code->seg->in_segment_p(pc))
|
||||||
atomic::fetch_add(&sample_counts.foreign_sample_count, samples);
|
atomic::fetch_add(&sample_counts.foreign_sample_count, samples);
|
||||||
}
|
}
|
||||||
enqueue_safepoint(parent);
|
parent->code->set_safepoint_guard(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void safepoint_state::handle_safepoint(factor_vm* parent, cell pc) volatile {
|
void safepoint_state::handle_safepoint(factor_vm* parent, cell pc) volatile {
|
||||||
|
|
|
@ -8,7 +8,6 @@ struct safepoint_state {
|
||||||
|
|
||||||
void handle_safepoint(factor_vm* parent, cell pc) volatile;
|
void handle_safepoint(factor_vm* parent, cell pc) volatile;
|
||||||
|
|
||||||
void enqueue_safepoint(factor_vm* parent) volatile;
|
|
||||||
void enqueue_samples(factor_vm* parent, cell samples, cell pc,
|
void enqueue_samples(factor_vm* parent, cell samples, cell pc,
|
||||||
bool foreign_thread_p) volatile;
|
bool foreign_thread_p) volatile;
|
||||||
void enqueue_fep(factor_vm* parent) volatile;
|
void enqueue_fep(factor_vm* parent) volatile;
|
||||||
|
|
Loading…
Reference in New Issue