summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2006-09-27 21:21:16 +0000
committerSteve Huston <shuston@riverace.com>2006-09-27 21:21:16 +0000
commitb8c3016dfb62cadc359c1ddc19a6f8e150b689f9 (patch)
treecc63e5bc9010ab5b6f36ab29ec359b27ab8a1481
parent293157a0a7fe90d4b6b2465df6897cad9adc4303 (diff)
downloadATCD-b8c3016dfb62cadc359c1ddc19a6f8e150b689f9.tar.gz
ChangeLogTag:Wed Sep 27 21:18:04 UTC 2006 Steve Huston <shuston@riverace.com>
-rw-r--r--ACE/ChangeLog16
-rw-r--r--ACE/ace/Synch_Options.h12
-rw-r--r--ACE/ace/WFMO_Reactor.cpp55
-rw-r--r--ACE/ace/WFMO_Reactor.h10
4 files changed, 53 insertions, 40 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index d7809c35930..969a6a1059d 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,15 @@
+Wed Sep 27 21:18:04 UTC 2006 Steve Huston <shuston@riverace.com>
+
+ * ace/Synch_Options.h: Corrected the table of possible Use_Reactor,
+ Timeout combinations - it was reversed.
+
+ * ace/WFMO_Reactor.{h cpp}: Change the delete_signal_handler_,
+ delete_timer_queue_, delete_handler_rep_, delete_notify_handler_,
+ and open_for_business_ members from int to bool to more
+ accurately reflect their nature as yes/no indicators.
+ Also, initialize notify_handler_ to 0 in constructors to avoid
+ a UMR warning from Purify.
+
Wed Sep 27 06:28:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
* bin/msvc_static_compile.pl:
@@ -6,8 +18,8 @@ Wed Sep 27 06:28:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Tue Sep 26 09:49:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
* bin/MakeProjectCreator/config/dynamicany.mpb:
- Derive from valuetype, needed to get AbstractBase::_nil() in a no inline
- build.
+ Derive from valuetype, needed to get AbstractBase::_nil() in a no
+ inline build.
Mon Sep 25 16:29:42 UTC 2006 Douglas C. Schmidt <schmidt@dre.vanderbilt.edu>
diff --git a/ACE/ace/Synch_Options.h b/ACE/ace/Synch_Options.h
index 307086715c5..4ddefcee9b7 100644
--- a/ACE/ace/Synch_Options.h
+++ b/ACE/ace/Synch_Options.h
@@ -41,16 +41,16 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
*
* <TABLE>
* <TR><TD align="center"><B>Reactor</B></TD><TD align="center"><B>Timeout</B></TD><TD><B>Behavior</B></TD></TR>
- * <TR><TD>Unused</TD><TD>yes</TD><TD>Infinite timeout (using Reactor);
+ * <TR><TD>yes</TD><TD>Unused</TD><TD>Infinite timeout (using Reactor);
* this is the default.</TD></TR>
- * <TR><TD>time</TD><TD>yes</TD><TD>Try asynch transaction for the
+ * <TR><TD>yes</TD><TD>time</TD><TD>Try asynch transaction for the
* specified time (using Reactor)</TD></TR>
- * <TR><TD>0,0</TD><TD>yes</TD><TD>Poll; try, if EWOULDBLOCK, return
+ * <TR><TD>yes</TD><TD>0,0</TD><TD>Poll; try, if EWOULDBLOCK, return
* immediately (using Reactor)</TD></TR>
- * <TR><TD>Unused</TD><TD>no</TD><TD>Block until completion (don't use Reactor)</TD></TR>
- * <TR><TD>time</TD><TD>no</TD><TD>Wait up to specified amount of time for
+ * <TR><TD>no</TD><TD>Unused</TD><TD>Block until completion (don't use Reactor)</TD></TR>
+ * <TR><TD>no</TD><TD>time</TD><TD>Wait up to specified amount of time for
* completion (don't use Reactor)</TD></TR>
- * <TR><TD>0,0</TD><TD>no</TD><TD>Poll and return immediately</TD></TR>
+ * <TR><TD>no</TD><TD>0,0</TD><TD>Poll and return immediately</TD></TR>
* </TABLE>
*/
class ACE_Export ACE_Synch_Options
diff --git a/ACE/ace/WFMO_Reactor.cpp b/ACE/ace/WFMO_Reactor.cpp
index 536a43ee7e1..387ccb49bb0 100644
--- a/ACE/ace/WFMO_Reactor.cpp
+++ b/ACE/ace/WFMO_Reactor.cpp
@@ -1065,11 +1065,12 @@ ACE_WFMO_Reactor::ACE_WFMO_Reactor (ACE_Sig_Handler *sh,
ACE_Timer_Queue *tq,
ACE_Reactor_Notify *notify)
: signal_handler_ (0),
- delete_signal_handler_ (0),
+ delete_signal_handler_ (false),
timer_queue_ (0),
- delete_timer_queue_ (0),
- delete_handler_rep_ (0),
- delete_notify_handler_ (0),
+ delete_timer_queue_ (false),
+ delete_handler_rep_ (false),
+ notify_handler_ (0),
+ delete_notify_handler_ (false),
lock_adapter_ (lock_),
handler_rep_ (*this),
// this event is initially signaled
@@ -1082,7 +1083,7 @@ ACE_WFMO_Reactor::ACE_WFMO_Reactor (ACE_Sig_Handler *sh,
owner_ (ACE_Thread::self ()),
new_owner_ (0),
change_state_thread_ (0),
- open_for_business_ (0),
+ open_for_business_ (false),
deactivated_ (0)
{
if (this->open (ACE_WFMO_Reactor::DEFAULT_SIZE, 0, sh, tq, 0, notify) == -1)
@@ -1097,11 +1098,12 @@ ACE_WFMO_Reactor::ACE_WFMO_Reactor (size_t size,
ACE_Timer_Queue *tq,
ACE_Reactor_Notify *notify)
: signal_handler_ (0),
- delete_signal_handler_ (0),
+ delete_signal_handler_ (false),
timer_queue_ (0),
- delete_timer_queue_ (0),
- delete_handler_rep_ (0),
- delete_notify_handler_ (0),
+ delete_timer_queue_ (false),
+ delete_handler_rep_ (false),
+ notify_handler_ (0),
+ delete_notify_handler_ (false),
lock_adapter_ (lock_),
handler_rep_ (*this),
// this event is initially signaled
@@ -1114,7 +1116,7 @@ ACE_WFMO_Reactor::ACE_WFMO_Reactor (size_t size,
owner_ (ACE_Thread::self ()),
new_owner_ (0),
change_state_thread_ (0),
- open_for_business_ (0),
+ open_for_business_ (false),
deactivated_ (0)
{
ACE_UNUSED_ARG (unused);
@@ -1158,12 +1160,12 @@ ACE_WFMO_Reactor::open (size_t size,
ACE_NEW_RETURN (this->timer_queue_,
ACE_Timer_Heap,
-1);
- this->delete_timer_queue_ = 1;
+ this->delete_timer_queue_ = true;
}
else
{
this->timer_queue_ = tq;
- this->delete_timer_queue_ = 0;
+ this->delete_timer_queue_ = false;
}
// Signal Handler
@@ -1175,12 +1177,12 @@ ACE_WFMO_Reactor::open (size_t size,
ACE_NEW_RETURN (this->signal_handler_,
ACE_Sig_Handler,
-1);
- this->delete_signal_handler_ = 1;
+ this->delete_signal_handler_ = true;
}
else
{
this->signal_handler_ = sh;
- this->delete_signal_handler_ = 0;
+ this->delete_signal_handler_ = false;
}
// Setup the atomic wait array (used later in <handle_events>)
@@ -1209,10 +1211,9 @@ ACE_WFMO_Reactor::open (size_t size,
ACE_LIB_TEXT ("opening handler repository")),
-1);
else
- this->delete_handler_rep_ = 1;
+ this->delete_handler_rep_ = true;
- if (this->notify_handler_ != 0
- && this->delete_notify_handler_ != 0)
+ if (this->notify_handler_ != 0 && this->delete_notify_handler_)
delete this->notify_handler_;
this->notify_handler_ = notify;
@@ -1226,7 +1227,7 @@ ACE_WFMO_Reactor::open (size_t size,
if (this->notify_handler_ == 0)
return -1;
else
- this->delete_notify_handler_ = 1;
+ this->delete_notify_handler_ = true;
}
/* NOTE */
@@ -1259,7 +1260,7 @@ ACE_WFMO_Reactor::open (size_t size,
}
// We are open for business
- this->open_for_business_ = 1;
+ this->open_for_business_ = true;
return 0;
}
@@ -1267,10 +1268,10 @@ ACE_WFMO_Reactor::open (size_t size,
int
ACE_WFMO_Reactor::set_sig_handler (ACE_Sig_Handler *signal_handler)
{
- if (this->signal_handler_ != 0 && this->delete_signal_handler_ != 0)
+ if (this->signal_handler_ != 0 && this->delete_signal_handler_)
delete this->signal_handler_;
this->signal_handler_ = signal_handler;
- this->delete_signal_handler_ = 0;
+ this->delete_signal_handler_ = false;
return 0;
}
@@ -1283,10 +1284,10 @@ ACE_WFMO_Reactor::timer_queue (void) const
int
ACE_WFMO_Reactor::timer_queue (ACE_Timer_Queue *tq)
{
- if (this->timer_queue_ != 0 && this->delete_timer_queue_ != 0)
+ if (this->timer_queue_ != 0 && this->delete_timer_queue_)
delete this->timer_queue_;
this->timer_queue_ = tq;
- this->delete_timer_queue_ = 0;
+ this->delete_timer_queue_ = false;
return 0;
}
@@ -1301,7 +1302,7 @@ ACE_WFMO_Reactor::close (void)
return -1;
// We are now closed
- this->open_for_business_ = 0;
+ this->open_for_business_ = false;
// This will unregister all handles
this->handler_rep_.close ();
@@ -1324,21 +1325,21 @@ ACE_WFMO_Reactor::~ACE_WFMO_Reactor (void)
{
delete this->timer_queue_;
this->timer_queue_ = 0;
- this->delete_timer_queue_ = 0;
+ this->delete_timer_queue_ = false;
}
if (this->delete_signal_handler_)
{
delete this->signal_handler_;
this->signal_handler_ = 0;
- this->delete_signal_handler_ = 0;
+ this->delete_signal_handler_ = false;
}
if (this->delete_notify_handler_)
{
delete this->notify_handler_;
this->notify_handler_ = 0;
- this->delete_notify_handler_ = 0;
+ this->delete_notify_handler_ = false;
}
}
diff --git a/ACE/ace/WFMO_Reactor.h b/ACE/ace/WFMO_Reactor.h
index a16135bd1a4..a1ca110520e 100644
--- a/ACE/ace/WFMO_Reactor.h
+++ b/ACE/ace/WFMO_Reactor.h
@@ -1256,23 +1256,23 @@ protected:
/// Keeps track of whether we should delete the signal handler (if we
/// didn't create it, then we don't delete it).
- int delete_signal_handler_;
+ bool delete_signal_handler_;
/// Defined as a pointer to allow overriding by derived classes...
ACE_Timer_Queue *timer_queue_;
/// Keeps track of whether we should delete the timer queue (if we
/// didn't create it, then we don't delete it).
- int delete_timer_queue_;
+ bool delete_timer_queue_;
/// Keeps track of whether we should delete the handler repository
- int delete_handler_rep_;
+ bool delete_handler_rep_;
/// Used when <notify> is called.
ACE_Reactor_Notify *notify_handler_;
/// Keeps track of whether we should delete the notify handler.
- int delete_notify_handler_;
+ bool delete_notify_handler_;
/**
* Synchronization for the ACE_WFMO_Reactor.
@@ -1334,7 +1334,7 @@ protected:
ACE_HANDLE atomic_wait_array_ [2];
/// This flag is used to keep track of whether we are already closed.
- int open_for_business_;
+ bool open_for_business_;
/// This flag is used to keep track of whether we are actively handling
/// events or not.