try {
(*context)();
- if (not context->isMaestro()) // really?
+ if (not context->is_maestro()) // really?
context->Context::stop();
} catch (StopRequest const&) {
XBT_DEBUG("Caught a StopRequest");
- xbt_assert(not context->isMaestro(), "I'm not supposed to be maestro here.");
+ xbt_assert(not context->is_maestro(), "I'm not supposed to be maestro here.");
}
// Signal to the caller (normally the maestro) that we have finished:
// We're breaking the layers here by depending on the upper layer:
ThreadContext* maestro = (ThreadContext*)simix_global->maestro_process->context_;
xbt_os_sem_release(maestro->begin_);
- xbt_assert(not this->isMaestro());
+ xbt_assert(not this->is_maestro());
this->start();
}
void ThreadContext::attach_stop()
{
- xbt_assert(not this->isMaestro());
+ xbt_assert(not this->is_maestro());
this->yield();
ThreadContext* maestro = (ThreadContext*)simix_global->maestro_process->context_;
void ParallelThreadContext::start_hook()
{
- if (not isMaestro()) /* parallel run */
+ if (not is_maestro()) /* parallel run */
xbt_os_sem_acquire(thread_sem_);
}
void ParallelThreadContext::yield_hook()
{
- if (not isMaestro()) /* parallel run */
+ if (not is_maestro()) /* parallel run */
xbt_os_sem_release(thread_sem_);
}
void attach_start() override;
void attach_stop() override;
- bool isMaestro() const { return is_maestro_; }
+ bool is_maestro() const { return is_maestro_; }
void release(); // unblock context's start()
void wait(); // wait for context's yield()