#include <Service_Config.h>
Public Member Functions | |
ACE_Threading_Helper () | |
~ACE_Threading_Helper () | |
void | set (void *) |
void * | get (void) |
Private Attributes | |
ACE_thread_key_t | key_ |
Definition at line 159 of file Service_Config.h.
ACE_Threading_Helper< ACE_Thread_Mutex >::ACE_Threading_Helper | ( | ) |
Definition at line 39 of file Service_Config.cpp.
References ACE_ERROR, ACE_TEXT, ACE_Thread::keycreate(), and LM_ERROR.
00040 : key_ (ACE_OS::NULL_key) 00041 { 00042 # if defined (ACE_HAS_TSS_EMULATION) 00043 ACE_Object_Manager::init_tss (); 00044 # endif 00045 00046 if (ACE_Thread::keycreate (&key_, 0, 0) == -1) 00047 { 00048 ACE_ERROR ((LM_ERROR, 00049 ACE_TEXT ("(%P|%t) Failed to create thread key: %p\n"), 00050 "")); 00051 } 00052 }
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Threading_Helper< ACE_Thread_Mutex >::~ACE_Threading_Helper | ( | ) |
Definition at line 33 of file Service_Config.cpp.
References ACE_OS::thr_key_detach(), and ACE_OS::thr_keyfree().
00034 { 00035 ACE_OS::thr_key_detach (this->key_, 0); 00036 ACE_OS::thr_keyfree (this->key_); 00037 }
void * ACE_Threading_Helper< ACE_Thread_Mutex >::get | ( | void | ) |
Definition at line 64 of file Service_Config.cpp.
References ACE_ERROR_RETURN, ACE_TEXT, ACE_Thread::getspecific(), and LM_ERROR.
00065 { 00066 void* temp = 0; 00067 if (ACE_Thread::getspecific (key_, &temp) == -1) 00068 ACE_ERROR_RETURN ((LM_ERROR, 00069 ACE_TEXT ("(%P|%t) Service Config failed to get thread key value: %p\n"), 00070 ""), 00071 0); 00072 return temp; 00073 }
void ACE_Threading_Helper< ACE_Thread_Mutex >::set | ( | void * | ) |
Definition at line 55 of file Service_Config.cpp.
References ACE_ERROR, ACE_TEXT, LM_ERROR, and ACE_Thread::setspecific().
00056 { 00057 if (ACE_Thread::setspecific (key_, p) == -1) 00058 ACE_ERROR ((LM_ERROR, 00059 ACE_TEXT ("(%P|%t) Service Config failed to set thread key value: %p\n"), 00060 "")); 00061 }
ACE_thread_key_t ACE_Threading_Helper< ACE_Thread_Mutex >::key_ [private] |
Key for the thread-specific data, which is a simple pointer to the thread's (currently-) global configuration context.
Definition at line 171 of file Service_Config.h.