diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-01 06:02:00 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-01 06:02:00 +0000 |
commit | fa06b9f3fc514e21a1f2c2a14a38f795735cd122 (patch) | |
tree | ef849b13d46b8e25e5498319441bfb6f27d46fc1 /ace/Thread_Manager.i | |
parent | 3730e67ebb4e679535b7403b73b8eea723f35ec0 (diff) | |
download | ATCD-fa06b9f3fc514e21a1f2c2a14a38f795735cd122.tar.gz |
ChangeLogTag:Tue Feb 29 23:36:29 2000 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'ace/Thread_Manager.i')
-rw-r--r-- | ace/Thread_Manager.i | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ace/Thread_Manager.i b/ace/Thread_Manager.i index 54ceac2638e..b6a29735c34 100644 --- a/ace/Thread_Manager.i +++ b/ace/Thread_Manager.i @@ -143,6 +143,19 @@ ACE_Thread_Descriptor_Base::state (void) return thr_state_; } +// Reset this base descriptor. +ACE_INLINE void +ACE_Thread_Descriptor_Base::reset (void) +{ + ACE_TRACE ("ACE_Thread_Descriptor_Base::reset"); + this->thr_id_ = ACE_OS::NULL_thread; + this->thr_handle_ = ACE_OS::NULL_hthread; + this->grp_id_ = 0; + this->thr_state_ = ACE_Thread_Manager::ACE_THR_IDLE; + this->task_ = 0; + this->flags_ = 0; +} + // Unique thread id. ACE_INLINE ACE_thread_t ACE_Thread_Descriptor::self (void) @@ -185,6 +198,26 @@ ACE_Thread_Descriptor::get_next (void) return ACE_static_cast (ACE_Thread_Descriptor *, this->next_); } +// Reset this thread descriptor +ACE_INLINE void +ACE_Thread_Descriptor::reset (ACE_Thread_Manager *tm) +{ + ACE_TRACE ("ACE_Thread_Descriptor::reset"); + this->ACE_Thread_Descriptor_Base::reset (); +#if defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT) + this->cleanup_info_.cleanup_hook_ = 0; + this->cleanup_info_.object_ = 0; + this->cleanup_info_.param_ = 0; +#else /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */ + this->at_exit_list_ = 0; + // Start the at_exit hook list. + this->tm_ = tm; + // Setup the Thread_Manager. + this->log_msg_ = 0; + this->terminated_ = 0; +#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */ +} + // Set the exit status. ACE_INLINE void * |