SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
|
All state and metadata for a worker thread. More...
#include <thread_pool.h>
All state and metadata for a worker thread.
Definition at line 61 of file thread_pool.h.
Public Attributes | |
WorkerThreadFunc | func |
void * | args |
User-provided arguments. | |
pthread_t | thread |
pthread handle. | |
pthread_mutex_t | statusMutex |
This mutex protects all of the subsequent fields of this struct. More... | |
bool | exit |
Set to true to inform the worker thread to terminate. | |
bool | valid |
Set to true if the func and args are valid and need to be executed. | |
ThreadStatus | status |
pthread_cond_t | wakeupCond |
The main thread signals this condition variable to wake up the thread and have it check for work (indicated by valid = true). | |
pthread_cond_t | statusCond |
The worker thread signals this condition variable to inform the main thread of a change in status (usually from Running -> Idle). | |
int | cpuid |
The gem5 simulation CPU ID assigned to this worker thread. | |
pthread_mutex_t smaug::ThreadPool::WorkerThread::statusMutex |
This mutex protects all of the subsequent fields of this struct.
Any modification of these fields must first acquire this lock.
Definition at line 72 of file thread_pool.h.