gem5  v22.1.0.0
Public Member Functions | Private Attributes | List of all members
sc_gem5::ScMainFiber Class Reference

#include <sc_main_fiber.hh>

Inheritance diagram for sc_gem5::ScMainFiber:
gem5::Fiber

Public Member Functions

 ScMainFiber ()
 
int argc ()
 
const char *const * argv ()
 
std::string resultStr ()
 
int resultInt ()
 
bool called ()
 
void setArgs (int new_argc, char **new_argv)
 
void main () override
 This method is called when this fiber is first run. More...
 
- Public Member Functions inherited from gem5::Fiber
virtual ~Fiber ()
 
void run ()
 Start executing the fiber represented by this object. More...
 
bool finished () const
 Returns whether the "main" function of this fiber has finished. More...
 
bool started () const
 Returns whether the "main" function of this fiber has started. More...
 
 Fiber (size_t stack_size=DefaultStackSize)
 
 Fiber (Fiber *link, size_t stack_size=DefaultStackSize)
 

Private Attributes

int _argc = 0
 
char ** _argv = NULL
 
std::string _resultStr
 
int _resultInt = 1
 
bool _called = false
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::Fiber
static FibercurrentFiber ()
 Get a pointer to the current running Fiber. More...
 
static FiberprimaryFiber ()
 Get a pointer to the primary Fiber. More...
 
- Static Public Attributes inherited from gem5::Fiber
static const size_t DefaultStackSize = 0x50000
 
- Protected Member Functions inherited from gem5::Fiber
void setStarted ()
 

Detailed Description

Definition at line 37 of file sc_main_fiber.hh.

Constructor & Destructor Documentation

◆ ScMainFiber()

sc_gem5::ScMainFiber::ScMainFiber ( )
inline

Definition at line 48 of file sc_main_fiber.hh.

Member Function Documentation

◆ argc()

int sc_gem5::ScMainFiber::argc ( )
inline

Definition at line 50 of file sc_main_fiber.hh.

References _argc.

Referenced by sc_core::sc_argc().

◆ argv()

const char* const* sc_gem5::ScMainFiber::argv ( )
inline

Definition at line 51 of file sc_main_fiber.hh.

References _argv.

Referenced by sc_core::sc_argv().

◆ called()

bool sc_gem5::ScMainFiber::called ( )
inline

◆ main()

void sc_gem5::ScMainFiber::main ( )
overridevirtual

This method is called when this fiber is first run.

Override it to give your fiber something to do. When main returns, the fiber will mark itself as finished and switch to its link fiber.

Implements gem5::Fiber.

Definition at line 48 of file sc_main_fiber.cc.

References _argc, _argv, _called, _resultInt, _resultStr, sc_gem5::Scheduler::clear(), fatal, sc_core::sc_report_handler::get_catch_actions(), gem5::VegaISA::r, sc_gem5::reportHandlerProc, sc_gem5::reportifyException(), sc_main(), and sc_gem5::scheduler.

◆ resultInt()

int sc_gem5::ScMainFiber::resultInt ( )
inline

Definition at line 53 of file sc_main_fiber.hh.

References _resultInt.

◆ resultStr()

std::string sc_gem5::ScMainFiber::resultStr ( )
inline

Definition at line 52 of file sc_main_fiber.hh.

References _resultStr.

◆ setArgs()

void sc_gem5::ScMainFiber::setArgs ( int  new_argc,
char **  new_argv 
)
inline

Definition at line 57 of file sc_main_fiber.hh.

References _argc, and _argv.

Member Data Documentation

◆ _argc

int sc_gem5::ScMainFiber::_argc = 0
private

Definition at line 40 of file sc_main_fiber.hh.

Referenced by argc(), main(), and setArgs().

◆ _argv

char** sc_gem5::ScMainFiber::_argv = NULL
private

Definition at line 41 of file sc_main_fiber.hh.

Referenced by argv(), main(), and setArgs().

◆ _called

bool sc_gem5::ScMainFiber::_called = false
private

Definition at line 45 of file sc_main_fiber.hh.

Referenced by called(), and main().

◆ _resultInt

int sc_gem5::ScMainFiber::_resultInt = 1
private

Definition at line 43 of file sc_main_fiber.hh.

Referenced by main(), and resultInt().

◆ _resultStr

std::string sc_gem5::ScMainFiber::_resultStr
private

Definition at line 42 of file sc_main_fiber.hh.

Referenced by main(), and resultStr().


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

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