diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-09 23:40:21 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-09 23:40:21 +0000 |
commit | 93883ccb4a6665ac384e4c5aba78d000046c8184 (patch) | |
tree | b17312566057c983f8844d59303d34385ce69017 /ace/OS.cpp | |
parent | 38d72a14b62700325cc00994c731fbc12dd27bf0 (diff) | |
download | ATCD-93883ccb4a6665ac384e4c5aba78d000046c8184.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/OS.cpp')
-rw-r--r-- | ace/OS.cpp | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/ace/OS.cpp b/ace/OS.cpp index 6202166aac6..12cdab11170 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -1396,20 +1396,6 @@ ACE_Thread_Adapter::invoke (void) // Delete ourselves since we don't need <this> anymore. delete (void *) this; -#if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) - void *status = 0; - - ACE_SEH_TRY { - status = (void*) (*func) (arg); // Call thread entry point. - } - ACE_SEH_EXCEPT (EXCEPTION_EXECUTE_HANDLER) { - ACE_DEBUG ((LM_DEBUG, "(%t) Win32 structured exception exiting thread\n")); - // Here's where we might want to provide a hook to report this... - // As it stands now, we just catch all Win32 structured exceptions - // so that we can make sure to clean up correctly when the thread - // exits. - } - #if 0 if (func == ACE_Task_Base::svc_run) { @@ -1426,6 +1412,20 @@ ACE_Thread_Adapter::invoke (void) } #endif /* 0 */ +#if defined (ACE_WIN32) || defined (ACE_HAS_TSS_EMULATION) + void *status = 0; + + ACE_SEH_TRY { + status = (void*) (*func) (arg); // Call thread entry point. + } + ACE_SEH_EXCEPT (EXCEPTION_EXECUTE_HANDLER) { + ACE_DEBUG ((LM_DEBUG, "(%t) Win32 structured exception exiting thread\n")); + // Here's where we might want to provide a hook to report this... + // As it stands now, we just catch all Win32 structured exceptions + // so that we can make sure to clean up correctly when the thread + // exits. + } + // If dropped off end, call destructors for thread-specific storage. ACE_TSS_Cleanup::instance ()->exit (status); @@ -1441,25 +1441,8 @@ ACE_Thread_Adapter::invoke (void) } # endif /* ACE_WIN32 && ACE_HAS_MFC && ACE_HAS_MFS != 0*/ - void *result = (void *) (*func) (arg); // Call thread entry point. - -#if 0 - if (func == ACE_Task_Base::svc_run) - { - ACE_Task_Base *task_ptr = (ACE_Task_Base *) arg; - ACE_Thread_Manager *thr_mgr_ptr = task_ptr->thr_mgr (); - - // This calls the Task->close() hook. - task_ptr->cleanup (task_ptr, 0); - - // This prevents a second invocation of the cleanup code (called - // later by ACE_Thread_Manager::exit()). - - thr_mgr_ptr->at_exit (task_ptr, NULL, 0); - } -#endif /* 0 */ + return status; - return result; #else return (void *) (*func) (arg); // Call thread entry point. #endif /* ACE_WIN32 || ACE_HAS_TSS_EMULATION */ |