KiCad PCB EDA Suite
COROUTINE< ReturnType, ArgType >::CALL_CONTEXT Class Reference

Public Member Functions

void SetMainStack (CONTEXT_T *aStack)
 
void RunMainStack (COROUTINE *aCor, std::function< void()> aFunc)
 
void Continue (INVOCATION_ARGS *args)
 

Private Attributes

CONTEXT_Tm_mainStackContext
 
std::function< void()> m_mainStackFunction
 

Detailed Description

template<typename ReturnType, typename ArgType>
class COROUTINE< ReturnType, ArgType >::CALL_CONTEXT

Definition at line 83 of file coroutine.h.

Member Function Documentation

◆ Continue()

◆ RunMainStack()

template<typename ReturnType, typename ArgType>
void COROUTINE< ReturnType, ArgType >::CALL_CONTEXT::RunMainStack ( COROUTINE aCor,
std::function< void()>  aFunc 
)
inline

Definition at line 91 of file coroutine.h.

92  {
93  m_mainStackFunction = std::move( aFunc );
94  INVOCATION_ARGS args{ INVOCATION_ARGS::CONTINUE_AFTER_ROOT, aCor, this };
95 
97  reinterpret_cast<intptr_t>( &args ) );
98  }
intptr_t LIBCONTEXT_CALL_CONVENTION jump_fcontext(fcontext_t *ofc, fcontext_t nfc, intptr_t vp, bool preserve_fpu=true)
CONTEXT_T * m_mainStackContext
Definition: coroutine.h:111
std::function< void()> m_mainStackFunction
Definition: coroutine.h:112
CALLEE_STORAGE m_callee
Definition: coroutine.h:385

References COROUTINE< ReturnType, ArgType >::INVOCATION_ARGS::CONTINUE_AFTER_ROOT, jump_fcontext(), COROUTINE< ReturnType, ArgType >::m_callee, COROUTINE< ReturnType, ArgType >::CALL_CONTEXT::m_mainStackContext, and COROUTINE< ReturnType, ArgType >::CALL_CONTEXT::m_mainStackFunction.

Referenced by COROUTINE< int, const TOOL_EVENT & >::RunMainStack().

◆ SetMainStack()

template<typename ReturnType, typename ArgType>
void COROUTINE< ReturnType, ArgType >::CALL_CONTEXT::SetMainStack ( CONTEXT_T aStack)
inline

Member Data Documentation

◆ m_mainStackContext

template<typename ReturnType, typename ArgType>
CONTEXT_T* COROUTINE< ReturnType, ArgType >::CALL_CONTEXT::m_mainStackContext
private

◆ m_mainStackFunction

template<typename ReturnType, typename ArgType>
std::function<void()> COROUTINE< ReturnType, ArgType >::CALL_CONTEXT::m_mainStackFunction
private

The documentation for this class was generated from the following file: