void_pfn_smxprocess_t cleanup_func,
smx_actor_t process)
: BoostContext(std::move(code), cleanup_func, process) {}
- void stop() override;
void suspend() override;
};
void_pfn_smxprocess_t cleanup_func,
smx_actor_t process)
: BoostContext(std::move(code), cleanup_func, process) {}
- void stop() override;
void suspend() override;
void resume() override;
};
#endif
try {
(*context)();
- context->stop();
- } catch (const StopRequest&) {
+ context->Context::stop();
+ } catch (StopRequest const&) {
XBT_DEBUG("Caught a StopRequest");
}
context->suspend();
// BoostSerialContext
+void BoostContext::stop()
+{
+ Context::stop();
+ throw StopRequest();
+}
+
void BoostContext::resume()
{
SIMIX_context_set_current(this);
smx_ctx_boost_jump_fcontext(this, next_context);
}
-void BoostSerialContext::stop()
-{
- BoostContext::stop();
- throw StopRequest();
-}
-
// BoostParallelContext
#if HAVE_THREAD_CONTEXTS
smx_ctx_boost_jump_fcontext(this, next_context);
}
-void BoostParallelContext::stop()
-{
- BoostContext::stop();
- throw StopRequest();
-}
-
void BoostParallelContext::resume()
{
uintptr_t worker_id = __sync_fetch_and_add(&threads_working_, 1);