Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CAThreadList Class Reference

Public Member Functions

 CAThreadList ()
 
 ~CAThreadList ()
 
SINT32 put (const CAThread *const thread)
 
SINT32 remove (const CAThread *const thread)
 
SINT32 waitAndRemoveAll ()
 Waits for finishing of all threads in list and removes them. More...
 
void showAll () const
 
UINT32 getSize () const
 

Private Member Functions

void removeAll ()
 

Private Attributes

UINT32 m_Size
 
thread_list_entry_tm_pHead
 
CAMutexm_pListLock
 

Constructor & Destructor Documentation

◆ CAThreadList()

CAThreadList::CAThreadList ( )
Author
Simon Pecher, JonDos GmbH

References m_pHead, m_pListLock, and m_Size.

◆ ~CAThreadList()

CAThreadList::~CAThreadList ( )

Member Function Documentation

◆ getSize()

UINT32 CAThreadList::getSize ( ) const

References m_Size.

◆ put()

SINT32 CAThreadList::put ( const CAThread *const  thread)

◆ remove()

SINT32 CAThreadList::remove ( const CAThread *const  thread)

◆ removeAll()

void CAThreadList::removeAll ( )
private

◆ showAll()

void CAThreadList::showAll ( ) const

◆ waitAndRemoveAll()

SINT32 CAThreadList::waitAndRemoveAll ( )

Waits for finishing of all threads in list and removes them.

The memory of each CAThread object is freed.

References E_SUCCESS, CAThread::getID(), CAThread::getName(), CAThread::join(), m_pHead, m_Size, CAMsg::printMsg(), thread_list_entry::tle_next, and thread_list_entry::tle_thread.

Referenced by CACryptoBenchmark::doBenchmark().

Member Data Documentation

◆ m_pHead

thread_list_entry_t* CAThreadList::m_pHead
private

◆ m_pListLock

CAMutex* CAThreadList::m_pListLock
private

◆ m_Size

UINT32 CAThreadList::m_Size
private