gem5  v22.1.0.0
Functions | Variables
The Fiber API.

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

Functions

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

Variables

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

Detailed Description

These methods relate to the Fiber interface.

Function Documentation

◆ currentFiber()

Fiber * gem5::Fiber::currentFiber ( )
static

Get a pointer to the current running Fiber.

Definition at line 185 of file fiber.cc.

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

◆ Fiber() [1/2]

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

Definition at line 88 of file fiber.cc.

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

◆ Fiber() [2/2]

gem5::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 85 of file fiber.cc.

◆ finished()

bool gem5::Fiber::finished ( ) const
inline

◆ primaryFiber()

Fiber * gem5::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 186 of file fiber.cc.

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

◆ run()

void gem5::Fiber::run ( )

◆ started()

bool gem5::Fiber::started ( ) const
inline

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

Definition at line 116 of file fiber.hh.

References gem5::Fiber::_started.

Referenced by TEST().

◆ ~Fiber()

gem5::Fiber::~Fiber ( )
virtual

Variable Documentation

◆ DefaultStackSize

const size_t gem5::Fiber::DefaultStackSize = 0x50000
static

Definition at line 77 of file fiber.hh.


Generated on Wed Dec 21 2022 10:23:05 for gem5 by doxygen 1.9.1