summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2000-12-21 12:08:30 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2000-12-21 12:08:30 +0000
commit474e63dcbf42727978325c50ba46758c51208cef (patch)
tree3883df92fcf6eb7c1ccc5e5b87b2b7e5f5dd14e1
parent429eb0ea2ee6fb29ee1add4bcc0acafa152f64d5 (diff)
downloadATCD-474e63dcbf42727978325c50ba46758c51208cef.tar.gz
ChangeLogTag:Thu Dec 21 05:50:51 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
-rw-r--r--ChangeLog19
-rw-r--r--ChangeLogs/ChangeLog-02a19
-rw-r--r--ChangeLogs/ChangeLog-03a19
-rw-r--r--ace/Message_Block.h8
-rw-r--r--ace/Message_Block.i46
-rw-r--r--docs/tutorials/016/page02.html3
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp10
-rw-r--r--examples/Naming/Makefile3
8 files changed, 90 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index fd11213bdd6..92d36b1e18e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+Thu Dec 21 05:50:51 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp (handle_events): Added
+ casts for (SOCKET) when using FD_SET to work around problems
+ with Borland. Thanks to Johnny Willemsen
+ <johnny.willemsen@meco.nl> for reporting this.
+
+ * ace/Message_Block.h (ACE_Dynamic_Message_Strategy): Fixed a bunch
+ of non-const accessor methods to be const. Thanks to Johnny
+ Willemsen <johnny.willemsen@meco.nl> for reporting this.
+
+ * examples/Naming/Makefile (BIN2): Added the test_open.cpp file
+ to the Makefile. Thanks to Johnny Willemsen
+ <johnny.willemsen@meco.nl> for reporting this.
+
+ * docs/tutorials/016/page02.html: Clarify that signal() or
+ broadcast() don't release the mutex. Thanks to Mike Curtis
+ <mccurry@my-deja.com> for pointing this out.
+
Wed Dec 20 19:44:16 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* examples/Reactor/WFMO_Reactor/test_abandoned.cpp,
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index fd11213bdd6..92d36b1e18e 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,22 @@
+Thu Dec 21 05:50:51 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp (handle_events): Added
+ casts for (SOCKET) when using FD_SET to work around problems
+ with Borland. Thanks to Johnny Willemsen
+ <johnny.willemsen@meco.nl> for reporting this.
+
+ * ace/Message_Block.h (ACE_Dynamic_Message_Strategy): Fixed a bunch
+ of non-const accessor methods to be const. Thanks to Johnny
+ Willemsen <johnny.willemsen@meco.nl> for reporting this.
+
+ * examples/Naming/Makefile (BIN2): Added the test_open.cpp file
+ to the Makefile. Thanks to Johnny Willemsen
+ <johnny.willemsen@meco.nl> for reporting this.
+
+ * docs/tutorials/016/page02.html: Clarify that signal() or
+ broadcast() don't release the mutex. Thanks to Mike Curtis
+ <mccurry@my-deja.com> for pointing this out.
+
Wed Dec 20 19:44:16 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* examples/Reactor/WFMO_Reactor/test_abandoned.cpp,
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index fd11213bdd6..92d36b1e18e 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,22 @@
+Thu Dec 21 05:50:51 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp (handle_events): Added
+ casts for (SOCKET) when using FD_SET to work around problems
+ with Borland. Thanks to Johnny Willemsen
+ <johnny.willemsen@meco.nl> for reporting this.
+
+ * ace/Message_Block.h (ACE_Dynamic_Message_Strategy): Fixed a bunch
+ of non-const accessor methods to be const. Thanks to Johnny
+ Willemsen <johnny.willemsen@meco.nl> for reporting this.
+
+ * examples/Naming/Makefile (BIN2): Added the test_open.cpp file
+ to the Makefile. Thanks to Johnny Willemsen
+ <johnny.willemsen@meco.nl> for reporting this.
+
+ * docs/tutorials/016/page02.html: Clarify that signal() or
+ broadcast() don't release the mutex. Thanks to Mike Curtis
+ <mccurry@my-deja.com> for pointing this out.
+
Wed Dec 20 19:44:16 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* examples/Reactor/WFMO_Reactor/test_abandoned.cpp,
diff --git a/ace/Message_Block.h b/ace/Message_Block.h
index a85356c5e11..62e84b40f61 100644
--- a/ace/Message_Block.h
+++ b/ace/Message_Block.h
@@ -790,25 +790,25 @@ public:
const ACE_Time_Value &tv);
/// Get static bit field mask.
- u_long static_bit_field_mask (void);
+ u_long static_bit_field_mask (void) const;
/// Set static bit field mask.
void static_bit_field_mask (u_long);
/// Get left shift value to make room for static bit field.
- u_long static_bit_field_shift (void);
+ u_long static_bit_field_shift (void) const;
/// Set left shift value to make room for static bit field.
void static_bit_field_shift (u_long);
/// Get maximum supported priority value.
- u_long dynamic_priority_max (void);
+ u_long dynamic_priority_max (void) const;
/// Set maximum supported priority value.
void dynamic_priority_max (u_long);
/// Get offset to boundary between signed range and unsigned range.
- u_long dynamic_priority_offset (void);
+ u_long dynamic_priority_offset (void) const;
/// Set offset to boundary between signed range and unsigned range.
void dynamic_priority_offset (u_long);
diff --git a/ace/Message_Block.i b/ace/Message_Block.i
index 829dcc20d35..19774477da1 100644
--- a/ace/Message_Block.i
+++ b/ace/Message_Block.i
@@ -456,21 +456,21 @@ ACE_Message_Block::locking_strategy (ACE_Lock *nls)
////////////////////////////////////////
ACE_INLINE u_long
-ACE_Dynamic_Message_Strategy::static_bit_field_mask (void)
+ACE_Dynamic_Message_Strategy::static_bit_field_mask (void) const
{
return static_bit_field_mask_;
}
// get static bit field mask
ACE_INLINE void
-ACE_Dynamic_Message_Strategy::static_bit_field_mask (u_long ul)
+ACE_Dynamic_Message_Strategy::static_bit_field_mask (u_long ul)
{
static_bit_field_mask_ = ul;
}
// set static bit field mask
ACE_INLINE u_long
-ACE_Dynamic_Message_Strategy::static_bit_field_shift (void)
+ACE_Dynamic_Message_Strategy::static_bit_field_shift (void) const
{
return static_bit_field_shift_;
}
@@ -484,7 +484,7 @@ ACE_Dynamic_Message_Strategy::static_bit_field_shift (u_long ul)
// set left shift value to make room for static bit field
ACE_INLINE u_long
-ACE_Dynamic_Message_Strategy::dynamic_priority_max (void)
+ACE_Dynamic_Message_Strategy::dynamic_priority_max (void) const
{
return dynamic_priority_max_;
}
@@ -503,7 +503,7 @@ ACE_Dynamic_Message_Strategy::dynamic_priority_max (u_long ul)
// set maximum supported priority value
ACE_INLINE u_long
-ACE_Dynamic_Message_Strategy::dynamic_priority_offset (void)
+ACE_Dynamic_Message_Strategy::dynamic_priority_offset (void) const
{
return dynamic_priority_offset_;
}
@@ -512,13 +512,11 @@ ACE_Dynamic_Message_Strategy::dynamic_priority_offset (void)
ACE_INLINE void
ACE_Dynamic_Message_Strategy::dynamic_priority_offset (u_long ul)
{
-
-
- // max_late_ and min_pending_ depend on dynamic_priority_offset_: for
- // performance reasons, the values in max_late_ and min_pending_ are
- // (re)calculated only when dynamic_priority_offset_ is initialized
- // or changes, and are stored as a class member rather than being
- // derived each time one of their values is needed.
+ // max_late_ and min_pending_ depend on dynamic_priority_offset_:
+ // for performance reasons, the values in max_late_ and min_pending_
+ // are (re)calculated only when dynamic_priority_offset_ is
+ // initialized or changes, and are stored as a class member rather
+ // than being derived each time one of their values is needed.
dynamic_priority_offset_ = ul;
max_late_ = ACE_Time_Value (0, ul - 1);
min_pending_ = ACE_Time_Value (0, ul);
@@ -541,28 +539,24 @@ ACE_Dynamic_Message_Strategy::priority_status (ACE_Message_Block & mb,
// if the priority is negative, the message is pending
if (priority < ACE_Time_Value::zero)
- {
- // priority for pending messages must be shifted
- // upward above the late priority range
- priority += pending_shift_;
- if (priority < min_pending_)
{
- priority = min_pending_;
+ // priority for pending messages must be shifted
+ // upward above the late priority range
+ priority += pending_shift_;
+ if (priority < min_pending_)
+ priority = min_pending_;
}
- }
// otherwise, if the priority is greater than the maximum late
// priority value that can be represented, it is beyond late
else if (priority > max_late_)
- {
- // all messages that are beyond late are assigned lowest priority (zero)
- mb.msg_priority (0);
- return ACE_Dynamic_Message_Strategy::BEYOND_LATE;
- }
+ {
+ // all messages that are beyond late are assigned lowest priority (zero)
+ mb.msg_priority (0);
+ return ACE_Dynamic_Message_Strategy::BEYOND_LATE;
+ }
// otherwise, the message is late, but its priority is correct
else
- {
status = ACE_Dynamic_Message_Strategy::LATE;
- }
// use (fast) bitwise operators to isolate and replace
// the dynamic portion of the message's priority
diff --git a/docs/tutorials/016/page02.html b/docs/tutorials/016/page02.html
index 25785087c42..e84ce3853ad 100644
--- a/docs/tutorials/016/page02.html
+++ b/docs/tutorials/016/page02.html
@@ -34,7 +34,7 @@ while( the_variable != some_desired_state_or_value )
the_mutex.release();
</PRE>
Note that when <i>the_condition</i> is created, it must be given a
-reference to the mutex. That's because the wait() method will release
+reference to the mutex. That's because the wait() method will implicitly release
the mutex before waiting and reacquire it after being signaled.
</UL>
<P>
@@ -44,6 +44,7 @@ the mutex before waiting and reacquire it after being signaled.
the_mutex.acquire();
the_variable = some_new_value_or_state;
the_condition.signal() <i>OR</i> the_condition.broadcast()
+the_mutex.release();
</pre>
</UL>
</UL>
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp
index 37fbc9a4a21..1fe408c5e6b 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-fancy.cpp
@@ -1,4 +1,4 @@
-// $Id$
+ // $Id$
// This example tests the features of the <ACE_SOCK_Acceptor>,
// <ACE_SOCK_Stream>, and <ACE_Svc_Handler> classes. If the platform
@@ -523,9 +523,9 @@ Handler_Factory::handle_events (void)
fd_set handles;
FD_ZERO (&handles);
- FD_SET (this->twoway_acceptor_.get_handle (),
+ FD_SET ((ACE_SOCKET) this->twoway_acceptor_.get_handle (),
&handles);
- FD_SET (this->oneway_acceptor_.get_handle (),
+ FD_SET ((ACE_SOCKET) this->oneway_acceptor_.get_handle (),
&handles);
// Performs the iterative server activities.
@@ -549,12 +549,12 @@ Handler_Factory::handle_events (void)
"(%P|%t) select timed out\n"));
else
{
- if (FD_ISSET (this->twoway_acceptor_.get_handle (),
+ if (FD_ISSET ((ACE_SOCKET) this->twoway_acceptor_.get_handle (),
&temp))
this->create_handler (this->twoway_acceptor_,
&Handler_Factory::make_twoway_handler,
"twoway");
- if (FD_ISSET (this->oneway_acceptor_.get_handle (),
+ if (FD_ISSET ((ACE_SOCKET) this->oneway_acceptor_.get_handle (),
&temp))
this->create_handler (this->oneway_acceptor_,
&Handler_Factory::make_oneway_handler,
diff --git a/examples/Naming/Makefile b/examples/Naming/Makefile
index 171d2ab2bd0..b2496e0e5f1 100644
--- a/examples/Naming/Makefile
+++ b/examples/Naming/Makefile
@@ -14,7 +14,8 @@ PSRC = $(addsuffix .cpp,$(BIN))
BIN2 = test_non_existent \
test_writers \
- test_multiple_contexts
+ test_multiple_contexts \
+ test_open
#### If the ACE library wasn't built with sufficient components, don't
#### try to build here.