gem5
v20.1.0.0
|
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 Fiber * | Fiber::currentFiber () |
Get a pointer to the current running Fiber. More... | |
static Fiber * | Fiber::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) | |
These methods relate to the Fiber interface.
|
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::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::Fiber | ( | size_t | stack_size = DefaultStackSize | ) |
|
inline |
Returns whether the "main" function of this fiber has finished.
Definition at line 100 of file fiber.hh.
References Fiber::_finished.
Referenced by sc_gem5::Kernel::init(), m5::Coroutine< Arg, Ret >::operator bool(), sc_gem5::Scheduler::pause(), sc_gem5::Kernel::regStats(), sc_gem5::Kernel::startup(), sc_gem5::Scheduler::stop(), TEST(), and sc_gem5::Scheduler::throwUp().
|
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().
void Fiber::run | ( | ) |
Start executing the fiber represented by this object.
This function will "return" when the current fiber is switched back to later on.
Definition at line 163 of file fiber.cc.
References Fiber::_finished, Fiber::_started, Fiber::createContext(), Fiber::ctx, and panic_if.
Referenced by m5::Coroutine< Arg, Ret >::call(), m5::Coroutine< Arg, Ret >::CallerType::get(), m5::Coroutine< Arg, Ret >::CallerType::operator()(), sc_gem5::Scheduler::pause(), Fiber::start(), sc_gem5::Scheduler::start(), sc_gem5::Scheduler::stop(), TEST(), sc_gem5::Scheduler::throwUp(), and sc_gem5::Scheduler::yield().
|
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().
|
virtual |
Definition at line 111 of file fiber.cc.
References Fiber::guardPage, Fiber::guardPageSize, panic_if, Fiber::stack, and Fiber::stackSize.