Pol
Revision:cb584c9
|
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 |
std::atomic<unsigned int> Pol::threadhelp::child_threads | ( | 0 | ) |
void Pol::threadhelp::create_thread | ( | ThreadData * | td, |
bool | dec_child = false |
||
) |
Definition at line 213 of file threadhelp.cpp.
References Pol::threadhelp::ThreadData::arg, child_threads, Pol::threadhelp::ThreadData::entry, Pol::threadhelp::ThreadData::entry_noparam, Pol::threadhelp::ThreadData::name, POLLOG, and thread_stub2().
Referenced by start_thread(), and thread_stub2().
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 | ) |
Definition at line 113 of file threadhelp.cpp.
References child_threads, ERROR_PRINT, thread_pid(), and Pol::threadhelp::ThreadMap::Unregister().
Referenced by thread_stub2().
void Pol::threadhelp::run_thread | ( | void(*)(void *) | threadf, |
void * | arg | ||
) |
Definition at line 129 of file threadhelp.cpp.
References child_threads, ERROR_PRINT, thread_pid(), and Pol::threadhelp::ThreadMap::Unregister().
void Pol::threadhelp::start_thread | ( | void(*)(void *) | entry, |
const char * | thread_name, | ||
void * | arg | ||
) |
Definition at line 233 of file threadhelp.cpp.
References Pol::threadhelp::ThreadData::arg, child_threads, create_thread(), Pol::threadhelp::ThreadData::entry, Pol::threadhelp::ThreadData::entry_noparam, and Pol::threadhelp::ThreadData::name.
Referenced by Pol::Module::PolSystemExecutorModule::mf_AddRealm(), Pol::Clib::SocketClientThread::start(), Pol::Network::start_aux_services(), Pol::Core::start_http_server(), Pol::Core::start_sql_service(), Pol::Clib::SocketClientThread::start_thread(), Pol::Core::start_threads(), Pol::Core::start_uo_client_listeners(), Pol::xmain_inner(), and Pol::Clib::SocketClientThread::~SocketClientThread().
void Pol::threadhelp::start_thread | ( | void(*)(void) | entry, |
const char * | thread_name | ||
) |
Definition at line 246 of file threadhelp.cpp.
References Pol::threadhelp::ThreadData::arg, child_threads, create_thread(), Pol::threadhelp::ThreadData::entry, Pol::threadhelp::ThreadData::entry_noparam, and Pol::threadhelp::ThreadData::name.
size_t Pol::threadhelp::thread_pid | ( | ) |
Definition at line 107 of file threadhelp.cpp.
Referenced by Pol::Core::polsem_lock(), Pol::Core::polsem_unlock(), Pol::Core::UoClientThread::run(), run_thread(), Pol::Core::start_threads(), thread_stub2(), Pol::threadhelp::ThreadRegister::ThreadRegister(), and Pol::threadhelp::ThreadRegister::~ThreadRegister().
void Pol::threadhelp::thread_sleep_ms | ( | unsigned | millis | ) |
Definition at line 103 of file threadhelp.cpp.
Referenced by Pol::Core::reap_thread().
void* Pol::threadhelp::thread_stub2 | ( | void * | v_td | ) |
Definition at line 158 of file threadhelp.cpp.
References Pol::threadhelp::ThreadData::arg, child_threads, create_thread(), Pol::threadhelp::ThreadData::entry, Pol::threadhelp::ThreadData::entry_noparam, Pol::threadhelp::ThreadData::name, POLLOG, Pol::threadhelp::ThreadMap::Register(), run_thread(), and thread_pid().
Referenced by create_thread().
std::atomic<unsigned int> Pol::threadhelp::child_threads |
|
static |
Definition at line 91 of file threadhelp.cpp.
|
static |
Definition at line 92 of file threadhelp.cpp.
ThreadMap Pol::threadhelp::threadmap |
Definition at line 40 of file threadhelp.cpp.
Referenced by Pol::Clib::handleStackTraceRequestLinux(), Pol::Clib::ExceptionParser::logAllStackTraces(), Pol::Core::start_threads(), and Pol::Core::threadstatus_thread().
|
static |
Definition at line 42 of file threadhelp.cpp.