9#ifndef _LOG4CPP_THREADING_PTHREADS_HH
10#define _LOG4CPP_THREADING_PTHREADS_HH
31 pthread_mutex_t mutex;
35 ::pthread_mutex_init(&mutex, NULL);
39 ::pthread_mutex_lock(&mutex);
43 ::pthread_mutex_unlock(&mutex);
47 ::pthread_mutex_destroy(&mutex);
89 delete reinterpret_cast<T *
>(p);
97 ::pthread_key_delete(_key);
101 return reinterpret_cast<T *
>(::pthread_getspecific(_key));
109 ::pthread_setspecific(_key, NULL);
119 ::pthread_setspecific(_key, p);
Definition PThreads.hh:29
Mutex()
Definition PThreads.hh:34
void lock()
Definition PThreads.hh:38
void unlock()
Definition PThreads.hh:42
~Mutex()
Definition PThreads.hh:46
definition of ScopedLock;
Definition PThreads.hh:58
ScopedLock(Mutex &mutex)
Definition PThreads.hh:63
~ScopedLock()
Definition PThreads.hh:68
This class holds Thread local data of type T, i.e.
Definition PThreads.hh:76
~ThreadLocalDataHolder()
Definition PThreads.hh:92
T data_type
Definition PThreads.hh:81
ThreadLocalDataHolder()
Definition PThreads.hh:83
T * operator->() const
Definition PThreads.hh:104
T & operator*() const
Definition PThreads.hh:105
static void freeHolder(void *p)
Definition PThreads.hh:87
T * get() const
Definition BoostThreads.hh:34
void reset(T *p=NULL)
Definition PThreads.hh:114
T * release()
Definition PThreads.hh:107
static std::string getThreadId()
Return an identifier for the current thread.
Definition BoostThreads.hh:22
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16