Pol  Revision:e50bd96
Pol::threadhelp Namespace Reference

Classes

class  DynTaskThreadPool
 
class  TaskThreadPool
 
class  ThreadData
 
class  ThreadMap
 
class  ThreadRegister
 

Functions

std::atomic< unsigned int > child_threads (0)
 
void create_thread (ThreadData *td, bool dec_child=false)
 
void init_threadhelp ()
 
void run_thread (void(*threadf)(void))
 
void run_thread (void(*threadf)(void *), void *arg)
 
void start_thread (void(*entry)(void *), const char *thread_name, void *arg)
 
void start_thread (void(*entry)(void), const char *thread_name)
 
size_t thread_pid ()
 
void thread_sleep_ms (unsigned millis)
 
void * thread_stub2 (void *v_td)
 

Variables

std::atomic< unsigned int > child_threads
 
static pthread_attr_t create_detached_attr
 
static Clib::SpinLock pthread_attr_lock
 
ThreadMap threadmap
 
static int threads = 0
 

Function Documentation

std::atomic<unsigned int> Pol::threadhelp::child_threads ( )
void Pol::threadhelp::create_thread ( ThreadData td,
bool  dec_child = false 
)
void Pol::threadhelp::init_threadhelp ( )

Definition at line 92 of file threadhelp.cpp.

References passert_always.

Referenced by Pol::xmain_inner().

void Pol::threadhelp::run_thread ( void(*)(void)  threadf)

Definition at line 111 of file threadhelp.cpp.

References child_threads, ERROR_PRINT, thread_pid(), and Pol::threadhelp::ThreadMap::Unregister().

Referenced by thread_stub2().

+ Here is the call graph for this function:

void Pol::threadhelp::run_thread ( void(*)(void *)  threadf,
void *  arg 
)

Definition at line 127 of file threadhelp.cpp.

References child_threads, ERROR_PRINT, thread_pid(), and Pol::threadhelp::ThreadMap::Unregister().

+ Here is the call graph for this function:

void Pol::threadhelp::start_thread ( void(*)(void)  entry,
const char *  thread_name 
)
void Pol::threadhelp::thread_sleep_ms ( unsigned  millis)

Definition at line 101 of file threadhelp.cpp.

Referenced by Pol::Core::reap_thread().

Variable Documentation

pthread_attr_t Pol::threadhelp::create_detached_attr
static

Definition at line 89 of file threadhelp.cpp.

Clib::SpinLock Pol::threadhelp::pthread_attr_lock
static

Definition at line 90 of file threadhelp.cpp.

int Pol::threadhelp::threads = 0
static

Definition at line 38 of file threadhelp.cpp.