gem5  v20.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:
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 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 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 Fiber
const static size_t DefaultStackSize = 0x50000
 
- Protected Member Functions inherited from 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 Fiber.

Definition at line 47 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(), MipsISA::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 Sep 30 2020 14:03:10 for gem5 by doxygen 1.8.17