BoostContextFactory::BoostContextFactory()
: ContextFactory("BoostContextFactory"), parallel_(SIMIX_context_is_parallel())
{
- BoostContext::setMaestro(nullptr);
+ BoostContext::set_maestro(nullptr);
if (parallel_) {
#if HAVE_THREAD_CONTEXTS
ParallelBoostContext::initialize();
} else {
/* all processes were run, return to maestro */
XBT_DEBUG("No more process to run");
- next_context = static_cast<SerialBoostContext*>(BoostContext::getMaestro());
+ next_context = static_cast<SerialBoostContext*>(BoostContext::get_maestro());
}
SIMIX_context_set_current(next_context);
BoostContext::swap(this, next_context);
void SerialBoostContext::resume()
{
SIMIX_context_set_current(this);
- BoostContext::swap(BoostContext::getMaestro(), this);
+ BoostContext::swap(BoostContext::get_maestro(), this);
}
void SerialBoostContext::run_all()
virtual void resume() = 0;
static void swap(BoostContext* from, BoostContext* to);
- static BoostContext* getMaestro() { return maestro_context_; }
- static void setMaestro(BoostContext* maestro) { maestro_context_ = maestro; }
+ static BoostContext* get_maestro() { return maestro_context_; }
+ static void set_maestro(BoostContext* maestro) { maestro_context_ = maestro; }
private:
static BoostContext* maestro_context_;
RawContextFactory::RawContextFactory() : ContextFactory("RawContextFactory"), parallel_(SIMIX_context_is_parallel())
{
- RawContext::setMaestro(nullptr);
+ RawContext::set_maestro(nullptr);
if (parallel_) {
#if HAVE_THREAD_CONTEXTS
// TODO: choose dynamically when SIMIX_context_get_parallel_threshold() > 1
} else {
/* all processes were run, return to maestro */
XBT_DEBUG("No more process to run");
- next_context = static_cast<SerialRawContext*>(RawContext::getMaestro());
+ next_context = static_cast<SerialRawContext*>(RawContext::get_maestro());
}
SIMIX_context_set_current(next_context);
RawContext::swap(this, next_context);
void SerialRawContext::resume()
{
SIMIX_context_set_current(this);
- RawContext::swap(RawContext::getMaestro(), this);
+ RawContext::swap(RawContext::get_maestro(), this);
}
void SerialRawContext::run_all()
virtual void resume() = 0;
static void swap(RawContext* from, RawContext* to);
- static RawContext* getMaestro() { return maestro_context_; }
- static void setMaestro(RawContext* maestro) { maestro_context_ = maestro; }
+ static RawContext* get_maestro() { return maestro_context_; }
+ static void set_maestro(RawContext* maestro) { maestro_context_ = maestro; }
private:
static RawContext* maestro_context_;
UContextFactory::UContextFactory() : ContextFactory("UContextFactory"), parallel_(SIMIX_context_is_parallel())
{
- UContext::setMaestro(nullptr);
+ UContext::set_maestro(nullptr);
if (parallel_) {
#if HAVE_THREAD_CONTEXTS
ParallelUContext::initialize();
} else {
/* all processes were run, return to maestro */
XBT_DEBUG("No more process to run");
- next_context = static_cast<SerialUContext*>(UContext::getMaestro());
+ next_context = static_cast<SerialUContext*>(UContext::get_maestro());
}
SIMIX_context_set_current(next_context);
UContext::swap(this, next_context);
void SerialUContext::resume()
{
SIMIX_context_set_current(this);
- UContext::swap(UContext::getMaestro(), this);
+ UContext::swap(UContext::get_maestro(), this);
}
void SerialUContext::run_all()
virtual void resume() = 0;
static void swap(UContext* from, UContext* to);
- static UContext* getMaestro() { return maestro_context_; }
- static void setMaestro(UContext* maestro) { maestro_context_ = maestro; }
+ static UContext* get_maestro() { return maestro_context_; }
+ static void set_maestro(UContext* maestro) { maestro_context_ = maestro; }
private:
static UContext* maestro_context_;