gem5 v24.0.0.0
Loading...
Searching...
No Matches
The Fiber API.

Functions

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

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.

Referenced by TEST().

◆ 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(), TEST(), and sc_gem5::Scheduler::yield().

◆ 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 Tue Jun 18 2024 16:24:09 for gem5 by doxygen 1.11.0