diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-11-01 08:40:32 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-11-01 08:40:32 +0000 |
commit | 76171efcb983b4f2ff55a4013fed794f7a9bb471 (patch) | |
tree | a817b83efdc199c8f292b9a5bfd4047ef900f6b0 /ace/Task.cpp | |
parent | bad6c3a7b49b64377c60931084a6ef68ae64877b (diff) | |
download | ATCD-76171efcb983b4f2ff55a4013fed794f7a9bb471.tar.gz |
foo
Diffstat (limited to 'ace/Task.cpp')
-rw-r--r-- | ace/Task.cpp | 90 |
1 files changed, 4 insertions, 86 deletions
diff --git a/ace/Task.cpp b/ace/Task.cpp index 52fea1db94e..55be9be4754 100644 --- a/ace/Task.cpp +++ b/ace/Task.cpp @@ -1,9 +1,6 @@ // Task.cpp // $Id$ -#if !defined (ACE_TASK_C) -#define ACE_TASK_C - #define ACE_BUILD_DLL #include "ace/Task.h" #include "ace/Module.h" @@ -61,7 +58,7 @@ ACE_Task_Exit::ACE_Task_Exit (void) ACE_Task_Base * ACE_Task_Exit::get_task (void) { - ACE_TRACE ("ACE_Task_Exit<ACE_SYNCH_2>::get_task"); + ACE_TRACE ("ACE_Task_Exit::get_task"); return this->t_; } @@ -202,6 +199,9 @@ ACE_Task_Base::activate (long flags, // Keep the compiler from complaining. n_threads = n_threads; force_active = force_active; + priority = priority; + grp_id = grp_id; + task = task; flags = flags; errno = EINVAL; return -1; @@ -209,61 +209,6 @@ ACE_Task_Base::activate (long flags, #endif /* ACE_MT_SAFE */ } -template <ACE_SYNCH_1> ACE_INLINE void -ACE_Task<ACE_SYNCH_2>::dump (void) const -{ - ACE_TRACE ("ACE_Task<ACE_SYNCH_2>::dump"); - ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACE_DEBUG ((LM_DEBUG, "\nthr_mgr_ = %x", this->thr_mgr_)); - this->msg_queue_->dump (); - ACE_DEBUG ((LM_DEBUG, "delete_msg_queue_ = %d\n", this->delete_msg_queue_)); - ACE_DEBUG ((LM_DEBUG, "\nflags = %x", this->flags_)); - ACE_DEBUG ((LM_DEBUG, "\nmod_ = %x", this->mod_)); - ACE_DEBUG ((LM_DEBUG, "\nnext_ = %x", this->next_)); - ACE_DEBUG ((LM_DEBUG, "\ngrp_id_ = %d", this->grp_id_)); - ACE_DEBUG ((LM_DEBUG, "\nthr_count_ = %d", this->thr_count_)); -#if defined (ACE_MT_SAFE) - this->lock_.dump (); -#endif /* ACE_MT_SAFE */ - - ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -} - -// If the user doesn't supply a ACE_Message_Queue pointer then we'll -// allocate one dynamically. Otherwise, we'll use the one they give. - -template<ACE_SYNCH_1> -ACE_Task<ACE_SYNCH_2>::ACE_Task (ACE_Thread_Manager *thr_man, - ACE_Message_Queue<ACE_SYNCH_2> *mq) - : ACE_Task_Base (thr_man), - msg_queue_ (0), - delete_msg_queue_ (0), - mod_ (0), - next_ (0) -{ - ACE_TRACE ("ACE_Task<ACE_SYNCH_2>::ACE_Task"); - - if (mq == 0) - { - ACE_NEW (mq, ACE_Message_Queue<ACE_SYNCH_2>); - this->delete_msg_queue_ = 1; - } - - this->msg_queue_ = mq; -} - -template<ACE_SYNCH_1> -ACE_Task<ACE_SYNCH_2>::~ACE_Task (void) -{ - ACE_TRACE ("ACE_Task<ACE_SYNCH_2>::~ACE_Task"); - if (this->delete_msg_queue_) - delete this->msg_queue_; - - // These assignments aren't strickly necessary but they help guard - // against odd race conditions... - this->delete_msg_queue_ = 0; -} - // Note that this routine often does not return since the thread that // is executing it will do an ACE_Thread::exit() first! @@ -285,31 +230,4 @@ ACE_Task_Base::svc_run (ACE_Task_Base *t) /* NOTREACHED */ } -template<ACE_SYNCH_1> ACE_Task<ACE_SYNCH_2> * -ACE_Task<ACE_SYNCH_2>::sibling (void) -{ - ACE_TRACE ("ACE_Task<ACE_SYNCH_2>::sibling"); - if (this->mod_ == 0) - return 0; - else - return this->mod_->sibling (this); -} - -template<ACE_SYNCH_1> const char * -ACE_Task<ACE_SYNCH_2>::name (void) const -{ - ACE_TRACE ("ACE_Task<ACE_SYNCH_2>::name"); - if (this->mod_ == 0) - return 0; - else - return this->mod_->name (); -} - -template<ACE_SYNCH_1> ACE_Module<ACE_SYNCH_2> * -ACE_Task<ACE_SYNCH_2>::module (void) const -{ - ACE_TRACE ("ACE_Task<ACE_SYNCH_2>::module"); - return this->mod_; -} -#endif /* ACE_TASK_C */ |