10 #ifndef _LOG4CPP_THREADING_OMNITHREADS_HH
11 #define _LOG4CPP_THREADING_OMNITHREADS_HH
14 #include <omnithread.h>
31 typedef omni_mutex
Mutex;
48 template<
typename T>
class ThreadLocalDataHolder {
53 _key(omni_thread::allocate_key()) {};
62 inline T*
get()
const {
64 ::omni_thread::self()->get_value(
_key));
65 return (holder) ? holder->
data : NULL;
92 ::omni_thread::self()->get_value(
_key));
95 result = holder->
data;
110 ::omni_thread::self()->get_value(
_key));
119 ::omni_thread::self()->set_value(
_key, holder);
124 class Holder :
public omni_thread::value_t {