From b06fad66bf0a3aa0ec704dc80f5e02398260bcc1 Mon Sep 17 00:00:00 2001 From: irfan Date: Tue, 6 May 1997 01:14:18 +0000 Subject: *** empty log message *** --- ace/Timer_Queue_T.h | 69 +++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 37 deletions(-) (limited to 'ace/Timer_Queue_T.h') diff --git a/ace/Timer_Queue_T.h b/ace/Timer_Queue_T.h index f79868e194c..7c396a624fc 100644 --- a/ace/Timer_Queue_T.h +++ b/ace/Timer_Queue_T.h @@ -18,53 +18,52 @@ #define ACE_TIMER_QUEUE_T_H #include "ace/Time_Value.h" -#include "ace/Synch.h" // Forward declarations. -template +template class ACE_Timer_Queue_T; -template +template class ACE_Timer_List_T; -template +template class ACE_Timer_List_Iterator_T; -template +template class ACE_Timer_Heap_T; -template +template class ACE_Timer_Heap_Iterator_T; -template +template class ACE_Timer_Wheel_T; -template +template class ACE_Timer_Wheel_Iterator_T; // This should be nested within the ACE_Timer_Queue class but some C++ // compilers still don't like this... -template +template class ACE_Timer_Node_T // = TITLE // Maintains the state associated with a Timer entry. { // = The use of friends should be replaced with accessors... - friend class ACE_Timer_Queue_T; - friend class ACE_Timer_List_T; - friend class ACE_Timer_List_Iterator_T; - friend class ACE_Timer_Heap_T; - friend class ACE_Timer_Heap_Iterator_T; - friend class ACE_Timer_Wheel_T; - friend class ACE_Timer_Wheel_Iterator_T; + friend class ACE_Timer_Queue_T; + friend class ACE_Timer_List_T; + friend class ACE_Timer_List_Iterator_T; + friend class ACE_Timer_Heap_T; + friend class ACE_Timer_Heap_Iterator_T; + friend class ACE_Timer_Wheel_T; + friend class ACE_Timer_Wheel_Iterator_T; // = Initialization methods. ACE_Timer_Node_T (const TYPE &type, const void *a, const ACE_Time_Value &t, const ACE_Time_Value &i, - ACE_Timer_Node_T *n, + ACE_Timer_Node_T *n, long timer_id); // Constructor. @@ -72,8 +71,8 @@ class ACE_Timer_Node_T const void *a, const ACE_Time_Value &t, const ACE_Time_Value &i, - ACE_Timer_Node_T *p, - ACE_Timer_Node_T *n, + ACE_Timer_Node_T *p, + ACE_Timer_Node_T *n, long timer_id); // Constructor for the doubly linked list version. @@ -94,10 +93,10 @@ class ACE_Timer_Node_T // If this is a periodic timer this holds the time until the next // timeout. - ACE_Timer_Node_T *prev_; + ACE_Timer_Node_T *prev_; // Pointer to previous timer. - ACE_Timer_Node_T *next_; + ACE_Timer_Node_T *next_; // Pointer to next timer. long timer_id_; @@ -110,7 +109,7 @@ class ACE_Timer_Node_T // Dump the state of an TYPE. }; -template +template class ACE_Timer_Queue_Iterator_T // = TITLE // Generic interfae for iterating over a subclass of @@ -128,7 +127,7 @@ public: virtual ~ACE_Timer_Queue_Iterator_T (void); // Destructor. - virtual int next (ACE_Timer_Node_T *&timer_node, + virtual int next (ACE_Timer_Node_T *&timer_node, const ACE_Time_Value &cur_time) = 0; // Pass back the next that hasn't been seen yet, if its // <= . In addition, moves the timer queue @@ -136,7 +135,7 @@ public: // seen, else 1. }; -template +template class ACE_Timer_Queue_T // = TITLE // Provides an interface to timers. @@ -147,7 +146,7 @@ class ACE_Timer_Queue_T // and . { public: - typedef ACE_Timer_Queue_Iterator_T ITERATOR; + typedef ACE_Timer_Queue_Iterator_T ITERATOR; // Type of Iterator // = Initialization and termination methods. @@ -227,10 +226,8 @@ public: void timer_skew (const ACE_Time_Value &skew); const ACE_Time_Value &timer_skew (void) const; -#if defined (ACE_MT_SAFE) - ACE_Recursive_Thread_Mutex &lock (void); + LOCK &lock (void); // Synchronization variable used by the queue -#endif /* ACE_MT_SAFE */ FUNCTOR &upcall_functor (void); // Accessor to the upcall functor @@ -249,22 +246,20 @@ protected: // This method will call the with the , and //