#include <thread.h>
|
void | cleanup () |
| This should only ever be invoked by the delete thread event. More...
|
|
|
static void | run_routine (void *threadptr) |
| Run routine that defines the initial context for this task. More...
|
|
Definition at line 42 of file thread.h.
Help resolve deadlock situations.
Enumerator |
---|
PENDING |
|
INITIALIZED |
|
ACTIVE |
|
SUSPENDED |
|
BLOCKED |
|
CANCELED |
|
DONE |
|
Definition at line 50 of file thread.h.
virtual sstmac::sw::thread::~thread |
( |
| ) |
|
|
virtual |
sstmac::sw::thread::thread |
( |
| ) |
|
|
protected |
virtual api* sstmac::sw::thread::_get_api |
( |
const char * |
name | ) |
|
|
protectedvirtual |
int sstmac::sw::thread::active_core |
( |
| ) |
const |
|
inline |
void sstmac::sw::thread::add_affinity |
( |
int |
core | ) |
|
|
inline |
app_id sstmac::sw::thread::aid |
( |
| ) |
const |
|
inline |
void sstmac::sw::thread::append_backtrace |
( |
void * |
fxn | ) |
|
void** sstmac::sw::thread::backtrace |
( |
| ) |
const |
|
inline |
int sstmac::sw::thread::backtrace_nfxn |
( |
| ) |
const |
|
inline |
void sstmac::sw::thread::cancel |
( |
| ) |
|
|
inline |
This thread is not currently active - blocked on something However, some kill event happened and I never want to see this thread again.
Make sure the thread doesn't unblock and clean up all resources associated with the thread
Definition at line 147 of file thread.h.
References CANCELED, and state_.
void sstmac::sw::thread::cleanup |
( |
| ) |
|
|
private |
This should only ever be invoked by the delete thread event.
This ensures that the thread is completely done being operated on It is now safe to free all resources (thread-local vars, etc)
Referenced by set_pthread_map().
virtual void sstmac::sw::thread::clear_subthread_from_parent_app |
( |
| ) |
|
|
virtual |
void sstmac::sw::thread::collect_backtrace |
( |
int |
nfxn | ) |
|
uint64_t sstmac::sw::thread::cpumask |
( |
| ) |
const |
|
inline |
static thread* sstmac::sw::thread::current |
( |
| ) |
|
|
static |
template<class T >
T* sstmac::sw::thread::get_api |
( |
| ) |
|
|
inline |
state sstmac::sw::thread::get_state |
( |
| ) |
const |
|
inline |
void* sstmac::sw::thread::get_tls_value |
( |
long |
thekey | ) |
const |
long sstmac::sw::thread::init_id |
( |
| ) |
|
virtual void sstmac::sw::thread::init_perf_model_params |
( |
sprockit::sim_parameters * |
params | ) |
|
|
virtual |
bool sstmac::sw::thread::is_canceled |
( |
| ) |
const |
|
inline |
bool sstmac::sw::thread::is_initialized |
( |
| ) |
const |
|
inline |
void sstmac::sw::thread::join |
( |
| ) |
|
virtual void sstmac::sw::thread::kill |
( |
| ) |
|
|
virtual |
int sstmac::sw::thread::last_backtrace_nfxn |
( |
| ) |
const |
|
inline |
virtual app* sstmac::sw::thread::parent_app |
( |
| ) |
const |
|
inlinevirtual |
void sstmac::sw::thread::pop_backtrace |
( |
| ) |
|
void sstmac::sw::thread::register_lib |
( |
library * |
lib | ) |
|
template<class T >
T& sstmac::sw::thread::register_perf_ctr_variable |
( |
void * |
ptr | ) |
|
|
inline |
void sstmac::sw::thread::remove_perf_ctr_variable |
( |
void * |
ptr | ) |
|
|
inline |
virtual void sstmac::sw::thread::run |
( |
| ) |
|
|
pure virtual |
static void sstmac::sw::thread::run_routine |
( |
void * |
threadptr | ) |
|
|
staticprivate |
Run routine that defines the initial context for this task.
This routine calls the virtual thread::run method.
Referenced by set_pthread_map().
key* sstmac::sw::thread::schedule_key |
( |
| ) |
|
|
inline |
void sstmac::sw::thread::set_active_core |
( |
int |
core | ) |
|
|
inline |
void sstmac::sw::thread::set_affinity |
( |
int |
core | ) |
|
|
inline |
void sstmac::sw::thread::set_api |
( |
thread * |
thr | ) |
|
|
inline |
void sstmac::sw::thread::set_backtrace |
( |
void ** |
bt | ) |
|
|
inline |
void sstmac::sw::thread::set_cpumask |
( |
uint64_t |
cpumask | ) |
|
|
inline |
void sstmac::sw::thread::set_pthread_map |
( |
pthread_map_t * |
threadmap | ) |
|
|
inline |
void sstmac::sw::thread::set_tls_value |
( |
long |
thekey, |
|
|
void * |
ptr |
|
) |
| |
void sstmac::sw::thread::spawn |
( |
thread * |
thr | ) |
|
void* sstmac::sw::thread::stack |
( |
| ) |
const |
|
inline |
size_t sstmac::sw::thread::stacksize |
( |
| ) |
const |
|
inline |
void sstmac::sw::thread::start_thread |
( |
thread * |
thr | ) |
|
A convenience request to start a new thread.
The current thread has to be initialized for this to work.
Referenced by set_backtrace().
long sstmac::sw::thread::thread_id |
( |
| ) |
const |
|
inline |
task_id sstmac::sw::thread::tid |
( |
| ) |
const |
|
inline |
virtual std::string sstmac::sw::thread::to_string |
( |
| ) |
const |
|
inlinevirtual |
void sstmac::sw::thread::unregister_all_libs |
( |
| ) |
|
|
protected |
void sstmac::sw::thread::zero_affinity |
( |
| ) |
|
|
inline |
friend class delete_thread_event |
|
friend |
api* static_get_api |
( |
const char * |
name | ) |
|
|
friend |
int sstmac::sw::thread::active_core_ |
|
private |
spkt_unordered_map<std::string, api*> sstmac::sw::thread::apis_ |
|
protected |
void** sstmac::sw::thread::backtrace_ |
|
private |
int sstmac::sw::thread::bt_nfxn_ |
|
private |
uint64_t sstmac::sw::thread::cpumask_ |
|
private |
bool sstmac::sw::thread::isInit |
|
private |
std::queue<key*> sstmac::sw::thread::joiners_ |
|
protected |
int sstmac::sw::thread::last_bt_collect_nfxn_ |
|
private |
const int sstmac::sw::thread::main_thread = -1 |
|
static |
const app_id sstmac::sw::thread::main_thread_aid |
|
static |
const task_id sstmac::sw::thread::main_thread_tid |
|
static |
const int sstmac::sw::thread::nic_thread = -2 |
|
static |
const int sstmac::sw::thread::no_core_affinity = -1 |
|
static |
const int sstmac::sw::thread::no_socket_affinity = -1 |
|
static |
Each thread can only run under one OS/scheduler.
Definition at line 350 of file thread.h.
Referenced by os().
app* sstmac::sw::thread::parent_app_ |
|
protected |
std::list<library*> sstmac::sw::thread::pending_libs_ |
|
private |
const int sstmac::sw::thread::rdma_thread = -3 |
|
static |
key* sstmac::sw::thread::schedule_key_ |
|
private |
This key gets used by the compute scheduler to delay this thread.
Definition at line 386 of file thread.h.
Referenced by schedule_key().
void* sstmac::sw::thread::stack_ |
|
private |
The stack given to this thread.
Definition at line 372 of file thread.h.
Referenced by stack().
size_t sstmac::sw::thread::stacksize_ |
|
private |
state sstmac::sw::thread::state_ |
|
protected |
long sstmac::sw::thread::thread_id_ |
|
private |
std::map<long, void*> sstmac::sw::thread::tls_values_ |
|
private |
The documentation for this class was generated from the following file: