Functions

Base_Thread_Adapter.cpp File Reference

#include "ace/Base_Thread_Adapter.h"
#include "ace/Base_Thread_Adapter.inl"
#include "ace/Service_Config.h"
Include dependency graph for Base_Thread_Adapter.cpp:

Go to the source code of this file.

Functions

ACE_THR_FUNC_RETURN ACE_THREAD_ADAPTER_NAME (void *args)

Function Documentation

ACE_THR_FUNC_RETURN ACE_THREAD_ADAPTER_NAME ( void *  args  ) 

Definition at line 104 of file Base_Thread_Adapter.cpp.

{
  ACE_OS_TRACE ("ACE_THREAD_ADAPTER_NAME");

#if defined (ACE_HAS_TSS_EMULATION)
  // As early as we can in the execution of the new thread, allocate
  // its local TS storage.  Allocate it on the stack, to save dynamic
  // allocation/dealloction.
  void *ts_storage[ACE_TSS_Emulation::ACE_TSS_THREAD_KEYS_MAX];
  ACE_TSS_Emulation::tss_open (ts_storage);
#endif /* ACE_HAS_TSS_EMULATION */

  ACE_Base_Thread_Adapter * const thread_args =
    static_cast<ACE_Base_Thread_Adapter *> (args);

#ifdef ACE_USES_GPROF
  setitimer (ITIMER_PROF, thread_args->timerval (), 0);
#endif // ACE_USES_GPROF

  // Invoke the user-supplied function with the args.
  ACE_THR_FUNC_RETURN status = thread_args->invoke ();

  return status;
}

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines