Pol  Revision:cb584c9
threadhelp.cpp File Reference
#include "threadhelp.h"
#include <cstring>
#include <exception>
#include <thread>
#include "esignal.h"
#include "logfacility.h"
#include "passert.h"
#include <errno.h>
#include <pthread.h>
#include <unistd.h>

Go to the source code of this file.


struct  Pol::threadhelp::DynTaskThreadPool::PoolWorker::BusyGuard
class  Pol::threadhelp::DynTaskThreadPool::PoolWorker
class  Pol::threadhelp::ThreadData




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


static pthread_attr_t Pol::threadhelp::create_detached_attr
static Clib::SpinLock Pol::threadhelp::pthread_attr_lock
ThreadMap Pol::threadhelp::threadmap
static int Pol::threadhelp::threads = 0

Detailed Description

  • 2005/12/13 Shinigami: added error code printing in create_thread for debugging
  • 2006/02/06 Shinigami: smaller bugfix in logging error code printing in create_thread extended
  • 2007/02/28 Shinigami: error code printing in create_thread added for linux
  • 2007/03/08 Shinigami: added pthread_exit and _endhreadex to close threads
  • 2008/03/02 Nando: Added bool dec_child to create_thread, used to dec_child_thread_count() if there is an error on create_thread. Will fix some of the zombies.

Definition in file threadhelp.cpp.