summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-11-04 04:18:03 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-11-04 04:18:03 +0000
commit14add320edcb5a928b985403a50b7221ffc20cf7 (patch)
treef704208efcea8e349c656781c7b27a299b23e294
parent7e4922fbd210fa01d5407052cfc9c67f6ff64f58 (diff)
downloadATCD-14add320edcb5a928b985403a50b7221ffc20cf7.tar.gz
All NT threads need to cleanup TSS.
-rw-r--r--ace/OS.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 96b2c821263..37cab7635e2 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -1447,23 +1447,27 @@ ACE_OS::cleanup_tss (const u_int main_thread)
ACE_TSS_Cleanup::instance ()->exit (0);
#endif /* ACE_HAS_TSS_EMULATION */
-if (main_thread)
- {
+ if (main_thread)
+ {
#if !defined (ACE_HAS_TSS_EMULATION)
// Just close the ACE_Log_Msg for the current (which should be main) thread.
// We don't have TSS emulation; if there's native TSS, it should call its
// destructors when the main thread exits.
- ACE_Log_Msg::close ();
+ ACE_Log_Msg::close ();
#endif /* ! ACE_HAS_TSS_EMULATION */
#if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION)
- // Remove all TSS_Info table entries.
- ACE_TSS_Cleanup::instance ()->free_all_key_left ();
- // Finally, free up the ACE_TSS_Cleanup instance. This method gets
- // called by the ACE_Object_Manager.
- delete ACE_TSS_Cleanup::instance ();
+ // Remove all TSS_Info table entries.
+ ACE_TSS_Cleanup::instance ()->free_all_key_left ();
+ // Finally, free up the ACE_TSS_Cleanup instance. This method gets
+ // called by the ACE_Object_Manager.
+ delete ACE_TSS_Cleanup::instance ();
#endif /* WIN32 || ACE_HAS_TSS_EMULATION */
- }
+ }
+#if defined (ACE_WIN32)
+ else
+ ACE_TSS_Cleanup::instance ()->exit (0);
+#endif /* ACE_WIN32 */
}
void