summaryrefslogtreecommitdiff
path: root/ace/OS.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-08-29 21:59:46 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-08-29 21:59:46 +0000
commit0622a0059ab6741942a71bac101b850c04bd2e9c (patch)
tree35392780df9aefd428079b00a4e2d29f9f0170e7 /ace/OS.cpp
parent2ae8a5b2453bcdfba506612c3a218ecf9b2f62df (diff)
downloadATCD-0622a0059ab6741942a71bac101b850c04bd2e9c.tar.gz
allocate/deallocate TSS for each thread, on VxWorks
Diffstat (limited to 'ace/OS.cpp')
-rw-r--r--ace/OS.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 6d9e0bc5ca5..d5bb7ed9f3c 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -1365,6 +1365,10 @@ ACE_Thread_Adapter::inherit_log_msg (void)
void *
ACE_Thread_Adapter::invoke (void)
{
+#if defined (ACE_HAS_TSS_EMULATION)
+ ACE_TSS_Emulation::tss_allocate ();
+#endif /* ACE_HAS_TSS_EMULATION */
+
// Inherit the logging features if the parent thread has an
// ACE_Log_Msg instance in thread-specific storage.
this->inherit_log_msg ();
@@ -1390,10 +1394,14 @@ ACE_Thread_Adapter::invoke (void)
// exits.
}
- // If dropped off end, call destructors for thread-specific storage
- // and exit.
+ // If dropped off end, call destructors for thread-specific storage.
+ // On ACE_WIN32, this will also exit the thread.
ACE_TSS_Cleanup::instance ()->exit (status);
- /* NOTREACHED */
+
+#if defined (ACE_HAS_TSS_EMULATION)
+ ACE_TSS_Emulation::tss_deallocate ();
+#endif /* ACE_HAS_TSS_EMULATION */
+
return status;
#else
return (void *) (*func) (arg); // Call thread entry point.