Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / TSS_Adapter.cpp
blob938ca6bb8220f97f5b3b9ee98eef7817ffaae175
1 /**
2 * @file TSS_Adapter.cpp
4 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
5 */
7 #include "ace/TSS_Adapter.h"
9 #if defined (ACE_HAS_ALLOC_HOOKS)
10 # include "ace/Malloc_Base.h"
11 #endif /* ACE_HAS_ALLOC_HOOKS */
13 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
15 ACE_TSS_Adapter::ACE_TSS_Adapter (void *object, ACE_THR_DEST f)
16 : ts_obj_ (object),
17 func_ (f)
21 ACE_ALLOC_HOOK_DEFINE(ACE_TSS_Adapter);
23 void
24 ACE_TSS_Adapter::cleanup ()
26 (*this->func_)(this->ts_obj_); // call cleanup routine for ts_obj_
29 ACE_END_VERSIONED_NAMESPACE_DECL
31 extern "C" ACE_Export void
32 ACE_TSS_C_cleanup (void *object)
34 if (object != 0)
36 ACE_TSS_Adapter * const tss_adapter = (ACE_TSS_Adapter *) object;
37 // Perform cleanup on the real TS object.
38 tss_adapter->cleanup ();
39 // Delete the adapter object.
40 delete tss_adapter;