Pol  Revision:cb584c9
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 94 of file threadhelp.cpp.

References passert_always.

Referenced by Pol::xmain_inner().

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

Definition at line 103 of file threadhelp.cpp.

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

Variable Documentation

pthread_attr_t Pol::threadhelp::create_detached_attr
static

Definition at line 91 of file threadhelp.cpp.

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

Definition at line 92 of file threadhelp.cpp.

int Pol::threadhelp::threads = 0
static

Definition at line 42 of file threadhelp.cpp.