gem5  v20.1.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sc_gem5::Thread::Context Class Reference
Inheritance diagram for sc_gem5::Thread::Context:
Fiber

Public Member Functions

 Context (Thread *thread, size_t size)
 
- 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 Member Functions

void main () override
 This method is called when this fiber is first run. More...
 

Private Attributes

Threadthread
 

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 79 of file process_types.hh.

Constructor & Destructor Documentation

◆ Context()

sc_gem5::Thread::Context::Context ( Thread thread,
size_t  size 
)
inline

Definition at line 82 of file process_types.hh.

Member Function Documentation

◆ main()

void sc_gem5::Thread::Context::main ( )
inlineoverrideprivatevirtual

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 88 of file process_types.hh.

References sc_gem5::Process::_needsStart, sc_gem5::Process::run(), sc_gem5::scheduler, sc_gem5::Process::terminate(), thread, sc_gem5::Scheduler::throwUp(), and sc_gem5::Scheduler::yield().

Member Data Documentation

◆ thread

Thread* sc_gem5::Thread::Context::thread
private

Definition at line 85 of file process_types.hh.

Referenced by main().


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

Generated on Wed Sep 30 2020 14:03:10 for gem5 by doxygen 1.8.17