summaryrefslogtreecommitdiff
path: root/ACE/ace/Thread_Manager.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-12-03 07:57:38 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-12-03 07:57:38 +0000
commite1eb83702cfe1ebc7f7a5474449b336bc897907f (patch)
tree57616aae5ae0379bae7d22cc360fcbde9da4972b /ACE/ace/Thread_Manager.cpp
parent2930d7f4c50193600731490afcbb004465c26640 (diff)
downloadATCD-e1eb83702cfe1ebc7f7a5474449b336bc897907f.tar.gz
Wed Dec 3 07:55:00 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace/Thread_Manager.cpp')
-rw-r--r--ACE/ace/Thread_Manager.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/ACE/ace/Thread_Manager.cpp b/ACE/ace/Thread_Manager.cpp
index 9d895310618..bf6e309f33f 100644
--- a/ACE/ace/Thread_Manager.cpp
+++ b/ACE/ace/Thread_Manager.cpp
@@ -252,7 +252,6 @@ ACE_Thread_Descriptor::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_handle_ = %d"), this->thr_handle_));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_state_ = %d"), this->thr_state_));
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncleanup_info_.cleanup_hook_ = %x"), this->cleanup_info_.cleanup_hook_));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags_ = %x\n"), this->flags_));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
@@ -898,14 +897,17 @@ ACE_Thread_Manager::run_thread_exit_hooks (int i)
// generalized to support an arbitrary number of hooks.
ACE_Thread_Descriptor *td = this->thread_desc_self ();
- if (td != 0 && td->cleanup_info.cleanup_hook_ != 0)
+ for (ACE_Cleanup_Info_Node *iter = td->cleanup_info_->pop_front ();
+ iter != 0;
+ iter = cleanup_info_->pop_front ())
{
- (*td->cleanup_info_.cleanup_hook_)
- (td->cleanup_info_.object_,
- td->cleanup_info_.param_);
-
- td->cleanup_info_.cleanup_hook_ = 0;
+ if (iter->cleanup_hook () != 0)
+ {
+ (*iter->cleanup_hook ()) (iter->object (), iter->param ());
+ }
+ delete iter;
}
+
ACE_UNUSED_ARG (i);
#else
ACE_UNUSED_ARG (i);