-RawContext::RawContext(std::function<void()> code, void_pfn_smxprocess_t cleanup, smx_actor_t actor,
- SwappedContextFactory* factory)
- : SwappedContext(std::move(code), cleanup, actor, factory)
-{
- if (has_code()) {
- this->stack_top_ = raw_makecontext(get_stack(), smx_context_usable_stack_size, RawContext::wrapper, this);
- } else {
- if (MC_is_active())
- MC_ignore_heap(&stack_top_, sizeof(stack_top_));
- }
-}
-
-void RawContext::wrapper(void* arg)
+RawContext::RawContext(std::function<void()>&& code, actor::ActorImpl* actor, SwappedContextFactory* factory)
+ : SwappedContext(std::move(code), actor, factory)