summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2002-02-02 17:40:27 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2002-02-02 17:40:27 +0000
commitdb6a41aa83d8b2e9bc668845464871cbf1c601ae (patch)
treec51ca697cec9451d5b5b49c39ac9d777515d6281
parenta00de3667bbea0fea85565b492c081e91f9988c6 (diff)
downloadATCD-db6a41aa83d8b2e9bc668845464871cbf1c601ae.tar.gz
ChangeLogTag:Sat Feb 2 07:45:51 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLogs/ChangeLog-02a7
-rw-r--r--ChangeLogs/ChangeLog-03a7
-rw-r--r--ace/Select_Reactor_T.cpp17
-rw-r--r--ace/Timer_Queue_T.cpp2
5 files changed, 32 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 212fd1fbe29..cef54a4f24f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
Sat Feb 2 07:45:51 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
+ * ace/Select_Reactor_T.cpp: Fixed work_pending() so that it takes
+ into account pending timers that need to be expired. Thanks to
+ Russ Noseworthy for reporting this.
+
+ * ace/Select_Reactor_T.cpp: Simplified the logic for calculating
+ timeouts in wait_for_multiple_events().
+
* ace/Process.{h,i,cpp}: When using ACE_Process_Options with the
inherit_environment set to off, i.e., ACE_Process_Options opts
(0), ACE_Process::spawn() was improperly setting the environment
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 212fd1fbe29..cef54a4f24f 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,5 +1,12 @@
Sat Feb 2 07:45:51 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
+ * ace/Select_Reactor_T.cpp: Fixed work_pending() so that it takes
+ into account pending timers that need to be expired. Thanks to
+ Russ Noseworthy for reporting this.
+
+ * ace/Select_Reactor_T.cpp: Simplified the logic for calculating
+ timeouts in wait_for_multiple_events().
+
* ace/Process.{h,i,cpp}: When using ACE_Process_Options with the
inherit_environment set to off, i.e., ACE_Process_Options opts
(0), ACE_Process::spawn() was improperly setting the environment
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 212fd1fbe29..cef54a4f24f 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,5 +1,12 @@
Sat Feb 2 07:45:51 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
+ * ace/Select_Reactor_T.cpp: Fixed work_pending() so that it takes
+ into account pending timers that need to be expired. Thanks to
+ Russ Noseworthy for reporting this.
+
+ * ace/Select_Reactor_T.cpp: Simplified the logic for calculating
+ timeouts in wait_for_multiple_events().
+
* ace/Process.{h,i,cpp}: When using ACE_Process_Options with the
inherit_environment set to off, i.e., ACE_Process_Options opts
(0), ACE_Process::spawn() was improperly setting the environment
diff --git a/ace/Select_Reactor_T.cpp b/ace/Select_Reactor_T.cpp
index 030397747b4..45a7dbd47d5 100644
--- a/ace/Select_Reactor_T.cpp
+++ b/ace/Select_Reactor_T.cpp
@@ -959,10 +959,14 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::remove_handler_i
}
template <class ACE_SELECT_REACTOR_TOKEN> int
-ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::work_pending (const ACE_Time_Value &timeout)
+ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::work_pending (const ACE_Time_Value &max_wait_time)
{
ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1));
+ ACE_Time_Value timer_buf (0);
+ ACE_Time_Value *this_timeout =
+ this->timer_queue_->calculate_timeout (&max_wait_time,
+ &timer_buf);
u_long width = (u_long) this->handler_rep_.max_handlep1 ();
ACE_Select_Reactor_Handle_Set fd_set;
@@ -974,7 +978,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::work_pending (const ACE_Time_Val
fd_set.rd_mask_,
fd_set.wr_mask_,
fd_set.ex_mask_,
- timeout);
+ this_timeout);
}
// Must be called with lock held.
@@ -987,7 +991,7 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::wait_for_multiple_events
ACE_TRACE ("ACE_Select_Reactor_T::wait_for_multiple_events");
u_long width = 0;
ACE_Time_Value timer_buf (0);
- ACE_Time_Value *this_timeout = &timer_buf;
+ ACE_Time_Value *this_timeout;
int number_of_active_handles = this->any_ready (dispatch_set);
@@ -998,10 +1002,9 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::wait_for_multiple_events
{
do
{
- if (this->timer_queue_->calculate_timeout (max_wait_time,
- this_timeout) == 0)
- this_timeout = 0;
-
+ this_timeout =
+ this->timer_queue_->calculate_timeout (max_wait_time,
+ &timer_buf);
width = (u_long) this->handler_rep_.max_handlep1 ();
dispatch_set.rd_mask_ = this->wait_set_.rd_mask_;
diff --git a/ace/Timer_Queue_T.cpp b/ace/Timer_Queue_T.cpp
index 166e35c60e6..fa5e7706668 100644
--- a/ace/Timer_Queue_T.cpp
+++ b/ace/Timer_Queue_T.cpp
@@ -104,7 +104,7 @@ ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::calculate_timeout (ACE_Time_Value *m
template <class TYPE, class FUNCTOR, class ACE_LOCK> ACE_Time_Value *
ACE_Timer_Queue_T<TYPE, FUNCTOR, ACE_LOCK>::calculate_timeout (ACE_Time_Value *max_wait_time,
- ACE_Time_Value *the_timeout)
+ ACE_Time_Value *the_timeout)
{
ACE_TRACE ("ACE_Timer_Queue_T::calculate_timeout");