summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-05-02 22:23:03 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-05-02 22:23:03 +0000
commit468f0a48ee53a687301e6f6c525252caa7feb256 (patch)
tree117c69c7ead21671e4f21f277e2b5e02776d411e
parent7460ff63b6ca645c3c455e2ccab7e6e28b6064d0 (diff)
downloadATCD-468f0a48ee53a687301e6f6c525252caa7feb256.tar.gz
ChangeLogTag:Thu May 2 15:22:36 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLogs/ChangeLog-02a9
-rw-r--r--ChangeLogs/ChangeLog-03a9
-rw-r--r--ace/Dev_Poll_Reactor.cpp18
-rw-r--r--ace/Dev_Poll_Reactor.h2
5 files changed, 35 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d31c52340d..f332f2bd7df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Thu May 2 15:22:36 2002 Ossama Othman <ossama@uci.edu>
+
+ * ace/Dev_Poll_Reactor.h (work_pending_i):
+ * ace/Dev_Poll_Reactor.cpp (work_pending_i):
+
+ Accept a pointer to ACE_Time_Value instead of a reference.
+
+ Corrected the logic for the test for pending timers.
+
Thu May 02 14:38:53 2002 Ossama Othman <ossama@uci.edu>
* examples/Reactor/Misc/pingpong.cpp:
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 3d31c52340d..f332f2bd7df 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,12 @@
+Thu May 2 15:22:36 2002 Ossama Othman <ossama@uci.edu>
+
+ * ace/Dev_Poll_Reactor.h (work_pending_i):
+ * ace/Dev_Poll_Reactor.cpp (work_pending_i):
+
+ Accept a pointer to ACE_Time_Value instead of a reference.
+
+ Corrected the logic for the test for pending timers.
+
Thu May 02 14:38:53 2002 Ossama Othman <ossama@uci.edu>
* examples/Reactor/Misc/pingpong.cpp:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 3d31c52340d..f332f2bd7df 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,12 @@
+Thu May 2 15:22:36 2002 Ossama Othman <ossama@uci.edu>
+
+ * ace/Dev_Poll_Reactor.h (work_pending_i):
+ * ace/Dev_Poll_Reactor.cpp (work_pending_i):
+
+ Accept a pointer to ACE_Time_Value instead of a reference.
+
+ Corrected the logic for the test for pending timers.
+
Thu May 02 14:38:53 2002 Ossama Othman <ossama@uci.edu>
* examples/Reactor/Misc/pingpong.cpp:
diff --git a/ace/Dev_Poll_Reactor.cpp b/ace/Dev_Poll_Reactor.cpp
index dc4b469ce20..34a31d46a72 100644
--- a/ace/Dev_Poll_Reactor.cpp
+++ b/ace/Dev_Poll_Reactor.cpp
@@ -1109,8 +1109,11 @@ ACE_Dev_Poll_Reactor::work_pending_i (ACE_Time_Value * max_wait_time)
this_timeout = this->timer_queue_->calculate_timeout (max_wait_time,
&timer_buf);
- // If "this_timeout" != 0, the poll must timeout to allow timers
- // scheduled in the reactor to fire at the appropriate time.
+ // Check if we have timers to fire.
+ int timers_pending =
+ ((this_timeout != 0 && max_wait_time == 0)
+ || (this_timeout != 0 && max_wait_time != 0
+ && *this_timeout != *max_wait_time) ? 1 : 0);
long timeout =
(this_timeout == 0 ? -1 /* Infinity */ : this_timeout->msec ());
@@ -1156,15 +1159,8 @@ ACE_Dev_Poll_Reactor::work_pending_i (ACE_Time_Value * max_wait_time)
if (nfds > -1)
this->end_pfds_ = this->start_pfds_ + nfds;
- // Check if we have timers to fire.
- int timers_pending =
- ((this_timeout != 0 && max_wait_time == 0)
- || (this_timeout != 0 && max_wait_time != 0
- && *this_timeout != *max_wait_time) ? 1 : 0);
-
- // If timers are pending, override any error condition or timeout
- // from the poll.
- return (nfds <= 0 && timers_pending != 0 ? 1 : nfds);
+ // If timers are pending, override any timeout from the poll.
+ return (nfds == 0 && timers_pending != 0 ? 1 : nfds);
}
diff --git a/ace/Dev_Poll_Reactor.h b/ace/Dev_Poll_Reactor.h
index 9c7c9235d62..da5f61bbd78 100644
--- a/ace/Dev_Poll_Reactor.h
+++ b/ace/Dev_Poll_Reactor.h
@@ -974,7 +974,7 @@ protected:
* @note It is only possible to achieve millisecond timeout
* resolutions with the ACE_Dev_Poll_Reactor.
*/
- int work_pending_i (ACE_Time_Value &max_wait_time);
+ int work_pending_i (ACE_Time_Value *max_wait_time);
/// Poll for events and return the number of event handlers that
/// were dispatched.