gem5  v20.1.0.0
Functions | Variables
The Fiber API.

These methods relate to the Fiber interface. More...

Functions

virtual Fiber::~Fiber ()
 
void Fiber::run ()
 Start executing the fiber represented by this object. More...
 
bool Fiber::finished () const
 Returns whether the "main" function of this fiber has finished. More...
 
bool Fiber::started () const
 Returns whether the "main" function of this fiber has started. More...
 
static FiberFiber::currentFiber ()
 Get a pointer to the current running Fiber. More...
 
static FiberFiber::primaryFiber ()
 Get a pointer to the primary Fiber. More...
 

Variables

const static size_t Fiber::DefaultStackSize = 0x50000
 
 Fiber::Fiber (size_t stack_size=DefaultStackSize)
 
 Fiber::Fiber (Fiber *link, size_t stack_size=DefaultStackSize)
 

Detailed Description

These methods relate to the Fiber interface.

Function Documentation

◆ currentFiber()

Fiber * Fiber::currentFiber ( )
static

Get a pointer to the current running Fiber.

Definition at line 181 of file fiber.cc.

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

◆ Fiber() [1/2]

Fiber::Fiber ( Fiber link,
size_t  stack_size = DefaultStackSize 
)

Definition at line 87 of file fiber.cc.

References fatal, Fiber::guardPage, Fiber::guardPageSize, and Fiber::stack.

◆ Fiber() [2/2]

Fiber::Fiber ( size_t  stack_size = DefaultStackSize)
Parameters
Linkpoints to another fiber which will start executing when this fiber's main function returns.
stack_sizeis the size of the stack available to this fiber.

Definition at line 84 of file fiber.cc.

Referenced by TEST().

◆ finished()

bool Fiber::finished ( ) const
inline

◆ primaryFiber()

Fiber * Fiber::primaryFiber ( )
static

Get a pointer to the primary Fiber.

This Fiber represents the thread of execution started by the OS, and which has a Fiber attached to it after the fact.

Definition at line 182 of file fiber.cc.

Referenced by sc_gem5::Process::fiber(), sc_gem5::Scheduler::start(), TEST(), and sc_gem5::Scheduler::yield().

◆ run()

void Fiber::run ( )

◆ started()

bool Fiber::started ( ) const
inline

Returns whether the "main" function of this fiber has started.

Definition at line 107 of file fiber.hh.

References Fiber::_started.

Referenced by TEST().

◆ ~Fiber()

Fiber::~Fiber ( )
virtual

Definition at line 111 of file fiber.cc.

References Fiber::guardPage, Fiber::guardPageSize, panic_if, Fiber::stack, and Fiber::stackSize.

Variable Documentation

◆ DefaultStackSize

const static size_t Fiber::DefaultStackSize = 0x50000
static

Definition at line 68 of file fiber.hh.


Generated on Wed Sep 30 2020 14:02:20 for gem5 by doxygen 1.8.17