diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-27 22:19:25 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-27 22:19:25 +0000 |
commit | b80922cf83d6cd9c9bfd28a0c5445f355a8715e8 (patch) | |
tree | a94bab335ea9d5338666c1978a0147782d0da914 /ace/Thread_Manager.i | |
parent | 3746cc5415e68598b60d5561597f306a87ea9848 (diff) | |
download | ATCD-b80922cf83d6cd9c9bfd28a0c5445f355a8715e8.tar.gz |
Apply patches for Arturo's Thread_Manager changes
Diffstat (limited to 'ace/Thread_Manager.i')
-rw-r--r-- | ace/Thread_Manager.i | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/ace/Thread_Manager.i b/ace/Thread_Manager.i index c01207cb2d2..f82ba21bb46 100644 --- a/ace/Thread_Manager.i +++ b/ace/Thread_Manager.i @@ -3,6 +3,93 @@ // Thread_Manager.i +#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT) +ACE_INLINE +ACE_At_Thread_Exit::ACE_At_Thread_Exit() + : td_(0), + was_applied_(0), + is_owner_(1) + +{ +} + +ACE_INLINE int +ACE_At_Thread_Exit::was_applied() const + +{ + return was_applied_; +} + +ACE_INLINE int +ACE_At_Thread_Exit::was_applied(int applied) + +{ + was_applied_ = applied; + if (was_applied_) + td_ = 0; + return was_applied_; +} + +ACE_INLINE int +ACE_At_Thread_Exit::is_owner() const + +{ + return is_owner_; +} + +ACE_INLINE int +ACE_At_Thread_Exit::is_owner(int owner) + +{ + is_owner_ = owner; + return is_owner_; +} + +ACE_INLINE void +ACE_At_Thread_Exit::do_apply() + +{ + if (!this->was_applied_ && this->is_owner_) + { + td_->at_pop(); + } +} + +ACE_INLINE +ACE_At_Thread_Exit::~ACE_At_Thread_Exit() + +{ + this->do_apply(); +} + +ACE_INLINE +ACE_At_Thread_Exit_Func::ACE_At_Thread_Exit_Func ( + void* object, + ACE_CLEANUP_FUNC func, + void* param +) + : object_(object), + func_(func), + param_(param) + +{ +} + +ACE_INLINE +ACE_At_Thread_Exit_Func::~ACE_At_Thread_Exit_Func() + +{ + this->do_apply(); +} + +ACE_INLINE void +ACE_At_Thread_Exit_Func::apply() + +{ + func_(object_, param_); +} +#endif /* ! ACE_USE_ONE_SHOT_AT_THREAD_EXIT */ + ACE_INLINE ACE_Thread_Descriptor_Base::ACE_Thread_Descriptor_Base (void) : thr_id_ (ACE_OS::NULL_thread), @@ -77,6 +164,15 @@ ACE_Thread_Descriptor::flags (void) const return flags_; } +#if !defined(ACE_USE_ONE_SHOT_AT_THREAD_EXIT) +ACE_INLINE void +ACE_Thread_Descriptor::log_msg_cleanup(ACE_Log_Msg* log_msg) + +{ + log_msg_ = log_msg; +} +#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */ + // Set the <next_> pointer ACE_INLINE void ACE_Thread_Descriptor::set_next (ACE_Thread_Descriptor *td) |