gem5  v20.1.0.0
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
m5::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< !std::is_same< T, void >::value, T >::type 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< std::is_same< T, void >::value, CallerType >::typeoperator() ()
 operator() is the way we can jump outside the coroutine More...
 
template<typename T = Arg>
std::enable_if<!std::is_same< T, void >::value, T >::type 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 m5::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 83 of file coroutine.hh.

Constructor & Destructor Documentation

◆ CallerType()

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

Definition at line 87 of file coroutine.hh.

Friends And Related Function Documentation

◆ Coroutine

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

Definition at line 85 of file coroutine.hh.

Member Data Documentation

◆ callerFiber

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

◆ coro

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

Definition at line 153 of file coroutine.hh.

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

◆ retChannel

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

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

Generated on Wed Sep 30 2020 14:03:06 for gem5 by doxygen 1.8.17