gem5  v20.1.0.0
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
O3ThreadState< Impl > Struct Template Reference

Class that has various thread state, such as the status, the current instruction being processed, whether or not the thread has a trap pending or is being externally updated, the ThreadContext pointer, etc. More...

#include <commit.hh>

Public Types

typedef ThreadContext::Status Status
 
typedef Impl::O3CPU O3CPU
 

Public Member Functions

 O3ThreadState (O3CPU *_cpu, int _thread_num, Process *_process)
 
void serialize (CheckpointOut &cp) const override
 
void unserialize (CheckpointIn &cp) override
 
ThreadContextgetTC ()
 Returns a pointer to the TC of this thread. More...
 
void syscall ()
 Handles the syscall. More...
 

Public Attributes

PCEventQueue pcEventQueue
 
EventQueue comInstEventQueue
 An instruction-based event queue. More...
 
bool noSquashFromTC
 
bool trapPending
 Whether or not the thread is currently waiting on a trap, and thus able to be externally updated without squashing. More...
 
std::unique_ptr< BaseHTMCheckpointhtmCheckpoint
 Pointer to the hardware transactional memory checkpoint. More...
 
ThreadContexttc
 Pointer to the ThreadContext of this thread. More...
 

Private Attributes

O3CPUcpu
 Pointer to the CPU. More...
 

Detailed Description

template<class Impl>
struct O3ThreadState< Impl >

Class that has various thread state, such as the status, the current instruction being processed, whether or not the thread has a trap pending or is being externally updated, the ThreadContext pointer, etc.

It also handles anything related to a specific thread's process, such as syscalls and checking valid addresses.

Definition at line 56 of file commit.hh.

Member Typedef Documentation

◆ O3CPU

template<class Impl >
typedef Impl::O3CPU O3ThreadState< Impl >::O3CPU

Definition at line 66 of file thread_state.hh.

◆ Status

template<class Impl >
typedef ThreadContext::Status O3ThreadState< Impl >::Status

Definition at line 65 of file thread_state.hh.

Constructor & Destructor Documentation

◆ O3ThreadState()

template<class Impl >
O3ThreadState< Impl >::O3ThreadState ( O3CPU _cpu,
int  _thread_num,
Process _process 
)
inline

Definition at line 98 of file thread_state.hh.

Member Function Documentation

◆ getTC()

template<class Impl >
ThreadContext* O3ThreadState< Impl >::getTC ( )
inline

Returns a pointer to the TC of this thread.

Definition at line 130 of file thread_state.hh.

References O3ThreadState< Impl >::tc.

◆ serialize()

template<class Impl >
void O3ThreadState< Impl >::serialize ( CheckpointOut cp) const
inlineoverride

Definition at line 105 of file thread_state.hh.

References ThreadState::serialize(), and O3ThreadState< Impl >::tc.

◆ syscall()

template<class Impl >
void O3ThreadState< Impl >::syscall ( )
inline

Handles the syscall.

Definition at line 133 of file thread_state.hh.

References O3ThreadState< Impl >::tc.

◆ unserialize()

template<class Impl >
void O3ThreadState< Impl >::unserialize ( CheckpointIn cp)
inlineoverride

Member Data Documentation

◆ comInstEventQueue

template<class Impl >
EventQueue O3ThreadState< Impl >::comInstEventQueue

An instruction-based event queue.

Used for scheduling events based on number of instructions committed.

Definition at line 78 of file thread_state.hh.

◆ cpu

template<class Impl >
O3CPU* O3ThreadState< Impl >::cpu
private

Pointer to the CPU.

Definition at line 70 of file thread_state.hh.

◆ htmCheckpoint

template<class Impl >
std::unique_ptr<BaseHTMCheckpoint> O3ThreadState< Impl >::htmCheckpoint

Pointer to the hardware transactional memory checkpoint.

Definition at line 96 of file thread_state.hh.

◆ noSquashFromTC

template<class Impl >
bool O3ThreadState< Impl >::noSquashFromTC

Definition at line 88 of file thread_state.hh.

Referenced by O3ThreadState< Impl >::unserialize().

◆ pcEventQueue

template<class Impl >
PCEventQueue O3ThreadState< Impl >::pcEventQueue

Definition at line 73 of file thread_state.hh.

◆ tc

template<class Impl >
ThreadContext* O3ThreadState< Impl >::tc

◆ trapPending

template<class Impl >
bool O3ThreadState< Impl >::trapPending

Whether or not the thread is currently waiting on a trap, and thus able to be externally updated without squashing.

Definition at line 93 of file thread_state.hh.


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

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