diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-06-26 15:21:13 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-06-26 15:21:13 +0000 |
commit | 97243b8a949f035620f3d5ac2d7a738e99ae8f11 (patch) | |
tree | 6704ac232123fdea228769521a1e65d052f3d87d /ace | |
parent | 4cbad89a1a918b2762cebcedeff500367e8dcc76 (diff) | |
download | ATCD-97243b8a949f035620f3d5ac2d7a738e99ae8f11.tar.gz |
Added expire() to get rid of Sun CC 4.2 warnings.
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Timer_Hash_T.cpp | 12 | ||||
-rw-r--r-- | ace/Timer_Hash_T.h | 5 | ||||
-rw-r--r-- | ace/Timer_Wheel_T.cpp | 8 | ||||
-rw-r--r-- | ace/Timer_Wheel_T.h | 7 |
4 files changed, 31 insertions, 1 deletions
diff --git a/ace/Timer_Hash_T.cpp b/ace/Timer_Hash_T.cpp index 6ac34a4c45d..4c4953298c8 100644 --- a/ace/Timer_Hash_T.cpp +++ b/ace/Timer_Hash_T.cpp @@ -426,6 +426,18 @@ ACE_Timer_Hash_T<TYPE, FUNCTOR, LOCK, BUCKET>::remove_first (void) return temp; } + +// Dummy version of expire to get rid of warnings in Sun CC 4.2 + +template <class TYPE, class FUNCTOR, class LOCK, class BUCKET> int +ACE_Timer_Hash_T<TYPE, FUNCTOR, LOCK, BUCKET>::expire () +{ + return INHERITED::expire(); +} + + +// Specialized expire for Timer Hash + template <class TYPE, class FUNCTOR, class LOCK, class BUCKET> int ACE_Timer_Hash_T<TYPE, FUNCTOR, LOCK, BUCKET>::expire (const ACE_Time_Value &cur_time) { diff --git a/ace/Timer_Hash_T.h b/ace/Timer_Hash_T.h index 1ff2cb28f9b..eb2ff8496d0 100644 --- a/ace/Timer_Hash_T.h +++ b/ace/Timer_Hash_T.h @@ -182,6 +182,11 @@ public: // 0 then the <functor> will be invoked. Returns 1 if cancellation // succeeded and 0 if the <timer_id> wasn't found. + virtual int expire (void); + // Run the <functor> for all timers whose values are <= + // <ACE_OS::gettimeofday>. Also accounts for <timer_skew>. Returns + // the number of timers canceled. + virtual int expire (const ACE_Time_Value ¤t_time); // Run the <functor> for all timers whose values are <= <cur_time>. // This does not account for <timer_skew>. Returns the number of diff --git a/ace/Timer_Wheel_T.cpp b/ace/Timer_Wheel_T.cpp index 45a6c7375b6..b63fc67cc52 100644 --- a/ace/Timer_Wheel_T.cpp +++ b/ace/Timer_Wheel_T.cpp @@ -482,6 +482,14 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, LOCK>::iter (void) return this->iterator_; } +// Dummy version of expire to get rid of warnings in Sun CC 4.2 + +template <class TYPE, class FUNCTOR, class LOCK> int +ACE_Timer_Wheel_T<TYPE, FUNCTOR, LOCK>::expire () +{ + return INHERITED::expire (); +} + // Specialized expire which expires in total order. It is optimized by keeping // track of the list with the earliest element and the next earliest list. It diff --git a/ace/Timer_Wheel_T.h b/ace/Timer_Wheel_T.h index 0abf247fd57..22b23a74c49 100644 --- a/ace/Timer_Wheel_T.h +++ b/ace/Timer_Wheel_T.h @@ -148,7 +148,12 @@ public: // 0 then the <functor> will be invoked. Returns 1 if cancellation // succeeded and 0 if the <timer_id> wasn't found. - virtual int expire (const ACE_Time_Value ¤t_time); + virtual int expire (void); + // Run the <functor> for all timers whose values are <= + // <ACE_OS::gettimeofday>. Also accounts for <timer_skew>. Returns + // the number of timers canceled. + + int expire (const ACE_Time_Value &); // Run the <functor> for all timers whose values are <= <cur_time>. // This does not account for <timer_skew>. Returns the number of // timers canceled. |