diff options
author | sma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2012-08-29 09:42:29 +0000 |
---|---|---|
committer | sma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2012-08-29 09:42:29 +0000 |
commit | 4b7d0c15ce5864d5a8c47e137caf0da037bbffbd (patch) | |
tree | 80c77d22622a1123234af68ac863e743d5550fda | |
parent | 4128c5efac6cfddc42256dc00db0654b82a43bfb (diff) | |
download | ATCD-4b7d0c15ce5864d5a8c47e137caf0da037bbffbd.tar.gz |
Wed Aug 29 09:41:28 UTC 2012 johnny <jwillemsen@remedy.nl>
Kokyu/Dispatch_Deferrer.h, Dispatch_Deferrer.inl, Dispatch_Deferrer.cpp: These files have been removed.
-rw-r--r-- | ACE/ChangeLog | 13 | ||||
-rw-r--r-- | ACE/Kokyu/Dispatch_Deferrer.cpp | 111 | ||||
-rw-r--r-- | ACE/Kokyu/Dispatch_Deferrer.h | 94 | ||||
-rw-r--r-- | ACE/Kokyu/Dispatch_Deferrer.inl | 29 |
4 files changed, 13 insertions, 234 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index ce2745999bb..d8233b9cc29 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,16 @@ +Wed Aug 29 09:41:28 UTC 2012 johnny <jwillemsen@remedy.nl> + + * Kokyu/Dispatch_Deferrer.h: + * Kokyu/Dispatch_Deferrer.inl: + * Kokyu/Dispatch_Deferrer.cpp: + These files have been removed. They appear to be completly unreferenced by any + other files in the whole ACE/TAO/CIAO/DAnCE distribution and are not even currently + built within the Kokyu library itself. They appear to be incomplete relics of the + original 2003 development of this library, and include references to an incomplete + class Dispatch_Deferrer_Attributes which has no declaration or definition anywhere + in the current distribution. These files would not compile even if they where listed + in the kokyu MPC file. + Wed Aug 29 07:31:28 UTC 2012 johnny <jwillemsen@remedy.nl> * ChangeLog: diff --git a/ACE/Kokyu/Dispatch_Deferrer.cpp b/ACE/Kokyu/Dispatch_Deferrer.cpp deleted file mode 100644 index 3a5c53470da..00000000000 --- a/ACE/Kokyu/Dispatch_Deferrer.cpp +++ /dev/null @@ -1,111 +0,0 @@ -// $Id$ - -#include "ace/Sched_Params.h" -#include "Dispatch_Deferrer.h" -#include "Dispatcher_Task.h" - -#if ! defined (__ACE_INLINE__) -#include "Dispatch_Deferrer.inl" -#endif /* __ACE_INLINE__ */ - -#include "kokyu_config.h" -#include "kokyu_dsui_families.h" -#include <dsui.h> - -namespace Kokyu -{ - -int -Dispatch_Deferrer::init(const Dispatch_Deferrer_Attributes& attr) -{ - //set up reactor for timeouts - this->react_.open(0); - //Don't need any handles, since we're only using it for timeouts - - this->timers_.open(); - - this->task_ = attr.task_; - - return 0; -} - -int -Dispatch_Deferrer::dispatch (Dispatch_Queue_Item *qitem) -{ - ACE_ASSERT(qitem != 0); - - //setup timout - //For now, assume period = deadline - ACE_Time_Value tv; - tv = ACE_OS::gettimeofday() + qitem->qos_info().deadline_; - long timer_id = this->react_.schedule_timer(this, - 0, //NULL arg - tv); - if (timer_id == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("EC (%P|%t) cannot schedule Release Guard timer.") - ACE_TEXT ("ACE_Reactor.schedule_timer() returned -1\n")), - -1); - } - //else valid timer_id - this->timers_.bind(qitem,timer_id); - - //@BT INSTRUMENT with event ID: EVENT_DEFERRED_ENQUEUE Measure time - //between release and enqueue into dispatch queue because of RG - DSUI_EVENT_LOG(DISP_DEFERRER_FAM, EVENT_DEFERRED_ENQUEUE, timer_id, 0, 0); - - //buffer until timer expires - return this->rgq_.enqueue_deadline(qitem,&tv); -} - - -int -Dispatch_Deferrer::handle_timeout (const ACE_Time_Value &, - const void *) -{ - //get all expired Dispatch_Queue_Items - ACE_Message_Block *begin,*end; - this->rgq_.remove_messages(begin,end, - (u_int) (ACE_Dynamic_Message_Strategy::LATE | - ACE_Dynamic_Message_Strategy::BEYOND_LATE)); - - //dispatch them back to Dispatcher_Impl - while (begin <= end) - { - Dispatch_Queue_Item *qitem = - dynamic_cast<Dispatch_Queue_Item*> (begin); - - if (qitem == 0) - { - ACE_Message_Block::release (begin); - continue; - } - - - //remove timer for each enqueued qitem from reactor - long timer_id; - if (this->timers_.find(qitem,timer_id) < 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Could not cancel Release Guard timer.") - ACE_TEXT ("Unknown timer ID\n")), - -1); - } - //else got timer_id - this->react_.cancel_timer(timer_id); - - //@BT INSTRUMENT with event ID: EVENT_DEFERRED_DEQUEUE Measure - //time between release and enqueue into dispatch queue because - //of RG - DSUI_EVENT_LOG (DISP_DEFERRER_FAM, EVENT_DEFERRED_DEQUEUE, timer_id, 0, 0); - - this->task_->enqueue(qitem); - - ++begin; - } - - return 0; -} - -} //namespace Kokyu diff --git a/ACE/Kokyu/Dispatch_Deferrer.h b/ACE/Kokyu/Dispatch_Deferrer.h deleted file mode 100644 index 16154402877..00000000000 --- a/ACE/Kokyu/Dispatch_Deferrer.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- C++ -*- */ -/** - * @file Dispatch_Deferrer.h - * - * $Id$ - * - * @author Bryan Thrall (thrall@cse.wustl.edu) - * - */ - -#ifndef DISPATCH_DEFERRER_H -#define DISPATCH_DEFERRER_H -#include /**/ "ace/pre.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "kokyu_export.h" -#include "Kokyu_defs.h" -#include "ace/Event_Handler.h" -#include "ace/Thread_Mutex.h" -#include "ace/Message_Block.h" -#include "ace/Message_Queue.h" -#include "ace/Reactor.h" -#include "ace/Map_T.h" - -namespace Kokyu -{ - -class Dispatch_Task; //forward decl -class Dispatch_Queue_Item; //forward decl - -/** - * @class Dispatch_Deferrer - * - * @brief Part of the Release Guard protocol. When a Dispatch_Command - * needs to be dispatched later rather than when dispatch_i() is - * called on the Default_Dispatcher_Impl, it is passed to this - * object. When the appropriate time to dispatch the Dispatch_Command - * comes (last release time + period), this object calls enqueue() on - * the Dispatcher_Task. - */ -class Dispatch_Deferrer : public ACE_Event_Handler -{ - public: - Dispatch_Deferrer(); - //Default constructor - - ~Dispatch_Deferrer(); - //Destructor - - int init(const Dispatch_Deferrer_Attributes& attr); - - int dispatch (Dispatch_Queue_Item *qitem); - - virtual int handle_timeout (const ACE_Time_Value ¤t_time, - const void *act = 0); - //TODO: what if need higher resolution timers? - - private: - ACE_Deadline_Message_Strategy msg_strat_; - - ///Stores the Dispatch_Commands in earliest-release-time order, - ///until they are dispatched. I decided to use an - ///ACE_Dynamic_Message_Queue because it supports deadline - ///ordering. This decision is also good because we can simply store - ///the Dispatch_Queue_Item given to us by the - ///Default_Dispatcher_Impl rather than allocate some structure to - ///hold the Dispatch_Command and QoSDescriptor. - ACE_Dynamic_Message_Queue<ACE_SYNCH> rgq_; - - //Stores timer_ids from the Reactor (longs) using the - //Dispatch_Queue_Item the timer is for as the key. Used to - //cancel timers if they expire and are enqueued before the - //callback happens. - typedef ACE_Map_Manager<Dispatch_Queue_Item*,long,ACE_Thread_Mutex> Timer_Map; - - Timer_Map timers_; - - ///Manages timers for the Dispatch_Commands - ACE_Reactor react_; - - Dispatcher_Task* task_; -}; - -} //namespace Kokyu - -#if defined (__ACE_INLINE__) -#include "Dispatch_Deferrer.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif //DISPATCH_DEFERRER_H diff --git a/ACE/Kokyu/Dispatch_Deferrer.inl b/ACE/Kokyu/Dispatch_Deferrer.inl deleted file mode 100644 index 315afce5598..00000000000 --- a/ACE/Kokyu/Dispatch_Deferrer.inl +++ /dev/null @@ -1,29 +0,0 @@ -// $Id$ - -namespace Kokyu -{ - -ACE_INLINE -Dispatch_Deferrer_Attributes::Dispatch_Deferrer_Attributes() -{ -} - -ACE_INLINE -Dispatch_Deferrer::Dispatch_Deferrer() - : msg_strat_() - , rgq_(this->msg_strat_) - , timers_() - , react_() - , task_(0) -{ -} - -ACE_INLINE -Dispatch_Deferrer::~Dispatch_Deferrer() -{ - this->react_.close(); - - this->timers_.close(); -} - -} //namespace Kokyu |