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 82 of file coroutine.h.

Member Function Documentation

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

Definition at line 90 of file coroutine.h.

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, int >::RunMainStack().

91  {
92  m_mainStackFunction = std::move( aFunc );
93  INVOCATION_ARGS args{ INVOCATION_ARGS::CONTINUE_AFTER_ROOT, aCor, this };
94 
96  reinterpret_cast<intptr_t>( &args ) );
97  }
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:110
std::function< void()> m_mainStackFunction
Definition: coroutine.h:111
CALLEE_STORAGE m_callee
Definition: coroutine.h:382
template<typename ReturnType, typename ArgType>
void COROUTINE< ReturnType, ArgType >::CALL_CONTEXT::SetMainStack ( CONTEXT_T aStack)
inline

Member Data Documentation

template<typename ReturnType, typename ArgType>
CONTEXT_T* COROUTINE< ReturnType, ArgType >::CALL_CONTEXT::m_mainStackContext
private
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: