gem5  v20.1.0.0
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
System::Threads Class Reference

#include <system.hh>

Classes

class  const_iterator
 
struct  Thread
 

Public Member Functions

ThreadContextfindFree ()
 
ThreadContextoperator[] (ContextID id) const
 
void markActive (ContextID id)
 
int size () const
 
bool empty () const
 
int numRunning () const
 
int numActive () const
 
void quiesce (ContextID id)
 
void quiesceTick (ContextID id, Tick when)
 
const_iterator begin () const
 
const_iterator end () const
 

Private Member Functions

Threadthread (ContextID id)
 
const Threadthread (ContextID id) const
 
ContextID insert (ThreadContext *tc, ContextID id=InvalidContextID)
 
void replace (ThreadContext *tc, ContextID id)
 

Private Attributes

std::vector< Threadthreads
 

Friends

class System
 

Detailed Description

Definition at line 106 of file system.hh.

Member Function Documentation

◆ begin()

const_iterator System::Threads::begin ( ) const
inline

Definition at line 221 of file system.hh.

◆ empty()

bool System::Threads::empty ( ) const
inline

Definition at line 205 of file system.hh.

References threads.

Referenced by SparcISA::FsWorkload::initState(), and System::validKvmEnvironment().

◆ end()

const_iterator System::Threads::end ( ) const
inline

Definition at line 222 of file system.hh.

References size().

◆ findFree()

ThreadContext * System::Threads::findFree ( )

Definition at line 155 of file system.cc.

References ThreadContext::Halted.

Referenced by cloneFunc().

◆ insert()

ContextID System::Threads::insert ( ThreadContext tc,
ContextID  id = InvalidContextID 
)
private

◆ markActive()

void System::Threads::markActive ( ContextID  id)
inline

Definition at line 202 of file system.hh.

References System::Threads::Thread::active, and thread().

Referenced by System::markWorkItem().

◆ numActive()

int System::Threads::numActive ( ) const
inline

Definition at line 208 of file system.hh.

References System::Threads::Thread::active, X86ISA::count, thread(), and threads.

Referenced by System::markWorkItem().

◆ numRunning()

int System::Threads::numRunning ( ) const

◆ operator[]()

ThreadContext* System::Threads::operator[] ( ContextID  id) const
inline

Definition at line 197 of file system.hh.

References System::Threads::Thread::context, and thread().

◆ quiesce()

void System::Threads::quiesce ( ContextID  id)

Definition at line 179 of file system.cc.

References DPRINTFS, and ArmISA::t.

Referenced by ThreadContext::quiesce().

◆ quiesceTick()

void System::Threads::quiesceTick ( ContextID  id,
Tick  when 
)

Definition at line 190 of file system.cc.

References DPRINTFS, and ArmISA::t.

Referenced by ThreadContext::quiesceTick().

◆ replace()

void System::Threads::replace ( ThreadContext tc,
ContextID  id 
)
private

Definition at line 138 of file system.cc.

References ThreadContext::getCpuPtr(), panic_if, and ArmISA::t.

Referenced by System::replaceThreadContext().

◆ size()

int System::Threads::size ( ) const
inline

◆ thread() [1/2]

Thread& System::Threads::thread ( ContextID  id)
inlineprivate

◆ thread() [2/2]

const Thread& System::Threads::thread ( ContextID  id) const
inlineprivate

Definition at line 131 of file system.hh.

References ArmISA::id, size(), and threads.

Friends And Related Function Documentation

◆ System

friend class System
friend

Definition at line 140 of file system.hh.

Member Data Documentation

◆ threads

std::vector<Thread> System::Threads::threads
private

Definition at line 121 of file system.hh.

Referenced by empty(), numActive(), System::serialize(), size(), thread(), and System::unserialize().


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

Generated on Wed Sep 30 2020 14:02:32 for gem5 by doxygen 1.8.17