My Project
Public Member Functions | Data Fields
LibThread::ThreadState Class Reference

Public Member Functions

 ThreadState ()
 
 ~ThreadState ()
 

Data Fields

bool active
 
bool running
 
int index
 
void *(* thread_func )(ThreadState *, void *)
 
void * arg
 
void * result
 
pthread_t id
 
pthread_t parent
 
Lock lock
 
ConditionVariable to_cond
 
ConditionVariable from_cond
 
queue< stringto_thread
 
queue< stringfrom_thread
 

Detailed Description

Definition at line 1336 of file shared.cc.

Constructor & Destructor Documentation

◆ ThreadState()

LibThread::ThreadState::ThreadState ( )
inline

Definition at line 1350 of file shared.cc.

1350 : lock(), to_cond(&lock), from_cond(&lock),
1351 to_thread(), from_thread() {
1352 active = false;
1353 running = false;
1354 index = -1;
1355 }
ConditionVariable to_cond
Definition: shared.cc:1346
queue< string > from_thread
Definition: shared.cc:1349
ConditionVariable from_cond
Definition: shared.cc:1347
queue< string > to_thread
Definition: shared.cc:1348

◆ ~ThreadState()

LibThread::ThreadState::~ThreadState ( )
inline

Definition at line 1356 of file shared.cc.

1356 {
1357 // We do nothing here. This is to prevent the condition
1358 // variable destructor from firing upon program exit,
1359 // which would invoke undefined behavior if the thread
1360 // is still running.
1361 }

Field Documentation

◆ active

bool LibThread::ThreadState::active

Definition at line 1338 of file shared.cc.

◆ arg

void* LibThread::ThreadState::arg

Definition at line 1342 of file shared.cc.

◆ from_cond

ConditionVariable LibThread::ThreadState::from_cond

Definition at line 1347 of file shared.cc.

◆ from_thread

queue<string> LibThread::ThreadState::from_thread

Definition at line 1349 of file shared.cc.

◆ id

pthread_t LibThread::ThreadState::id

Definition at line 1343 of file shared.cc.

◆ index

int LibThread::ThreadState::index

Definition at line 1340 of file shared.cc.

◆ lock

Lock LibThread::ThreadState::lock

Definition at line 1345 of file shared.cc.

◆ parent

pthread_t LibThread::ThreadState::parent

Definition at line 1344 of file shared.cc.

◆ result

void * LibThread::ThreadState::result

Definition at line 1342 of file shared.cc.

◆ running

bool LibThread::ThreadState::running

Definition at line 1339 of file shared.cc.

◆ thread_func

void *(* LibThread::ThreadState::thread_func) (ThreadState *, void *)

Definition at line 1341 of file shared.cc.

◆ to_cond

ConditionVariable LibThread::ThreadState::to_cond

Definition at line 1346 of file shared.cc.

◆ to_thread

queue<string> LibThread::ThreadState::to_thread

Definition at line 1348 of file shared.cc.


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