From f4ae2613c87ce239858f59a186003a1af9a51b71 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 15 Mar 2010 07:58:50 +0000 Subject: Mon Mar 15 07:58:54 UTC 2010 Johnny Willemsen * ace/High_Res_Timer.cpp * ace/High_Res_Timer.h * ace/High_Res_Timer.inl Use 64bit calculations to increase our precision. If you want to have the 32bit calculations, add ACE_USE_WINDOWS_32BIT_HIGH_RES_TIMER_CALCULATIONS as define. If the scoreboard doesn't show any platforms requiring 32bit, we will remove that code before the next micro release goes out Thanks to Alon Diamant for supplying the patches. This fixes bugzilla 3703. * ace/Timer_Queue_Adapters.cpp * ace/Timer_Queue_Adapters.h * ace/Timer_Queue_Adapters.inl Make it possible to use a customer event handler in ACE_Thread_Timer_Queue_Adapter. Thanks to Alon Diamant for supplying the patches. This fixes bugzilla 3614 * tests/tests.mpc: * tests/Thread_Timer_Queue_Adapter_Test.cpp: New test for testing custom event handlers in ACE_Thread_Timer_Queue_Adapter. Thanks to Alon Diamant for creating this new test --- ACE/ace/Timer_Queue_Adapters.cpp | 76 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'ACE/ace/Timer_Queue_Adapters.cpp') diff --git a/ACE/ace/Timer_Queue_Adapters.cpp b/ACE/ace/Timer_Queue_Adapters.cpp index 0c4fc51b573..1c04fd6eed2 100644 --- a/ACE/ace/Timer_Queue_Adapters.cpp +++ b/ACE/ace/Timer_Queue_Adapters.cpp @@ -23,14 +23,14 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -template TQ & -ACE_Async_Timer_Queue_Adapter::timer_queue (void) +template TQ & +ACE_Async_Timer_Queue_Adapter::timer_queue (void) { return this->timer_queue_; } -template int -ACE_Async_Timer_Queue_Adapter::cancel (long timer_id, +template int +ACE_Async_Timer_Queue_Adapter::cancel (long timer_id, const void **act) { // Block designated signals. @@ -40,8 +40,8 @@ ACE_Async_Timer_Queue_Adapter::cancel (long timer_id, return this->timer_queue_.cancel (timer_id, act); } -template int -ACE_Async_Timer_Queue_Adapter::expire (void) +template int +ACE_Async_Timer_Queue_Adapter::expire (void) { // Block designated signals. ACE_Sig_Guard sg (&this->mask_); @@ -50,8 +50,8 @@ ACE_Async_Timer_Queue_Adapter::expire (void) return this->timer_queue_.expire (); } -template int -ACE_Async_Timer_Queue_Adapter::schedule_ualarm (void) +template int +ACE_Async_Timer_Queue_Adapter::schedule_ualarm (void) { ACE_Time_Value tv = this->timer_queue_.earliest_time () - this->timer_queue_.gettimeofday (); @@ -68,8 +68,8 @@ ACE_Async_Timer_Queue_Adapter::schedule_ualarm (void) return 0; } -template long -ACE_Async_Timer_Queue_Adapter::schedule (ACE_Event_Handler *eh, +template long +ACE_Async_Timer_Queue_Adapter::schedule (TYPE eh, const void *act, const ACE_Time_Value &future_time, const ACE_Time_Value &interval) @@ -96,8 +96,8 @@ ACE_Async_Timer_Queue_Adapter::schedule (ACE_Event_Handler *eh, return tid; } -template -ACE_Async_Timer_Queue_Adapter::ACE_Async_Timer_Queue_Adapter (ACE_Sig_Set *mask) +template +ACE_Async_Timer_Queue_Adapter::ACE_Async_Timer_Queue_Adapter (ACE_Sig_Set *mask) // If == 0, block *all* signals when the SIGARLM handler is // running, else just block those in the mask. : mask_ (mask) @@ -120,8 +120,8 @@ ACE_Async_Timer_Queue_Adapter::ACE_Async_Timer_Queue_Adapter (ACE_Sig_Set *m // list. It gets invoked asynchronously when the SIGALRM signal // occurs. -template int -ACE_Async_Timer_Queue_Adapter::handle_signal (int signum, +template int +ACE_Async_Timer_Queue_Adapter::handle_signal (int signum, siginfo_t *, ucontext_t *) { @@ -154,8 +154,8 @@ ACE_Async_Timer_Queue_Adapter::handle_signal (int signum, } } -template -ACE_Thread_Timer_Queue_Adapter::ACE_Thread_Timer_Queue_Adapter (ACE_Thread_Manager *tm, +template +ACE_Thread_Timer_Queue_Adapter::ACE_Thread_Timer_Queue_Adapter (ACE_Thread_Manager *tm, TQ* timer_queue) : ACE_Task_Base (tm), timer_queue_(timer_queue), @@ -172,8 +172,8 @@ ACE_Thread_Timer_Queue_Adapter::ACE_Thread_Timer_Queue_Adapter (ACE_Thread_M } } -template -ACE_Thread_Timer_Queue_Adapter::~ACE_Thread_Timer_Queue_Adapter (void) +template +ACE_Thread_Timer_Queue_Adapter::~ACE_Thread_Timer_Queue_Adapter (void) { if (this->delete_timer_queue_) { @@ -183,39 +183,39 @@ ACE_Thread_Timer_Queue_Adapter::~ACE_Thread_Timer_Queue_Adapter (void) } } -template ACE_SYNCH_RECURSIVE_MUTEX & -ACE_Thread_Timer_Queue_Adapter::mutex (void) +template ACE_SYNCH_RECURSIVE_MUTEX & +ACE_Thread_Timer_Queue_Adapter::mutex (void) { return this->mutex_; } -template long -ACE_Thread_Timer_Queue_Adapter::schedule - (ACE_Event_Handler* handler, +template long +ACE_Thread_Timer_Queue_Adapter::schedule + (TYPE handler, const void *act, const ACE_Time_Value &future_time, const ACE_Time_Value &interval) { ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard, this->mutex_, -1); - long const result = this->timer_queue_->schedule (handler, act, future_time, interval); + long result = this->timer_queue_->schedule (handler, act, future_time, interval); this->condition_.signal (); return result; } -template int -ACE_Thread_Timer_Queue_Adapter::cancel (long timer_id, +template int +ACE_Thread_Timer_Queue_Adapter::cancel (long timer_id, const void **act) { ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard, this->mutex_, -1); - int const result = this->timer_queue_->cancel (timer_id, act); + int result = this->timer_queue_->cancel (timer_id, act); condition_.signal (); return result; } -template void -ACE_Thread_Timer_Queue_Adapter::deactivate (void) +template void +ACE_Thread_Timer_Queue_Adapter::deactivate (void) { ACE_GUARD (ACE_SYNCH_RECURSIVE_MUTEX, guard, this->mutex_); @@ -223,8 +223,8 @@ ACE_Thread_Timer_Queue_Adapter::deactivate (void) this->condition_.signal (); } -template int -ACE_Thread_Timer_Queue_Adapter::svc (void) +template int +ACE_Thread_Timer_Queue_Adapter::svc (void) { ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard, this->mutex_, -1); @@ -290,8 +290,8 @@ ACE_Thread_Timer_Queue_Adapter::svc (void) return 0; } -template int -ACE_Thread_Timer_Queue_Adapter::activate (long flags, +template int +ACE_Thread_Timer_Queue_Adapter::activate (long flags, int , int , long priority, @@ -320,14 +320,14 @@ ACE_Thread_Timer_Queue_Adapter::activate (long flags, // or cancelling timers on platforms where the timer queue mutex is not // recursive. -template int -ACE_Thread_Timer_Queue_Adapter::enqueue_command (ACE_Command_Base *cmd, +template int +ACE_Thread_Timer_Queue_Adapter::enqueue_command (ACE_Command_Base *cmd, COMMAND_ENQUEUE_POSITION pos) { // Serialize access to the command queue. ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->command_mutex_, -1); - if (pos == ACE_Thread_Timer_Queue_Adapter::TAIL) + if (pos == ACE_Thread_Timer_Queue_Adapter::TAIL) return command_queue_.enqueue_tail (cmd); else return command_queue_.enqueue_head (cmd); @@ -336,8 +336,8 @@ ACE_Thread_Timer_Queue_Adapter::enqueue_command (ACE_Command_Base *cmd, // Dispatches all command objects enqueued in the most recent event // handler context. -template int -ACE_Thread_Timer_Queue_Adapter::dispatch_commands (void) +template int +ACE_Thread_Timer_Queue_Adapter::dispatch_commands (void) { // Serialize access to the command queue. ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->command_mutex_, -1); -- cgit v1.2.1