Public Member Functions | Private Attributes

ACE_Threading_Helper< ACE_Thread_Mutex > Class Template Reference

#include <Service_Config.h>

List of all members.

Public Member Functions

 ACE_Threading_Helper ()
 ~ACE_Threading_Helper ()
void set (void *)
void * get (void)

Private Attributes

ACE_thread_key_t key_

Detailed Description

template<>
class ACE_Threading_Helper< ACE_Thread_Mutex >

Definition at line 159 of file Service_Config.h.


Constructor & Destructor Documentation

ACE_Threading_Helper< ACE_Thread_Mutex >::ACE_Threading_Helper (  ) 

Definition at line 39 of file Service_Config.cpp.

  :  key_ (ACE_OS::NULL_key)
{
# if defined (ACE_HAS_TSS_EMULATION)
  ACE_Object_Manager::init_tss ();
# endif

  if (ACE_Thread::keycreate (&key_, 0, 0) == -1)
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("(%P|%t) Failed to create thread key: %p\n"),
                  ACE_TEXT ("")));
    }
}

ACE_Threading_Helper< ACE_Thread_Mutex >::~ACE_Threading_Helper (  ) 

Member Function Documentation

void * ACE_Threading_Helper< ACE_Thread_Mutex >::get ( void   ) 

Definition at line 64 of file Service_Config.cpp.

{
  void* temp = 0;
  if (ACE_Thread::getspecific (key_, &temp) == -1)
    ACE_ERROR_RETURN ((LM_ERROR,
                       ACE_TEXT ("(%P|%t) Service Config failed to get thread key value: %p\n"),
                       ACE_TEXT("")),
                      0);
  return temp;
}

void ACE_Threading_Helper< ACE_Thread_Mutex >::set ( void *  p  ) 

Definition at line 55 of file Service_Config.cpp.

{
  if (ACE_Thread::setspecific (key_, p) == -1)
    ACE_ERROR ((LM_ERROR,
               ACE_TEXT ("(%P|%t) Service Config failed to set thread key value: %p\n"),
               ACE_TEXT("")));
}


Member Data Documentation

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines