gem5  v21.1.0.2
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
gem5::Coroutine< Arg, Ret >::CallerType Class Reference

CallerType: A reference to an object of this class will be passed to the coroutine task. More...

#include <coroutine.hh>

Public Member Functions

template<typename T = Ret>
CallerTypeoperator() (typename std::enable_if_t< !std::is_same< T, void >::value, T > param)
 operator() is the way we can jump outside the coroutine and return a value to the caller. More...
 
template<typename T = Ret>
std::enable_if_t< std::is_same< T, void >::value, CallerType > & operator() ()
 operator() is the way we can jump outside the coroutine More...
 
template<typename T = Arg>
std::enable_if_t<!std::is_same< T, void >::value, T > get ()
 get() is the way we can extrapolate arguments from the coroutine caller. More...
 

Protected Member Functions

 CallerType (Coroutine &_coro)
 

Private Attributes

Coroutinecoro
 
FibercallerFiber
 
RetChannel retChannel
 

Friends

class Coroutine
 

Detailed Description

template<typename Arg, typename Ret>
class gem5::Coroutine< Arg, Ret >::CallerType

CallerType: A reference to an object of this class will be passed to the coroutine task.

This is the way it is possible for the coroutine to interface (e.g. switch back) to the coroutine caller.

Definition at line 85 of file coroutine.hh.

Constructor & Destructor Documentation

◆ CallerType()

template<typename Arg , typename Ret >
gem5::Coroutine< Arg, Ret >::CallerType::CallerType ( Coroutine _coro)
inlineprotected

Definition at line 89 of file coroutine.hh.

Friends And Related Function Documentation

◆ Coroutine

template<typename Arg , typename Ret >
friend class Coroutine
friend

Definition at line 87 of file coroutine.hh.

Member Data Documentation

◆ callerFiber

template<typename Arg , typename Ret >
Fiber* gem5::Coroutine< Arg, Ret >::CallerType::callerFiber
private

◆ coro

template<typename Arg , typename Ret >
Coroutine& gem5::Coroutine< Arg, Ret >::CallerType::coro
private

Definition at line 155 of file coroutine.hh.

Referenced by gem5::Coroutine< Arg, Ret >::CallerType::get().

◆ retChannel

template<typename Arg , typename Ret >
RetChannel gem5::Coroutine< Arg, Ret >::CallerType::retChannel
private

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

Generated on Tue Sep 21 2021 12:27:26 for gem5 by doxygen 1.8.17