#include <thread.h>
Public Member Functions | |
thread () | |
initialise to terminated state | |
thread (address PC) | |
initialise to specified address | |
~thread () | |
void | spawn (const address &PC) |
address | getAddress () |
get the current address of the thread | |
bool | isTerminated () |
test if the thread is terminated | |
thread & | operator++ () |
move the thread to the next address | |
thread & | operator+= (const int &i) |
thread & | operator%= (const int &i) |
thread & | operator= (const address &addr) |
set the address to the specified address | |
operator address () | |
implicit conversion to the current address | |
Protected Attributes | |
address | m_PC |
the current address of the thread | |
bool | m_terminated |
whether the thread is terminated or active |
Definition at line 15 of file thread.h.
|
initialise to terminated state
Definition at line 5 of file thread.cpp. |
|
initialise to specified address
Definition at line 12 of file thread.cpp. |
|
Definition at line 19 of file thread.cpp. |
|
get the current address of the thread
Definition at line 31 of file thread.cpp. |
|
test if the thread is terminated
Definition at line 37 of file thread.cpp. References m_terminated. Referenced by process::getThreadAddress(), and virtualMachine::step(). |
|
implicit conversion to the current address
Definition at line 71 of file thread.cpp. References m_PC. |
|
ensure the thread is within the range [0, i[ Definition at line 57 of file thread.cpp. References m_PC, and operator%=(). Referenced by operator%=(). |
|
move the thread to the next address
Definition at line 43 of file thread.cpp. References m_PC. |
|
jump the thread foward by the specified number of memory addresses Definition at line 50 of file thread.cpp. References m_PC, and operator+=(). Referenced by operator+=(). |
|
set the address to the specified address
Definition at line 64 of file thread.cpp. References m_PC, and operator=(). Referenced by operator=(). |
|
set the thread to the specified address and flag as active Definition at line 24 of file thread.cpp. References m_PC, m_terminated, and spawn(). Referenced by spawn(). |
|
the current address of the thread
Definition at line 57 of file thread.h. Referenced by getAddress(), operator address(), operator%=(), operator++(), operator+=(), operator=(), and spawn(). |
|
whether the thread is terminated or active
Definition at line 60 of file thread.h. Referenced by isTerminated(), and spawn(). |