summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1996-10-27 21:44:14 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1996-10-27 21:44:14 +0000
commit0cc5504a5c8a958101a09accb21c135281d5e9ff (patch)
treea38b7d21b5f25b5ef5548a423339c747f056059c /ace
parent997479406012dab3e5e787d3a724bf5f2fd2b04c (diff)
downloadATCD-0cc5504a5c8a958101a09accb21c135281d5e9ff.tar.gz
Jamming!
Diffstat (limited to 'ace')
-rw-r--r--ace/ARGV.cpp4
-rw-r--r--ace/Acceptor.cpp495
-rw-r--r--ace/Dump.cpp3
-rw-r--r--ace/Handle_Set.cpp4
-rw-r--r--ace/Local_Name_Space.cpp4
-rw-r--r--ace/Local_Name_Space_T.cpp23
-rw-r--r--ace/Local_Name_Space_T.h2
-rw-r--r--ace/Local_Tokens.cpp16
-rw-r--r--ace/Log_Msg.cpp4
-rw-r--r--ace/Log_Msg.h4
-rw-r--r--ace/Malloc_T.cpp32
-rw-r--r--ace/Malloc_T.h74
-rw-r--r--ace/Mem_Map.h1
-rw-r--r--ace/Memory_Pool.cpp85
-rw-r--r--ace/Memory_Pool.h54
-rw-r--r--ace/Naming_Context.cpp12
-rw-r--r--ace/OS.cpp18
-rw-r--r--ace/OS.h12
-rw-r--r--ace/OS.i256
-rw-r--r--ace/Proactor.cpp49
-rw-r--r--ace/Process.cpp1
-rw-r--r--ace/Process.h7
-rw-r--r--ace/README1
-rw-r--r--ace/Reactor.cpp29
-rw-r--r--ace/Remote_Tokens.cpp10
-rw-r--r--ace/SOCK_Connector.cpp4
-rw-r--r--ace/SOCK_Dgram_Bcast.cpp2
-rw-r--r--ace/SOCK_IO.cpp2
-rw-r--r--ace/SOCK_Stream.h7
-rw-r--r--ace/SString.cpp32
-rw-r--r--ace/SV_Shared_Memory.cpp6
-rw-r--r--ace/Service_Repository.cpp4
-rw-r--r--ace/Set.cpp4
-rw-r--r--ace/Signal.cpp5
-rw-r--r--ace/Strategies.cpp356
-rw-r--r--ace/Strategies.h12
-rw-r--r--ace/Synch.cpp8
-rw-r--r--ace/Synch_T.cpp6
-rw-r--r--ace/Synch_T.h2
-rw-r--r--ace/System_Time.cpp4
-rw-r--r--ace/TLI_Connector.cpp2
-rw-r--r--ace/TLI_Stream.i6
-rw-r--r--ace/Thread_Manager.cpp6
-rw-r--r--ace/Token.h2
-rw-r--r--ace/UPIPE_Connector.cpp4
-rw-r--r--ace/config-hpux-10.x-g++.h3
-rw-r--r--ace/config-hpux-10.x.h3
-rw-r--r--ace/config-hpux-9.x-orbix.h3
-rw-r--r--ace/config-hpux-9.x.h3
-rw-r--r--ace/config-m88k.h2
-rw-r--r--ace/config-sunos5.5-g++.h12
-rw-r--r--ace/config-sunos5.5-sunc++-4.x-orbix.h7
-rw-r--r--ace/config-sunos5.5-sunc++-4.x.h2
-rw-r--r--ace/config-sunx86-sunc++-4.x.h2
-rw-r--r--ace/config-win32-msvc2.0.h7
-rw-r--r--ace/config-win32-msvc4.0.h8
56 files changed, 855 insertions, 871 deletions
diff --git a/ace/ARGV.cpp b/ace/ARGV.cpp
index c7f63b0b001..184b9c96ad5 100644
--- a/ace/ARGV.cpp
+++ b/ace/ARGV.cpp
@@ -100,7 +100,7 @@ ACE_ARGV::ACE_ARGV (char buf[],
for (cp = arg;
*buf != '\0' && *buf != quote;
buf++, cp++)
- if (cp - arg < sizeof arg)
+ if (unsigned (cp - arg) < sizeof arg)
*cp = *buf;
*cp = '\0';
@@ -112,7 +112,7 @@ ACE_ARGV::ACE_ARGV (char buf[],
for (cp = arg;
*buf && !isspace (*buf);
buf++, cp++)
- if (cp - arg < sizeof arg)
+ if (unsigned (cp - arg) < sizeof arg)
*cp = *buf;
*cp = '\0';
}
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp
index d6994d0e957..baef2c27ce2 100644
--- a/ace/Acceptor.cpp
+++ b/ace/Acceptor.cpp
@@ -8,18 +8,12 @@
#include "ace/ACE.h"
#include "ace/Acceptor.h"
-// Shorthand names.
-#define SH SVC_HANDLER
-#define PR_AC_1 ACE_PEER_ACCEPTOR_1
-#define PR_AC_2 ACE_PEER_ACCEPTOR_2
-#define PR_AD ACE_PEER_ACCEPTOR_ADDR
-
ACE_ALLOC_HOOK_DEFINE(ACE_Acceptor)
-template <class SH, PR_AC_1> void
-ACE_Acceptor<SH, PR_AC_2>::dump (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::dump");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, "reactor_ = %x", this->reactor_));
@@ -27,40 +21,40 @@ ACE_Acceptor<SH, PR_AC_2>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-template <class SH, PR_AC_1>
-ACE_Acceptor<SH, PR_AC_2>::operator ACE_PEER_ACCEPTOR & () const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR & () const
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::operator ACE_PEER_ACCEPTOR &");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR &");
return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_;
}
-template <class SH, PR_AC_1> ACE_Reactor *
-ACE_Acceptor<SH, PR_AC_2>::reactor (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_Reactor *
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::reactor (void) const
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::reactor");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::reactor");
return this->reactor_;
}
-template <class SH, PR_AC_1> void
-ACE_Acceptor<SH, PR_AC_2>::reactor (ACE_Reactor *r)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::reactor (ACE_Reactor *r)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::reactor");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::reactor");
this->reactor_ = r;
}
-template <class SH, PR_AC_1> ACE_PEER_ACCEPTOR &
-ACE_Acceptor<SH, PR_AC_2>::acceptor (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_PEER_ACCEPTOR &
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor (void) const
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::acceptor");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor");
return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_;
}
// Returns ACE_HANDLE of the underlying Acceptor_Strategy.
-template <class SH, PR_AC_1> ACE_HANDLE
-ACE_Acceptor<SH, PR_AC_2>::get_handle (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_HANDLE
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle (void) const
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::get_handle");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle");
return this->peer_acceptor_.get_handle ();
}
@@ -69,11 +63,12 @@ ACE_Acceptor<SH, PR_AC_2>::get_handle (void) const
// with the Reactor and listen for connection requests at the
// designated <local_addr>.
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::open (const PR_AD &local_addr,
- ACE_Reactor *reactor)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
+ (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
+ ACE_Reactor *reactor)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::open");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open");
this->reactor_ = reactor;
// Must supply a valid Reactor to Acceptor::open()...
@@ -93,52 +88,54 @@ ACE_Acceptor<SH, PR_AC_2>::open (const PR_AD &local_addr,
// Simple constructor.
-template <class SH, PR_AC_1>
-ACE_Acceptor<SH, PR_AC_2>::ACE_Acceptor (ACE_Reactor *reactor)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Acceptor (ACE_Reactor *reactor)
: reactor_ (reactor)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::ACE_Acceptor");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Acceptor");
}
-template <class SH, PR_AC_1>
-ACE_Acceptor<SH, PR_AC_2>::ACE_Acceptor (const PR_AD &addr,
- ACE_Reactor *reactor)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Acceptor
+ (const ACE_PEER_ACCEPTOR_ADDR &addr,
+ ACE_Reactor *reactor)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::ACE_Acceptor");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Acceptor");
if (this->open (addr, reactor) == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Acceptor::ACE_Acceptor"));
}
-template <class SH, PR_AC_1>
-ACE_Acceptor<SH, PR_AC_2>::~ACE_Acceptor (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Acceptor (void)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::~ACE_Acceptor");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Acceptor");
this->handle_close ();
}
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::fini (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::fini");
- return ACE_Acceptor<SH, PR_AC_2>::handle_close ();
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini");
+ return ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close ();
}
// Hook called by the explicit dynamic linking facility.
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::init (int, char *[])
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, char *[])
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::init");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init");
return -1;
}
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::info (char **strp, size_t length) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (char **strp,
+ size_t length) const
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::info");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info");
char buf[BUFSIZ];
char addr_str[BUFSIZ];
- PR_AD addr;
+ ACE_PEER_ACCEPTOR_ADDR addr;
if (this->acceptor ().get_local_addr (addr) == -1)
return -1;
@@ -155,28 +152,28 @@ ACE_Acceptor<SH, PR_AC_2>::info (char **strp, size_t length) const
return ACE_OS::strlen (buf);
}
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::suspend (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend (void)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::suspend");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend");
return this->reactor_->suspend_handler (this);
}
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::resume (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume (void)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::resume");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume");
return this->reactor_->resume_handler (this);
}
// Perform termination activities when <this> is removed from the
// <reactor_>.
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::handle_close (ACE_HANDLE,
- ACE_Reactor_Mask)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE,
+ ACE_Reactor_Mask)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::handle_close");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close");
// Guard against multiple closes.
if (this->reactor_ != 0)
{
@@ -201,21 +198,22 @@ ACE_Acceptor<SH, PR_AC_2>::handle_close (ACE_HANDLE,
// subclass instances of SVC_HANDLER, using a singleton, dynamically
// linking the handler, etc.).
-template <class SH, PR_AC_1> SH *
-ACE_Acceptor<SH, PR_AC_2>::make_svc_handler (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> SVC_HANDLER *
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::make_svc_handler (void)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::make_svc_handler");
- return new SH;
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::make_svc_handler");
+ return new SVC_HANDLER;
}
// Bridge method for accepting the new connection into the
// <svc_handler>. The default behavior delegates to the
// PEER_ACCEPTOR::accept() in the Acceptor_Strategy.
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::accept_svc_handler (SH *svc_handler)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
+ (SVC_HANDLER *svc_handler)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::accept_svc_handler");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler");
if (this->peer_acceptor_.accept (*svc_handler) == -1)
{
// Close down handler to avoid memory leaks.
@@ -234,10 +232,11 @@ ACE_Acceptor<SH, PR_AC_2>::accept_svc_handler (SH *svc_handler)
// concurrency activations (such as creating the SVC_HANDLER as an
// "active object" via multi-threading or multi-processing).
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::activate_svc_handler (SH *svc_handler)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler
+ (SVC_HANDLER *svc_handler)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::activate_svc_handler");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler");
if (svc_handler->open ((void *) this) == -1)
{
svc_handler->close (0);
@@ -251,10 +250,10 @@ ACE_Acceptor<SH, PR_AC_2>::activate_svc_handler (SH *svc_handler)
// creation strategy), accept the connection into the SVC_HANDLER, and
// then activate the SVC_HANDLER.
-template <class SH, PR_AC_1> int
-ACE_Acceptor<SH, PR_AC_2>::handle_input (ACE_HANDLE listener)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE listener)
{
- ACE_TRACE ("ACE_Acceptor<SH, PR_AC_2>::handle_input");
+ ACE_TRACE ("ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input");
ACE_Handle_Set conn_handle;
// Default is "timeout (0, 0)," which means "poll."
@@ -278,7 +277,7 @@ ACE_Acceptor<SH, PR_AC_2>::handle_input (ACE_HANDLE listener)
// Create a service handler, using the appropriate creation
// strategy.
- SH *svc_handler = this->make_svc_handler ();
+ SVC_HANDLER *svc_handler = this->make_svc_handler ();
if (svc_handler == 0)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "make_svc_handler"), 0);
@@ -306,37 +305,37 @@ ACE_Acceptor<SH, PR_AC_2>::handle_input (ACE_HANDLE listener)
ACE_ALLOC_HOOK_DEFINE(ACE_Strategy_Acceptor)
-template <class SH, PR_AC_1> int
-ACE_Strategy_Acceptor<SH, PR_AC_2>::suspend (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend (void)
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::suspend");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend");
// First suspend the SVC_HANDLER's we've created.
if (this->scheduling_strategy_->suspend () == -1)
return -1;
else // Then suspend ourselves.
- return ACE_Acceptor<SH, PR_AC_2>::suspend ();
+ return ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend ();
}
-template <class SH, PR_AC_1> int
-ACE_Strategy_Acceptor<SH, PR_AC_2>::resume (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume (void)
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::resume");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume");
// First resume ourselves.
- if (ACE_Acceptor<SH, PR_AC_2>::suspend () == -1)
+ if (ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend () == -1)
return -1;
else // Then resume the SVC_HANDLER's we've created.
return this->scheduling_strategy_->resume ();
}
-template <class SH, PR_AC_1> void
-ACE_Strategy_Acceptor<SH, PR_AC_2>::dump (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::dump");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
- ACE_Acceptor<SH, PR_AC_2>::dump ();
+ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump ();
this->creation_strategy_->dump ();
ACE_DEBUG ((LM_DEBUG, "delete_creation_strategy_ = %d", delete_creation_strategy_));
this->accept_strategy_->dump ();
@@ -352,26 +351,26 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-template <class SH, PR_AC_1> ACE_PEER_ACCEPTOR &
-ACE_Strategy_Acceptor<SH, PR_AC_2>::acceptor (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_PEER_ACCEPTOR &
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor (void) const
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::acceptor");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor");
return this->accept_strategy_->acceptor ();
}
-template <class SH, PR_AC_1>
-ACE_Strategy_Acceptor<SH, PR_AC_2>::operator ACE_PEER_ACCEPTOR & () const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR & () const
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::operator ACE_PEER_ACCEPTOR &");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR &");
return this->accept_strategy_->acceptor ();
}
// Returns ACE_HANDLE of the underlying Acceptor_Strategy.
-template <class SH, PR_AC_1> ACE_HANDLE
-ACE_Strategy_Acceptor<SH, PR_AC_2>::get_handle (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_HANDLE
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle (void) const
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::get_handle");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle");
return this->accept_strategy_->get_handle ();
}
@@ -380,17 +379,18 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::get_handle (void) const
// with the Reactor and listen for connection requests at the
// designated <local_addr>.
-template <class SH, PR_AC_1> int
-ACE_Strategy_Acceptor<SH, PR_AC_2>::open (const PR_AD &local_addr,
- ACE_Reactor *reactor,
- ACE_Creation_Strategy<SH> *cre_s,
- ACE_Accept_Strategy<SH, PR_AC_2> *acc_s,
- ACE_Concurrency_Strategy<SH> *con_s,
- ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,
- const char service_name[],
- const char service_description[])
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
+ (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
+ ACE_Reactor *reactor,
+ ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
+ ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s,
+ ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
+ ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,
+ const char service_name[],
+ const char service_description[])
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::open");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open");
if (this->service_name_ == 0 && service_name != 0)
this->service_name_ = ACE_OS::strdup (service_name);
@@ -451,21 +451,22 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::open (const PR_AD &local_addr,
// Simple constructor.
-template <class SH, PR_AC_1>
-ACE_Strategy_Acceptor<SH, PR_AC_2>::ACE_Strategy_Acceptor (const char service_name[],
- const char service_description[])
- : creation_strategy_ (0),
- accept_strategy_ (0),
- concurrency_strategy_ (0),
- scheduling_strategy_ (0),
- delete_creation_strategy_ (0),
- delete_accept_strategy_ (0),
- delete_concurrency_strategy_ (0),
- delete_scheduling_strategy_ (0),
- service_name_ (0),
- service_description_ (0)
-{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::ACE_Strategy_Acceptor");
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor
+ (const char service_name[],
+ const char service_description[])
+ : creation_strategy_ (0),
+ accept_strategy_ (0),
+ concurrency_strategy_ (0),
+ scheduling_strategy_ (0),
+ delete_creation_strategy_ (0),
+ delete_accept_strategy_ (0),
+ delete_concurrency_strategy_ (0),
+ delete_scheduling_strategy_ (0),
+ service_name_ (0),
+ service_description_ (0)
+{
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor");
if (service_name != 0)
this->service_name_ = ACE_OS::strdup (service_name);
@@ -473,17 +474,18 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::ACE_Strategy_Acceptor (const char service_na
this->service_description_ = ACE_OS::strdup (service_description);
}
-template <class SH, PR_AC_1>
-ACE_Strategy_Acceptor<SH, PR_AC_2>::ACE_Strategy_Acceptor (const PR_AD &addr,
- ACE_Reactor *reactor,
- ACE_Creation_Strategy<SH> *cre_s,
- ACE_Accept_Strategy<SH, PR_AC_2> *acc_s,
- ACE_Concurrency_Strategy<SH> *con_s,
- ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,
- const char service_name[],
- const char service_description[])
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor
+ (const ACE_PEER_ACCEPTOR_ADDR &addr,
+ ACE_Reactor *reactor,
+ ACE_Creation_Strategy<SVC_HANDLER> *cre_s,
+ ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s,
+ ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,
+ ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,
+ const char service_name[],
+ const char service_description[])
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::ACE_Strategy_Acceptor");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor");
if (this->open (addr, reactor, cre_s, acc_s, con_s, sch_s,
service_name, service_description) == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Strategy_Acceptor::ACE_Strategy_Acceptor"));
@@ -492,11 +494,11 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::ACE_Strategy_Acceptor (const PR_AD &addr,
// Perform termination activities when <this> is removed from the
// <ACE_Reactor>.
-template <class SH, PR_AC_1> int
-ACE_Strategy_Acceptor<SH, PR_AC_2>::handle_close (ACE_HANDLE,
- ACE_Reactor_Mask)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE,
+ ACE_Reactor_Mask)
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::handle_close");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close");
// Guard against multiple closes.
if (this->creation_strategy_ != 0)
{
@@ -541,10 +543,10 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::handle_close (ACE_HANDLE,
// subclass instances of SVC_HANDLER, using a singleton, dynamically
// linking the handler, etc.).
-template <class SH, PR_AC_1> SH *
-ACE_Strategy_Acceptor<SH, PR_AC_2>::make_svc_handler (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> SVC_HANDLER *
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::make_svc_handler (void)
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::make_svc_handler");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::make_svc_handler");
return this->creation_strategy_->make_svc_handler ();
}
@@ -552,10 +554,11 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::make_svc_handler (void)
// <svc_handler>. The default behavior delegates to the
// <Strategy_Acceptor::accept> in the Acceptor_Strategy.
-template <class SH, PR_AC_1> int
-ACE_Strategy_Acceptor<SH, PR_AC_2>::accept_svc_handler (SH *svc_handler)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
+ (SVC_HANDLER *svc_handler)
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::accept_svc_handler");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler");
return this->accept_strategy_->accept_svc_handler (svc_handler);
}
@@ -567,18 +570,19 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::accept_svc_handler (SH *svc_handler)
// concurrency activations (such as creating the SVC_HANDLER as an
// "active object" via multi-threading or multi-processing).
-template <class SH, PR_AC_1> int
-ACE_Strategy_Acceptor<SH, PR_AC_2>::activate_svc_handler (SH *svc_handler)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler
+ (SVC_HANDLER *svc_handler)
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::activate_svc_handler");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler");
return this->concurrency_strategy_->activate_svc_handler
(svc_handler, (void *) this);
}
-template <class SH, PR_AC_1>
-ACE_Strategy_Acceptor<SH, PR_AC_2>::~ACE_Strategy_Acceptor (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Strategy_Acceptor (void)
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::~ACE_Strategy_Acceptor");
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Strategy_Acceptor");
ACE_OS::free ((void *) this->service_name_);
ACE_OS::free ((void *) this->service_description_);
this->handle_close ();
@@ -586,22 +590,22 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::~ACE_Strategy_Acceptor (void)
// Signal the server to shutdown gracefully.
-template <class SH, PR_AC_1> int
-ACE_Strategy_Acceptor<SH, PR_AC_2>::handle_signal (int, siginfo_t *, ucontext_t *)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_signal (int, siginfo_t *, ucontext_t *)
{
ACE_TRACE ("ACE_Strategy_Acceptor::handle_signal");
ACE_Service_Config::end_reactor_event_loop ();
return 0;
}
-template <class SH, PR_AC_1> int
-ACE_Strategy_Acceptor<SH, PR_AC_2>::info (char **strp,
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (char **strp,
size_t length) const
{
ACE_TRACE ("ACE_Strategy_Acceptor::info");
char buf[BUFSIZ];
char service_addr_str[BUFSIZ];
- PR_AD addr;
+ ACE_PEER_ACCEPTOR_ADDR addr;
if (this->acceptor ().get_local_addr (addr) == -1)
return -1;
@@ -621,19 +625,19 @@ ACE_Strategy_Acceptor<SH, PR_AC_2>::info (char **strp,
return ACE_OS::strlen (buf);
}
-template <class SH, PR_AC_1> int
-ACE_Strategy_Acceptor<SH, PR_AC_2>::fini (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void)
{
- ACE_TRACE ("ACE_Strategy_Acceptor<SH, PR_AC_2>::fini");
- return this->ACE_Strategy_Acceptor<SH, PR_AC_2>::handle_close ();
+ ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini");
+ return this->ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close ();
}
ACE_ALLOC_HOOK_DEFINE(ACE_Oneshot_Acceptor)
-template <class SH, PR_AC_1> void
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::dump (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::dump");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, "reactor_ = %x", this->reactor_));
@@ -646,19 +650,20 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::open (const PR_AD &addr,
- ACE_Reactor *reactor,
- ACE_Concurrency_Strategy<SH> *con_s)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
+ (const ACE_PEER_ACCEPTOR_ADDR &addr,
+ ACE_Reactor *reactor,
+ ACE_Concurrency_Strategy<SVC_HANDLER> *con_s)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::open");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open");
this->reactor (reactor);
// Initialize the concurrency strategy.
if (con_s == 0)
{
- ACE_NEW_RETURN (con_s, ACE_Concurrency_Strategy<SH>, -1);
+ ACE_NEW_RETURN (con_s, ACE_Concurrency_Strategy<SVC_HANDLER>, -1);
this->delete_concurrency_strategy_ = 1;
}
this->concurrency_strategy_ = con_s;
@@ -667,38 +672,39 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::open (const PR_AD &addr,
return this->peer_acceptor_.open (addr, 1);
}
-template <class SH, PR_AC_1>
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::ACE_Oneshot_Acceptor (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor (void)
: delete_concurrency_strategy_ (0),
reactor_ (0)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::ACE_Oneshot_Acceptor");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor");
}
-template <class SH, PR_AC_1>
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::ACE_Oneshot_Acceptor (const PR_AD &addr,
- ACE_Reactor *reactor,
- ACE_Concurrency_Strategy<SH> *cs)
- : delete_concurrency_strategy_ (0)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor
+ (const ACE_PEER_ACCEPTOR_ADDR &addr,
+ ACE_Reactor *reactor,
+ ACE_Concurrency_Strategy<SVC_HANDLER> *cs)
+ : delete_concurrency_strategy_ (0)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::ACE_Oneshot_Acceptor");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Oneshot_Acceptor");
if (this->open (addr, reactor, cs) == -1)
ACE_ERROR ((LM_ERROR, "%p\n",
"ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor"));
}
-template <class SH, PR_AC_1>
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::~ACE_Oneshot_Acceptor (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Oneshot_Acceptor (void)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::~ACE_Oneshot_Acceptor");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Oneshot_Acceptor");
this->handle_close ();
}
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::handle_close (ACE_HANDLE,
- ACE_Reactor_Mask)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE,
+ ACE_Reactor_Mask)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::handle_close");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close");
// Guard against multiple closes.
if (this->concurrency_strategy_ != 0)
{
@@ -721,11 +727,12 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::handle_close (ACE_HANDLE,
return 0;
}
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::handle_timeout (const ACE_Time_Value &tv,
- const void *arg)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_timeout
+ (const ACE_Time_Value &tv,
+ const void *arg)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::handle_timeout");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_timeout");
errno = ETIMEDOUT;
this->svc_handler_->handle_timeout (tv, arg);
@@ -736,19 +743,20 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::handle_timeout (const ACE_Time_Value &tv,
return 0;
}
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::cancel (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::cancel (void)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::cancel");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::cancel");
return this->reactor_ && this->reactor_->cancel_timer (this);
}
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::register_handler (SH *svc_handler,
- const ACE_Synch_Options &synch_options,
- int restart)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::register_handler
+ (SVC_HANDLER *svc_handler,
+ const ACE_Synch_Options &synch_options,
+ int restart)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::register_handler");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::register_handler");
// Can't do this if we don't have a Reactor.
if (this->reactor_ == 0)
return -1;
@@ -776,10 +784,11 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::register_handler (SH *svc_handler,
// concurrency activations (such as creating the SVC_HANDLER as an
// "active object" via multi-threading or multi-processing).
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::activate_svc_handler (SH *svc_handler)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler
+ (SVC_HANDLER *svc_handler)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::activate_svc_handler");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::activate_svc_handler");
return this->concurrency_strategy_->activate_svc_handler
(svc_handler, (void *) this);
}
@@ -787,13 +796,14 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::activate_svc_handler (SH *svc_handler)
// Factors out the code shared between the <accept> and <handle_input>
// methods.
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::shared_accept (SH *svc_handler,
- PR_AD *remote_addr,
- ACE_Time_Value *timeout,
- int restart)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::shared_accept
+ (SVC_HANDLER *svc_handler,
+ ACE_PEER_ACCEPTOR_ADDR *remote_addr,
+ ACE_Time_Value *timeout,
+ int restart)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::shared_accept");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::shared_accept");
if (svc_handler == 0)
return -1;
@@ -819,13 +829,14 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::shared_accept (SH *svc_handler,
// then activate the SVC_HANDLER. Note that SVC_HANDLER::open()
// decides what type of concurrency strategy to use.
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::accept (SH *svc_handler,
- PR_AD *remote_addr,
- const ACE_Synch_Options &synch_options,
- int restart)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept
+ (SVC_HANDLER *svc_handler,
+ ACE_PEER_ACCEPTOR_ADDR *remote_addr,
+ const ACE_Synch_Options &synch_options,
+ int restart)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::accept");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept");
// Note that if timeout == ACE_Time_Value (x, y) where (x > 0 || y >
// 0) then this->connector_.connect() will block synchronously. If
// <use_reactor> is set then we don't want this to happen (since we
@@ -854,10 +865,10 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::accept (SH *svc_handler,
// Accepts one pending connection from a client (since we're the
// "oneshot" Acceptor).
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::handle_input (ACE_HANDLE listener)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input (ACE_HANDLE listener)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::handle_input");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_input");
int result = 0;
// Cancel any timer that might be pending.
@@ -873,28 +884,28 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::handle_input (ACE_HANDLE listener)
// Hook called by the explicit dynamic linking facility.
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::init (int, char *[])
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init (int, char *[])
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::init");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::init");
return -1;
}
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::fini (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini (void)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::fini");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::fini");
return this->handle_close ();
}
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::info (char **strp,
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info (char **strp,
size_t length) const
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::info");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::info");
char buf[BUFSIZ];
char addr_str[BUFSIZ];
- PR_AD addr;
+ ACE_PEER_ACCEPTOR_ADDR addr;
if (this->peer_acceptor_.get_local_addr (addr) == -1)
return -1;
@@ -911,59 +922,55 @@ ACE_Oneshot_Acceptor<SH, PR_AC_2>::info (char **strp,
return ACE_OS::strlen (buf);
}
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::suspend (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend (void)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::suspend");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::suspend");
return this->reactor_ && this->reactor_->suspend_handler (this);
}
-template <class SH, PR_AC_1> int
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::resume (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume (void)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::resume");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::resume");
return this->reactor_ && this->reactor_->resume_handler (this);
}
// Returns ACE_HANDLE of the underlying peer_acceptor.
-template <class SH, PR_AC_1> ACE_HANDLE
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::get_handle (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_HANDLE
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle (void) const
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::get_handle");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle");
return this->peer_acceptor_.get_handle ();
}
-template <class SH, PR_AC_1> ACE_PEER_ACCEPTOR &
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::acceptor (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_PEER_ACCEPTOR &
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor (void) const
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::acceptor");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor");
return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_;
}
-template <class SH, PR_AC_1>
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::operator ACE_PEER_ACCEPTOR & () const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR & () const
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::operator ACE_PEER_ACCEPTOR &");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::operator ACE_PEER_ACCEPTOR &");
return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_;
}
-template <class SH, PR_AC_1> ACE_Reactor *
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::reactor (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_Reactor *
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::reactor (void) const
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::reactor");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::reactor");
return this->reactor_;
}
-template <class SH, PR_AC_1> void
-ACE_Oneshot_Acceptor<SH, PR_AC_2>::reactor (ACE_Reactor *r)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
+ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::reactor (ACE_Reactor *r)
{
- ACE_TRACE ("ACE_Oneshot_Acceptor<SH, PR_AC_2>::reactor");
+ ACE_TRACE ("ACE_Oneshot_Acceptor<SH, ACE_PEER_ACCEPTOR_2>::reactor");
this->reactor_ = r;
}
-#undef SH
-#undef PR_AC_1
-#undef PR_AC_2
-#undef PR_AD
#endif /* ACE_ACCEPTOR_C */
diff --git a/ace/Dump.cpp b/ace/Dump.cpp
index ea231f6b243..d8d20781edc 100644
--- a/ace/Dump.cpp
+++ b/ace/Dump.cpp
@@ -130,3 +130,6 @@ ACE_ODB::remove_object (const void *this_ptr)
ACE_ODB *ACE_ODB::instance_ = 0;
+#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION)
+template class ACE_Guard<ACE_Thread_Mutex>;
+#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */
diff --git a/ace/Handle_Set.cpp b/ace/Handle_Set.cpp
index 8e098cd879c..4a6140a8cd8 100644
--- a/ace/Handle_Set.cpp
+++ b/ace/Handle_Set.cpp
@@ -24,11 +24,11 @@ ACE_Handle_Set::dump (void) const
ACE_DEBUG ((LM_DEBUG, "size_ = %d", this->size_));
ACE_DEBUG ((LM_DEBUG, "\nmax_handle_ = %d", this->max_handle_));
-#if defined(ACE_WIN32)
+#if defined (ACE_WIN32)
for (size_t i = 0; i < this->mask_.fd_count + 1; i++)
ACE_DEBUG ((LM_DEBUG, " %x ", this->mask_.fd_array[i]));
#else /* !ACE_WIN32 */
- for (size_t i = 0; i < this->max_handle_ + 1; i++)
+ for (ACE_HANDLE i = 0; i < this->max_handle_ + 1; i++)
if (this->is_set (i))
ACE_DEBUG ((LM_DEBUG, " %d ", i));
#endif /* ACE_WIN32 */
diff --git a/ace/Local_Name_Space.cpp b/ace/Local_Name_Space.cpp
index 7b2b2051452..0af46ec9f44 100644
--- a/ace/Local_Name_Space.cpp
+++ b/ace/Local_Name_Space.cpp
@@ -144,11 +144,13 @@ template class ACE_Unbounded_Set_Iterator<ACE_WString>;
template class ACE_Set_Node<ACE_WString>;
template class ACE_Set_Node<ACE_Name_Binding>;
template class ACE_Guard<ACE_RW_Process_Mutex>;
+template class ACE_Guard<ACE_Null_Mutex>;
template class ACE_Read_Guard<ACE_RW_Process_Mutex>;
+template class ACE_Read_Guard<ACE_Null_Mutex>;
template class ACE_Write_Guard<ACE_RW_Process_Mutex>;
+template class ACE_Write_Guard<ACE_Null_Mutex>;
template class ACE_Map_Manager<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
template class ACE_Map_Iterator<ACE_NS_String, ACE_NS_Internal, ACE_Null_Mutex>;
template class ACE_Map_Entry <ACE_NS_String, ACE_NS_Internal>;
#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */
-
#endif /* ACE_LOCAL_NAME_SPACE_C */
diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp
index 098c7b5c034..2d62a3d19dc 100644
--- a/ace/Local_Name_Space_T.cpp
+++ b/ace/Local_Name_Space_T.cpp
@@ -57,7 +57,7 @@ ACE_Name_Space_Map<ALLOCATOR>::close (ALLOCATOR* allocator)
template <class ALLOCATOR> int
ACE_Name_Space_Map<ALLOCATOR>::bind (const ACE_NS_String &ext_id,
const ACE_NS_Internal &int_id,
- ALLOCATOR* allocator)
+ ALLOCATOR *allocator)
{
ACE_TRACE ("ACE_Name_Space_Map::bind");
int result = 0;
@@ -78,7 +78,7 @@ ACE_Name_Space_Map<ALLOCATOR>::bind (const ACE_NS_String &ext_id,
template <class ALLOCATOR> int
ACE_Name_Space_Map<ALLOCATOR>::unbind (const ACE_NS_String &ext_id,
ACE_NS_Internal &int_id,
- ALLOCATOR* allocator)
+ ALLOCATOR *allocator)
{
ACE_TRACE ("ACE_Name_Space_Map::unbind");
int result = 0;
@@ -100,7 +100,7 @@ ACE_Name_Space_Map<ALLOCATOR>::rebind (const ACE_NS_String &ext_id,
const ACE_NS_Internal &int_id,
ACE_NS_String &old_ext_id,
ACE_NS_Internal &old_int_id,
- ALLOCATOR* allocator)
+ ALLOCATOR *allocator)
{
ACE_TRACE ("ACE_Name_Space_Map::rebind");
int result = 0;
@@ -120,7 +120,7 @@ ACE_Name_Space_Map<ALLOCATOR>::rebind (const ACE_NS_String &ext_id,
template <class ALLOCATOR> int
ACE_Name_Space_Map<ALLOCATOR>::find (const ACE_NS_String &ext_id,
ACE_NS_Internal &int_id,
- ALLOCATOR* allocator)
+ ALLOCATOR *allocator)
{
ACE_TRACE ("ACE_Name_Space_Map::find");
int result = 0;
@@ -255,8 +255,8 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::rebind (const ACE_WString &name,
template <ACE_MEM_POOL_1, class LOCK> int
ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::resolve (const ACE_WString &name,
- ACE_WString &value,
- char *&type)
+ ACE_WString &value,
+ char *&type)
{
ACE_TRACE ("ACE_Local_Name_Space::resolve");
ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, this->lock_, -1);
@@ -264,7 +264,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::resolve (const ACE_WString &name,
ACE_NS_String ns_name (name);
ACE_NS_Internal ns_internal;
ACE_NS_String nbc_string; // Note the classy variable name! :)
- int result = -1;
+
if (this->name_space_map_->find (ns_name, ns_internal, this->allocator_) != 0)
return -1;
else
@@ -282,10 +282,10 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::resolve (const ACE_WString &name,
// Makes a copy here. Caller needs to call delete to free up memory
char *new_type;
ACE_NEW_RETURN (new_type, char [len + 1], -1);
+
ACE_OS::strncpy (new_type, temp, len);
new_type[len] = '\0'; // Null terminate the string
type = new_type;
-
return 0;
}
}
@@ -352,7 +352,9 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::create_manager (void)
this->context_file_));
ACE_MEM_POOL_OPTIONS options (this->name_options_->base_address ());
- ACE_NEW_RETURN (this->allocator_, ALLOCATOR (options, this->context_file_), -1);
+
+ // Create the allocator with the appropriate options.
+ ACE_NEW_RETURN (this->allocator_, ALLOCATOR (this->context_file_, 0, &options), -1);
if (ACE_LOG_MSG->errnum ())
ACE_ERROR_RETURN ((LM_ERROR, "Allocator::Allocator\n"), -1);
@@ -613,8 +615,6 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::list_type_entries (ACE_BINDING_SET &
compiled_regexp = pattern_rep;
#endif /* ACE_HAS_REGEX */
- int result = 1;
-
for (map_entry = 0;
map_iterator.next (map_entry) != 0;
map_iterator.advance ())
@@ -645,7 +645,6 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::list_type_entries (ACE_BINDING_SET &
return 0;
}
-
template <ACE_MEM_POOL_1, class LOCK> void
ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::dump (void) const
{
diff --git a/ace/Local_Name_Space_T.h b/ace/Local_Name_Space_T.h
index cb62e065d08..fdcef075c06 100644
--- a/ace/Local_Name_Space_T.h
+++ b/ace/Local_Name_Space_T.h
@@ -192,7 +192,7 @@ private:
ALLOCATOR *allocator_;
// Pointer to the allocator
- ACE_Name_Space_Map <ALLOCATOR>*name_space_map_;
+ ACE_Name_Space_Map <ALLOCATOR> *name_space_map_;
// Pointer to the allocated map manager.
ACE_Naming_Context::Context_Scope_Type ns_scope_;
diff --git a/ace/Local_Tokens.cpp b/ace/Local_Tokens.cpp
index 0c8f12b0eae..f928de4c6a0 100644
--- a/ace/Local_Tokens.cpp
+++ b/ace/Local_Tokens.cpp
@@ -97,10 +97,10 @@ ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_Token_Proxy *new_proxy,
}
ACE_TPQ_Entry::ACE_TPQ_Entry (void)
- : proxy_ (0),
+ : cond_var_ (lock_),
+ proxy_ (0),
nesting_level_ (0),
- sleep_hook_ (0),
- cond_var_ (lock_)
+ sleep_hook_ (0)
{
ACE_TRACE ("ACE_TPQ_Entry::ACE_TPQ_Entry null const.");
}
@@ -1081,9 +1081,10 @@ ACE_Token_Proxy::ACE_Token_Proxy (void)
// Notice the token_ (0). Do *not* copy the token pointer. This must
// be obtained through the token manager. Also, we don't copy any
// waiter info. A copied Proxy does *not* inherit client_id.
-ACE_Token_Proxy::ACE_Token_Proxy (const ACE_Token_Proxy &p)
-: token_ (0),
- waiter_ (this, 0)
+
+ACE_Token_Proxy::ACE_Token_Proxy (const ACE_Token_Proxy &)
+ : token_ (0),
+ waiter_ (this, 0)
{
ACE_TRACE ("ACE_Token_Proxy::ACE_Token_Proxy");
}
@@ -1309,9 +1310,10 @@ ACE_Token_Proxy::handle_options (ACE_Synch_Options &options,
}
int
-ACE_Token_Proxy::release (ACE_Synch_Options &options)
+ACE_Token_Proxy::release (ACE_Synch_Options &)
{
ACE_TRACE ("ACE_Token_Proxy::release");
+
if (this->token_ == 0)
{
errno = ENOENT;
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index 21525d93060..86f2ee3b734 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -63,7 +63,6 @@ ACE_Log_Msg::instance (void)
// TSS Singleton implementation.
static int once_ = 0;
- static int count_ = 0;
if (once_ == 0)
{
@@ -891,3 +890,6 @@ ACE_Log_Msg::getpid (void) const
return ACE_Log_Msg::pid_;
}
+#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION)
+template class ACE_Guard<ACE_Recursive_Thread_Mutex>;
+#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */
diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h
index b14b6d2b79a..6ba5604385a 100644
--- a/ace/Log_Msg.h
+++ b/ace/Log_Msg.h
@@ -44,7 +44,7 @@
#define ACE_HEX_DUMP(X) \
do { int __ace_error = errno; \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->set (__FILE__, __LINE__, 0, errno, ace___->restart (), \
+ ace___->set (__FILE__, __LINE__, 0, __ace_error, ace___->restart (), \
ace___->msg_ostream ()); \
ace___->log_hexdump X; \
} while (0)
@@ -69,7 +69,7 @@
#define ACE_DEBUG(X) \
do { int __ace_error = errno; \
ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
- ace___->set (__FILE__, __LINE__, 0, errno, ace___->restart (), ace___->msg_ostream ()); \
+ ace___->set (__FILE__, __LINE__, 0, __ace_error, ace___->restart (), ace___->msg_ostream ()); \
ace___->log X; \
} while (0)
#define ACE_ERROR_INIT(VALUE, FLAGS) \
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp
index b8263d05954..23832860b88 100644
--- a/ace/Malloc_T.cpp
+++ b/ace/Malloc_T.cpp
@@ -14,14 +14,6 @@
ACE_ALLOC_HOOK_DEFINE(ACE_Malloc)
template <class MALLOC>
-ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (const char *pool_name,
- const char *lock_name)
- : allocator_ (pool_name, lock_name)
-{
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter");
-}
-
-template <class MALLOC>
ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (const char *pool_name)
: allocator_ (pool_name)
{
@@ -161,23 +153,29 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc (const char *pool_name)
this->open ();
}
-template <ACE_MEM_POOL_1, class LOCK>
+template <ACE_MEM_POOL_1, class LOCK>
ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc (const char *pool_name,
- const char *lock_name)
- : memory_pool_ (pool_name),
+ const char *lock_name,
+ const ACE_MEM_POOL_OPTIONS *options)
+ : memory_pool_ (pool_name, options),
lock_ (lock_name)
{
ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc");
this->open ();
}
- : memory_pool_ (options, pool_name),
- lock_ (pool_name == 0 ? 0 : ACE::basename (pool_name,
- ACE_DIRECTORY_SEPARATOR_CHAR))
+#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
+template <ACE_MEM_POOL_1, class LOCK>
+ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc (const char *pool_name,
+ const char *lock_name,
+ const void *options)
+ : memory_pool_ (pool_name, (const ACE_MEM_POOL_OPTIONS *) options),
+ lock_ (lock_name)
{
ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc");
this->open ();
}
+#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
// Clean up the resources allocated by ACE_Malloc.
@@ -215,7 +213,7 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::shared_malloc (size_t nbytes)
// Begin the search starting at the place in the freelist
// where the last block was found.
ACE_Malloc_Header *prevp = this->cb_ptr_->freep_;
- ACE_Malloc_Header *currp = prevp->s_.next_block_;
+ ACE_Malloc_Header *currp = prevp->s_.next_block_;
// Search the freelist to locate a block of the appropriate size.
@@ -284,7 +282,7 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::malloc (size_t nbytes)
template <ACE_MEM_POOL_1, class LOCK> void *
ACE_Malloc<ACE_MEM_POOL_2, LOCK>::calloc (size_t nbytes,
- char initial_value)
+ char initial_value)
{
ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::calloc");
void *ptr = this->malloc (nbytes);
@@ -508,7 +506,7 @@ ACE_Malloc_Iterator<ACE_MEM_POOL_2, LOCK>::dump (void) const
template <ACE_MEM_POOL_1, class LOCK>
ACE_Malloc_Iterator<ACE_MEM_POOL_2, LOCK>::ACE_Malloc_Iterator (ACE_Malloc<ACE_MEM_POOL_2, LOCK> &malloc,
- const char *name)
+ const char *name)
: malloc_ (malloc),
guard_ (malloc_.lock_),
curr_ (0),
diff --git a/ace/Malloc_T.h b/ace/Malloc_T.h
index b2d2a596305..ec892378180 100644
--- a/ace/Malloc_T.h
+++ b/ace/Malloc_T.h
@@ -32,32 +32,26 @@ class ACE_Allocator_Adapter : public ACE_Allocator
public:
// Trait.
typedef MALLOC ALLOCATOR;
- typedef MALLOC::MEMORY_POOL_OPTIONS MEMORY_POOL_OPTIONS;
+
+#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
+ // The following code will break C++ compilers that don't support
+ // template typedefs correctly.
+ typedef const MALLOC::MEMORY_POOL_OPTIONS *MEMORY_POOL_OPTIONS;
+#else
+ typedef const void *MEMORY_POOL_OPTIONS;
+#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
// = Initialization.
ACE_Allocator_Adapter (const char *pool_name = 0);
- // Constructor.
- ACE_Allocator_Adapter (const char *pool_name,
- const char *lock_name);
- // Constructor.
- ACE_Allocator_Adapter (const MEMORY_POOL_OPTIONS &options,
- const char *pool_name,
- const char *lock_name)
- : allocator_ (options, pool_name, lock_name)
- {
- ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter");
- }
-
- // Constructor (must be here to avoid template bugs).
- ACE_Allocator_Adapter (const MEMORY_POOL_OPTIONS &options,
- const char *pool_name = 0)
- : allocator_ (options, pool_name)
- {
+ ACE_Allocator_Adapter (const char *pool_name,
+ const char *lock_name,
+ MEMORY_POOL_OPTIONS options = 0)
+ : allocator_ (pool_name, lock_name, options)
+ {
ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter");
}
-
- // Constructor.
+ // Constructor (this has to be inline to avoid bugs with some C++ compilers.
// = Memory Management
@@ -137,7 +131,7 @@ public:
private:
ALLOCATOR allocator_;
- // ALLOCATOR instance.
+ // ALLOCATOR instance, which is owned by the adapter.
};
// Forward declaration.
@@ -169,40 +163,21 @@ public:
// name (if necessary).
ACE_Malloc (const char *pool_name,
- const char *lock_name);
- // Initialize ACE_Malloc. This constructor passes <pool_name> to
- // initialize the memory pool, and uses <lock_name> to automatically
- // extract out the name used for the underlying lock name (if
- // necessary).
-
- ACE_Malloc (const MEMORY_POOL_OPTIONS &options,
- const char *pool_name,
- const char *lock_name)
- : memory_pool_ (options, pool_name),
- lock_ (lock_name)
- {
- ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc");
- this->open ();
- }
+ const char *lock_name,
+ const ACE_MEM_POOL_OPTIONS *options = 0);
// Initialize ACE_Malloc. This constructor passes <pool_name> to
// initialize the memory pool, and uses <lock_name> to automatically
// extract out the name used for the underlying lock name (if
// necessary). In addition, <options> is passed through to
// initialize the underlying memory pool.
- ACE_Malloc (const MEMORY_POOL_OPTIONS &options,
- const char *pool_name = 0)
- : memory_pool_ (options, pool_name),
- lock_ (pool_name == 0 ? 0 : ACE::basename (pool_name,
- ACE_DIRECTORY_SEPARATOR_CHAR))
- {
- ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc");
- this->open ();
- }
-
- // Initialize ACE_Malloc. This constructor passes <pool_name> to
- // initialize the memory pool. In addition, <options> is passed
- // through to initialize the underlying memory pool.
+#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS)
+ ACE_Malloc (const char *pool_name,
+ const char *lock_name,
+ const void *options = 0);
+ // This is necessary to work around template bugs with certain C++
+ // compilers.
+#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */
int remove (void);
// Releases resources allocated by ACE_Malloc.
@@ -320,7 +295,6 @@ private:
LOCK lock_;
// Local that ensures mutual exclusion.
-
};
template <ACE_MEM_POOL_1, class LOCK>
diff --git a/ace/Mem_Map.h b/ace/Mem_Map.h
index ee439b1e5a5..54476cb60a6 100644
--- a/ace/Mem_Map.h
+++ b/ace/Mem_Map.h
@@ -168,6 +168,7 @@ private:
// This method does the dirty work of actually calling ::mmap to map
// the file into memory.
+ // = Disallow copying and assignment.
ACE_Mem_Map (const ACE_Mem_Map &) {}
void operator = (const ACE_Mem_Map &) {}
};
diff --git a/ace/Memory_Pool.cpp b/ace/Memory_Pool.cpp
index aff78d903dc..34ffb0c5f7b 100644
--- a/ace/Memory_Pool.cpp
+++ b/ace/Memory_Pool.cpp
@@ -18,13 +18,8 @@ ACE_Local_Memory_Pool::dump (void) const
ACE_TRACE ("ACE_Local_Memory_Pool::dump");
}
-ACE_Local_Memory_Pool::ACE_Local_Memory_Pool (const char *)
-{
- ACE_TRACE ("ACE_Local_Memory_Pool::ACE_Local_Memory_Pool");
-}
-
-ACE_Local_Memory_Pool::ACE_Local_Memory_Pool (const OPTIONS &,
- const char *)
+ACE_Local_Memory_Pool::ACE_Local_Memory_Pool (const char *,
+ const OPTIONS *)
{
ACE_TRACE ("ACE_Local_Memory_Pool::ACE_Local_Memory_Pool");
}
@@ -108,32 +103,24 @@ ACE_MMAP_Memory_Pool::protect (void *addr, size_t len, int prot)
return ACE_OS::mprotect (addr, len, prot);
}
-ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (const char *pool_name)
- : base_addr_ (ACE_DEFAULT_BASE_ADDR),
- flags_ (MAP_SHARED | MAP_FIXED),
- write_each_page_ (1)
+ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (const char *pool_name,
+ const OPTIONS *options)
+ : base_addr_ (0),
+ flags_ (MAP_SHARED),
+ write_each_page_ (0)
{
ACE_TRACE ("ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool");
- if (pool_name == 0)
- // Only create a new unique filename for the backing store file
- // if the user didn't supply one...
- pool_name = ACE_DEFAULT_BACKING_STORE; // from "ace/OS.h"
-
- ACE_OS::strncpy (this->backing_store_, pool_name,
- sizeof this->backing_store_);
-
- if (this->signal_handler_.register_handler (SIGSEGV, this) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", this->backing_store_));
-}
-
-ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (const OPTIONS &options,
- const char *pool_name)
- : base_addr_ (options.use_fixed_addr_ ? options.base_addr_ : 0),
- flags_ (MAP_SHARED | (options.use_fixed_addr_ ? MAP_FIXED : 0)),
- write_each_page_ (options.write_each_page_)
-{
- ACE_TRACE ("ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool");
+ // Only change the defaults if <options> != 0.
+ if (options)
+ {
+ if (options->use_fixed_addr_)
+ {
+ this->base_addr_ = (void *) options->base_addr_;
+ ACE_SET_BITS (flags_, MAP_FIXED);
+ }
+ this->write_each_page_ = options->write_each_page_;
+ }
if (pool_name == 0)
// Only create a new unique filename for the backing store file
@@ -335,15 +322,9 @@ ACE_MMAP_Memory_Pool::handle_signal (int signum, siginfo_t *siginfo, ucontext_t
ACE_ALLOC_HOOK_DEFINE(ACE_Lite_MMAP_Memory_Pool)
-ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool (const char *pool_name)
- : ACE_MMAP_Memory_Pool (pool_name)
-{
- ACE_TRACE ("ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool");
-}
-
-ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool (const OPTIONS &options,
- const char *pool_name)
- : ACE_MMAP_Memory_Pool (options, pool_name)
+ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool (const char *pool_name,
+ const OPTIONS *options)
+ : ACE_MMAP_Memory_Pool (pool_name, options)
{
ACE_TRACE ("ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool");
}
@@ -389,13 +370,8 @@ ACE_Sbrk_Memory_Pool::dump (void) const
ACE_TRACE ("ACE_Sbrk_Memory_Pool::dump");
}
-ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool (const char *)
-{
- ACE_TRACE ("ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool");
-}
-
-ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool (const OPTIONS &options,
- const char *)
+ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool (const char *,
+ const OPTIONS *)
{
ACE_TRACE ("ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool");
}
@@ -500,16 +476,8 @@ ACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *)
return 0;
}
-ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const OPTIONS &,
- const char *)
-{
- ACE_TRACE ("ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool");
-
- if (this->signal_handler_.register_handler (SIGSEGV, this) == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Sig_Handler::register_handler"));
-}
-
-ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const char *)
+ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool (const char *,
+ const OPTIONS *)
{
ACE_TRACE ("ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool");
@@ -534,11 +502,8 @@ ACE_Shared_Memory_Pool::acquire (size_t nbytes,
if (this->commit_backing_store (rounded_bytes, offset) == -1)
return 0;
- SHM_TABLE *st = (SHM_TABLE *) ACE_DEFAULT_BASE_ADDR;
- void *new_memory = ((char *) ACE_DEFAULT_BASE_ADDR) + offset;
-
// ACE_DEBUG ((LM_DEBUG, "(%P|%t) acquired more chunks, nbytes = %d, rounded_bytes = %d\n", nbytes, rounded_bytes));
- return new_memory;
+ return ((char *) ACE_DEFAULT_BASE_ADDR) + offset;
}
// Ask system for initial chunk of shared memory.
diff --git a/ace/Memory_Pool.h b/ace/Memory_Pool.h
index 93fbc81214f..1918970efcd 100644
--- a/ace/Memory_Pool.h
+++ b/ace/Memory_Pool.h
@@ -43,12 +43,9 @@ class ACE_Export ACE_Sbrk_Memory_Pool
public:
typedef ACE_Sbrk_Memory_Pool_Options OPTIONS;
- ACE_Sbrk_Memory_Pool (const char *pool_name = 0);
- // Initialization constructor.
-
- ACE_Sbrk_Memory_Pool (const OPTIONS &options,
- const char *pool_name = 0);
- // Initialize the pool via the options.
+ ACE_Sbrk_Memory_Pool (const char *pool_name = 0,
+ const OPTIONS *options = 0);
+ // Initialize the pool.
// = Implementor operations.
virtual void *init_acquire (size_t nbytes,
@@ -96,6 +93,7 @@ protected:
#endif /* !ACE_LACKS_SBRK */
#if !defined (ACE_LACKS_SYSV_SHMEM)
+
class ACE_Export ACE_Shared_Memory_Pool_Options
// = TITLE
// Helper class for constructor options.
@@ -114,12 +112,9 @@ class ACE_Export ACE_Shared_Memory_Pool : public ACE_Event_Handler
public:
typedef ACE_Shared_Memory_Pool_Options OPTIONS;
- ACE_Shared_Memory_Pool (const char *pool_name = ACE_ITOA (ACE_DEFAULT_SHM_KEY));
- // Initialization constructor.
-
- ACE_Shared_Memory_Pool (const OPTIONS &options,
- const char *pool_name = ACE_ITOA (ACE_DEFAULT_SHM_KEY));
- // Initialize the pool via the options.
+ ACE_Shared_Memory_Pool (const char *pool_name = ACE_ITOA (ACE_DEFAULT_SHM_KEY),
+ const OPTIONS *options = 0);
+ // Initialize the pool.
virtual void *init_acquire (size_t nbytes,
size_t &rounded_bytes,
@@ -209,12 +204,9 @@ class ACE_Export ACE_Local_Memory_Pool
public:
typedef ACE_Local_Memory_Pool_Options OPTIONS;
- ACE_Local_Memory_Pool (const char *pool_name = 0);
- // Initialization constructor.
-
- ACE_Local_Memory_Pool (const OPTIONS &options,
- const char *pool_name = 0);
- // Initialize the pool via the options.
+ ACE_Local_Memory_Pool (const char *pool_name = 0,
+ const OPTIONS *options = 0);
+ // Initialize the pool.
virtual void *init_acquire (size_t nbytes,
size_t &rounded_bytes,
@@ -269,14 +261,14 @@ class ACE_Export ACE_MMAP_Memory_Pool_Options
// compilers.
{
public:
- ACE_MMAP_Memory_Pool_Options (char *base_addr = ACE_DEFAULT_BASE_ADDR,
+ ACE_MMAP_Memory_Pool_Options (const char *base_addr = ACE_DEFAULT_BASE_ADDR,
int use_fixed_addr = 1,
int write_each_page = 1)
: base_addr_ (base_addr),
use_fixed_addr_ (use_fixed_addr),
write_each_page_ (write_each_page) {}
- char *base_addr_;
+ const char *base_addr_;
int use_fixed_addr_;
int write_each_page_;
};
@@ -290,12 +282,10 @@ public:
typedef ACE_MMAP_Memory_Pool_Options OPTIONS;
// = Initialization and termination methods.
- ACE_MMAP_Memory_Pool (const char *pool_name = 0);
- // Default constructor.
- ACE_MMAP_Memory_Pool (const OPTIONS &options,
- const char *pool_name = 0);
- // Initialize the pool via the options.
+ ACE_MMAP_Memory_Pool (const char *pool_name = 0,
+ const OPTIONS *options = 0);
+ // Initialize the pool.
virtual void *init_acquire (size_t nbytes,
size_t &rounded_bytes,
@@ -375,7 +365,7 @@ protected:
int flags_;
// Flags passed into <ACE_OS::mmap>.
- const int write_each_page_;
+ int write_each_page_;
// Should we write a byte to each page to forceably allocate memory
// for this backing store?
@@ -397,12 +387,10 @@ class ACE_Export ACE_Lite_MMAP_Memory_Pool : public ACE_MMAP_Memory_Pool
{
public:
// = Initialization and termination methods.
- ACE_Lite_MMAP_Memory_Pool (const char *pool_name = 0);
- // Default constructor.
- ACE_Lite_MMAP_Memory_Pool (const OPTIONS &options,
- const char *pool_name = 0);
- // Initialize the pool via the options.
+ ACE_Lite_MMAP_Memory_Pool (const char *pool_name = 0,
+ const OPTIONS *options = 0);
+ // Initialize the pool.
int sync (ssize_t len = -1, int flags = MS_SYNC);
// Overwrite the default sync behavior with no-op
@@ -416,7 +404,3 @@ public:
#endif /* __ACE_INLINE__ */
#endif /* ACE_MEMORY_POOL_H */
-
-
-
-
diff --git a/ace/Naming_Context.cpp b/ace/Naming_Context.cpp
index 2fc724ca535..e92659cad7c 100644
--- a/ace/Naming_Context.cpp
+++ b/ace/Naming_Context.cpp
@@ -11,7 +11,7 @@
// Make life easier later on...
typedef ACE_Local_Name_Space <ACE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> LOCAL_NAME_SPACE;
-typedef ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> LIGHT_LOCAL_NAME_SPACE;
+typedef ACE_Local_Name_Space <ACE_LITE_MMAP_MEMORY_POOL, ACE_RW_Process_Mutex> LITE_LOCAL_NAME_SPACE;
// The following Factory is used by the ACE_Service_Config and
// svc.conf file to dynamically initialize the state of the Name
@@ -53,7 +53,7 @@ ACE_Naming_Context::local (void)
}
int
-ACE_Naming_Context::open (Context_Scope_Type scope_in, int light)
+ACE_Naming_Context::open (Context_Scope_Type scope_in, int lite)
{
ACE_TRACE ("ACE_Naming_Context::open");
ACE_OS::hostname (this->hostname_, sizeof this->hostname_);
@@ -76,8 +76,8 @@ ACE_Naming_Context::open (Context_Scope_Type scope_in, int light)
}
else // Use NODE_LOCAL or PROC_LOCAL name space.
{
- if (light)
- ACE_NEW_RETURN (this->name_space_, LIGHT_LOCAL_NAME_SPACE (scope_in, this->name_options_), -1);
+ if (lite)
+ ACE_NEW_RETURN (this->name_space_, LITE_LOCAL_NAME_SPACE (scope_in, this->name_options_), -1);
else
ACE_NEW_RETURN (this->name_space_, LOCAL_NAME_SPACE (scope_in, this->name_options_), -1);
@@ -104,14 +104,14 @@ ACE_Naming_Context::ACE_Naming_Context (void)
}
ACE_Naming_Context::ACE_Naming_Context (Context_Scope_Type scope_in,
- int light)
+ int lite)
{
ACE_TRACE ("ACE_Naming_Context::ACE_Naming_Context");
ACE_NEW (this->name_options_, ACE_Name_Options);
// Initialize.
- if (this->open (scope_in, light) == -1)
+ if (this->open (scope_in, lite) == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Naming_Context::ACE_Naming_Context"));
}
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 9ae31952079..c28efabad4b 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -914,10 +914,10 @@ ACE_OS::thr_setspecific (ACE_thread_key_t key, void *data)
// affect existing threads.
pthread_init ();
#endif // ACE_HAS_FSU_PTHREADS
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setspecific (key, data), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setspecific (key, data), ace_result_),
int, -1);
#elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setspecific (key, data), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setspecific (key, data), ace_result_), int, -1);
#elif defined (ACE_HAS_WTHREADS)
::TlsSetValue (key, data);
ACE_TSS_Cleanup::instance ()->key_used (key);
@@ -947,7 +947,7 @@ ACE_OS::thr_keyfree (ACE_thread_key_t key)
// Extract out the thread-specific table instance and and free up
// the key and destructor.
ACE_TSS_Cleanup::instance ()->remove (key);
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::TlsFree (key), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::TlsFree (key), ace_result_), int, -1);
#elif defined (VXWORKS)
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_HAS_STHREADS */
@@ -962,20 +962,21 @@ ACE_OS::thr_keycreate (ACE_thread_key_t *key,
void *inst)
{
// ACE_TRACE ("ACE_OS::thr_keycreate");
+ inst = inst;
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
#if defined (ACE_HAS_SETKIND_NP)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_keycreate (key, dest),
- _result),
+ ace_result_),
int, -1);
#else /* ACE_HAS_SETKIND_NP */
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_key_create (key, dest),
- _result),
+ ace_result_),
int, -1);
#endif /* ACE_HAS_SETKIND_NP */
#elif defined (ACE_HAS_STHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_keycreate (key, dest),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_WTHREADS)
*key = ::TlsAlloc ();
@@ -1002,6 +1003,7 @@ ACE_OS::thr_key_used (ACE_thread_key_t key)
#if defined (ACE_WIN32)
return ACE_TSS_Cleanup::instance ()->key_used (key);
#else
+ key = key;
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_WIN32 */
}
@@ -1012,6 +1014,7 @@ ACE_OS::thr_key_detach (void *inst)
#if defined (ACE_WIN32)
return ACE_TSS_Cleanup::instance()->detach (inst);
#else
+ inst = inst;
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_WIN32 */
}
@@ -1199,6 +1202,9 @@ ACE_OS::socket_init (int version_high, int version_low)
ACE_OS::socket_initialized_ = 1;
}
+#else
+ version_high = version_high;
+ version_low = version_low;
#endif /* ACE_WIN32 */
return 0;
}
diff --git a/ace/OS.h b/ace/OS.h
index 4a77329ed27..69c219e32a1 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -213,6 +213,12 @@ typedef int key_t;
#define ACE_PEER_STREAM _ACE_PEER_STREAM
#define ACE_PEER_STREAM_ADDR _ACE_PEER_STREAM::PEER_ADDR
+// Handle ACE_Acceptor
+#define ACE_PEER_ACCEPTOR_1 class _ACE_PEER_ACCEPTOR
+#define ACE_PEER_ACCEPTOR_2 _ACE_PEER_ACCEPTOR
+#define ACE_PEER_ACCEPTOR _ACE_PEER_ACCEPTOR
+#define ACE_PEER_ACCEPTOR_ADDR _ACE_PEER_ACCEPTOR::PEER_ADDR
+
// Handle ACE_SOCK_*
#define ACE_SOCK_ACCEPTOR ACE_SOCK_Acceptor
#define ACE_SOCK_CONNECTOR ACE_SOCK_Connector
@@ -260,6 +266,12 @@ typedef int key_t;
#define ACE_PEER_STREAM _ACE_PEER_STREAM
#define ACE_PEER_STREAM_ADDR _ACE_PEER_ADDR
+// Handle ACE_Acceptor
+#define ACE_PEER_ACCEPTOR_1 class _ACE_PEER_ACCEPTOR, class _ACE_PEER_ADDR
+#define ACE_PEER_ACCEPTOR_2 _ACE_PEER_ACCEPTOR, _ACE_PEER_ADDR
+#define ACE_PEER_ACCEPTOR _ACE_PEER_ACCEPTOR
+#define ACE_PEER_ACCEPTOR_ADDR _ACE_PEER_ADDR
+
// Handle ACE_SOCK_*
#define ACE_SOCK_ACCEPTOR ACE_SOCK_Acceptor, ACE_INET_Addr
#define ACE_SOCK_CONNECTOR ACE_SOCK_Connector, ACE_INET_Addr
diff --git a/ace/OS.i b/ace/OS.i
index cb0a254052f..aba7fbc3fdd 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -86,6 +86,12 @@ extern "C" int gettimeofday (struct timeval *tp);
*/
#endif /* ACE_HAS_SVR4_GETTIMEOFDAY */
+#if defined (ACE_LACKS_CONST_TIMESPEC_PTR)
+typedef struct timespec * ACE_TIMESPEC_PTR;
+#else
+typedef const struct timespec * ACE_TIMESPEC_PTR;
+#endif /* HPUX */
+
#if !defined (ACE_LACKS_MALLOC_H)
#include <malloc.h>
#endif /* ACE_LACKS_MALLOC_H */
@@ -161,14 +167,14 @@ extern "C" char *mktemp (char *);
while (RESULT == FAILVALUE && errno == EINTR && ACE_LOG_MSG->restart ())
#define ACE_OSCALL_RETURN(OP,TYPE,FAILVALUE) \
do { \
- TYPE _result; \
+ TYPE ace_result_; \
do \
- _result = (TYPE) OP; \
- while (_result == FAILVALUE && errno == EINTR && ACE_LOG_MSG->restart ()); \
- return _result; \
+ ace_result_ = (TYPE) OP; \
+ while (ace_result_ == FAILVALUE && errno == EINTR && ACE_LOG_MSG->restart ()); \
+ return ace_result_; \
} while (0)
#else
-#define ACE_OSCALL_RETURN(OP,TYPE,FAILVALUE) do { TYPE _result; return OP; } while (0)
+#define ACE_OSCALL_RETURN(OP,TYPE,FAILVALUE) do { TYPE ace_result_ = FAILVALUE; ace_result_ = ace_result_; return OP; } while (0)
#define ACE_OSCALL(OP,TYPE,FAILVALUE,RESULT) do { RESULT = (TYPE) OP; } while (0)
#endif /* SIGNAL_SAFE_OS_CALLS */
@@ -177,7 +183,7 @@ ACE_OS::chdir (const char *path)
{
// ACE_TRACE ("ACE_OS::chdir");
#if defined (VXWORKS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::chdir ((char *) path), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::chdir ((char *) path), ace_result_),
int, ERROR);
#else
ACE_OSCALL_RETURN (::chdir (path), int, -1);
@@ -383,7 +389,7 @@ ACE_OS::umask (mode_t cmask)
#if defined (VXWORKS)
ACE_NOTSUP_RETURN (-1);
#else
- ACE_OSCALL_RETURN (::umask (cmask), mode_t, -1);
+ return ::umask (cmask); // This call shouldn't fail...
#endif /* VXWORKS */
}
@@ -403,10 +409,10 @@ ACE_OS::umask (mode_t cmask)
return RESULT; } while (0)
#define ACE_OSCALL_RETURN(X,TYPE,FAILVALUE) \
do { \
- TYPE _result = (TYPE) X; \
- if (_result == FAILVALUE) \
+ TYPE ace_result_ = (TYPE) X; \
+ if (ace_result_ == FAILVALUE) \
errno = ::GetLastError (); \
- return _result; \
+ return ace_result_; \
} while (0)
#define ACE_OSCALL(X,TYPE,FAILVALUE,RESULT) \
do { \
@@ -585,7 +591,7 @@ ACE_OS::unlink (const char *path)
{
// ACE_TRACE ("ACE_OS::unlink");
#if defined (VXWORKS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::unlink ((char *) path), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::unlink ((char *) path), ace_result_),
int, ERROR);
#else
ACE_OSCALL_RETURN (::unlink (path), int, -1);
@@ -602,6 +608,7 @@ ACE_OS::cuserid (char *user, size_t maxlen)
// Hackish because of missing buffer size!
return ::GetUserName (user, (unsigned long *) &maxlen) ? user : 0;
#else
+ maxlen = maxlen;
ACE_OSCALL_RETURN (::cuserid (user), char *, 0);
#endif /* VXWORKS */
}
@@ -658,7 +665,9 @@ ACE_OS::mutex_init (ACE_mutex_t *m,
void *arg)
{
// ACE_TRACE ("ACE_OS::mutex_init");
-
+ type = type;
+ name = name;
+ arg = arg;
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined(ACE_HAS_PTHREADS)
pthread_mutexattr_t attributes;
@@ -693,7 +702,7 @@ ACE_OS::mutex_init (ACE_mutex_t *m,
return result;
#elif defined (ACE_HAS_STHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_init (m, type, arg),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_WTHREADS)
m->type_ = type;
@@ -729,15 +738,15 @@ ACE_OS::mutex_destroy (ACE_mutex_t *m)
// ACE_TRACE ("ACE_OS::mutex_destroy");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_destroy (m), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_destroy (m), ace_result_), int, -1);
#elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_destroy (m), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_destroy (m), ace_result_), int, -1);
#elif defined (ACE_HAS_WTHREADS)
switch (m->type_)
{
case USYNC_PROCESS:
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (m->proc_mutex_),
- _result),
+ ace_result_),
int, -1);
case USYNC_THREAD:
return ACE_OS::thread_mutex_destroy (&m->thr_mutex_);
@@ -760,9 +769,9 @@ ACE_OS::mutex_lock (ACE_mutex_t *m)
// ACE_TRACE ("ACE_OS::mutex_lock");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_lock (m), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_lock (m), ace_result_), int, -1);
#elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_lock (m), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_lock (m), ace_result_), int, -1);
#elif defined (ACE_HAS_WTHREADS)
switch (m->type_)
{
@@ -794,9 +803,9 @@ ACE_OS::mutex_trylock (ACE_mutex_t *m)
// ACE_TRACE ("ACE_OS::mutex_trylock");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_trylock (m), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_trylock (m), ace_result_), int, -1);
#elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_trylock (m), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_trylock (m), ace_result_), int, -1);
#elif defined (ACE_HAS_WTHREADS)
switch (m->type_)
{
@@ -844,15 +853,15 @@ ACE_OS::mutex_unlock (ACE_mutex_t *m)
// ACE_TRACE ("ACE_OS::mutex_unlock");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_unlock (m), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_mutex_unlock (m), ace_result_), int, -1);
#elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_unlock (m), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::mutex_unlock (m), ace_result_), int, -1);
#elif defined (ACE_HAS_WTHREADS)
switch (m->type_)
{
case USYNC_PROCESS:
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::ReleaseMutex (m->proc_mutex_),
- _result),
+ ace_result_),
int, -1);
case USYNC_THREAD:
return ACE_OS::thread_mutex_unlock (&m->thr_mutex_);
@@ -876,7 +885,7 @@ ACE_OS::thread_mutex_init (ACE_thread_mutex_t *m,
void *arg)
{
// ACE_TRACE ("ACE_OS::thread_mutex_init");
-
+ type = type;
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS) || defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
// Force the use of USYNC_THREAD!
@@ -975,11 +984,11 @@ ACE_OS::cond_broadcast (ACE_cond_t *cv)
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_broadcast (cv),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_STHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_broadcast (cv),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_WTHREADS) || defined (VXWORKS)
int result = 0;
@@ -1008,9 +1017,9 @@ ACE_OS::cond_destroy (ACE_cond_t *cv)
// ACE_TRACE ("ACE_OS::cond_destroy");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_destroy (cv), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_destroy (cv), ace_result_), int, -1);
#elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_destroy (cv), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_destroy (cv), ace_result_), int, -1);
#elif defined (ACE_HAS_WTHREADS) || defined (VXWORKS)
return ACE_OS::sema_destroy (&cv->sema_);
#endif /* ACE_HAS_STHREADS */
@@ -1023,6 +1032,9 @@ ACE_INLINE int
ACE_OS::cond_init (ACE_cond_t *cv, int type, LPCTSTR name, void *arg)
{
// ACE_TRACE ("ACE_OS::cond_init");
+ type = type;
+ name = name;
+ arg = arg;
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
pthread_condattr_t attributes;
@@ -1059,7 +1071,7 @@ ACE_OS::cond_init (ACE_cond_t *cv, int type, LPCTSTR name, void *arg)
return result;
#elif defined (ACE_HAS_STHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_init (cv, type, arg),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_WTHREADS) || defined (VXWORKS)
cv->waiters_ = 0;
@@ -1081,9 +1093,9 @@ ACE_OS::cond_signal (ACE_cond_t *cv)
// ACE_TRACE ("ACE_OS::cond_signal");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_signal (cv), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_signal (cv), ace_result_), int, -1);
#elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_signal (cv), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_signal (cv), ace_result_), int, -1);
#elif defined (ACE_HAS_WTHREADS) || defined (VXWORKS)
// If there aren't any waiters, then this is a no-op. Note that
// this function *must* be called with the <external_mutex> held
@@ -1155,25 +1167,22 @@ ACE_OS::cond_timedwait (ACE_cond_t *cv,
#else /* PTHREADS or STHREADS or DCETHREADS */
int result;
timestruc_t ts = *timeout; // Calls ACE_Time_Value::operator timestruc_t().
+
#if (defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)) && !defined (ACE_HAS_FSU_PTHREADS)
- ACE_OSCALL (ACE_ADAPT_RETVAL ((timeout == 0
- ? ::pthread_cond_wait (cv, external_mutex)
- : ::pthread_cond_timedwait (cv, external_mutex,
-#if defined (HPUX) // They forgot a const in the system prototype...
- (struct timespec *) &ts)),
-#else
- (const struct timespec *) &ts)),
-#endif /* HPUX */
+ ACE_OSCALL (ACE_ADAPT_RETVAL (timeout == 0
+ ? ::pthread_cond_wait (cv, external_mutex)
+ : ::pthread_cond_timedwait (cv, external_mutex,
+ (ACE_TIMESPEC_PTR) &ts),
result),
- int, -1, result);
+ int, -1, result);
// We need to adjust this to make the POSIX and Solaris return
// values consistent.
if (result == -1 && errno == ETIMEDOUT)
errno = ETIME;
#elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL (ACE_ADAPT_RETVAL ((timeout == 0
- ? ::cond_wait (cv, external_mutex)
- : ::cond_timedwait (cv, external_mutex, &ts)), result),
+ ACE_OSCALL (ACE_ADAPT_RETVAL (timeout == 0
+ ? ::cond_wait (cv, external_mutex)
+ : ::cond_timedwait (cv, external_mutex, &ts), result),
int, -1, result);
#endif /* ACE_HAS_STHREADS */
timeout->set (ts); // Update the time value before returning.
@@ -1194,10 +1203,10 @@ ACE_OS::cond_wait (ACE_cond_t *cv,
// ACE_TRACE ("ACE_OS::cond_wait");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_wait (cv, external_mutex), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cond_wait (cv, external_mutex), ace_result_),
int, -1);
#elif defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_wait (cv, external_mutex), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::cond_wait (cv, external_mutex), ace_result_),
int, -1);
#elif defined (ACE_HAS_WTHREADS) || defined (VXWORKS)
// Note that it is ok to increment this because the <external_mutex>
@@ -1327,7 +1336,7 @@ ACE_OS::rw_rdlock (ACE_rwlock_t *rw)
// ACE_TRACE ("ACE_OS::rw_rdlock");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_rdlock (rw), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_rdlock (rw), ace_result_), int, -1);
#else // NT, POSIX, and VxWorks don't support this natively.
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
pthread_cleanup_push (ACE_OS::mutex_lock_cleanup, (void *) &rw->lock_);
@@ -1369,7 +1378,7 @@ ACE_OS::rw_tryrdlock (ACE_rwlock_t *rw)
// ACE_TRACE ("ACE_OS::rw_tryrdlock");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_tryrdlock (rw), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_tryrdlock (rw), ace_result_), int, -1);
#else // NT, POSIX, and VxWorks don't support this natively.
int result = -1;
@@ -1404,7 +1413,7 @@ ACE_OS::rw_trywrlock (ACE_rwlock_t *rw)
// ACE_TRACE ("ACE_OS::rw_trywrlock");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_trywrlock (rw), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_trywrlock (rw), ace_result_), int, -1);
#else // NT, POSIX, and VxWorks don't support this natively.
int result = -1;
@@ -1439,7 +1448,7 @@ ACE_OS::rw_unlock (ACE_rwlock_t *rw)
// ACE_TRACE ("ACE_OS::rw_unlock");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_unlock (rw), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_unlock (rw), ace_result_), int, -1);
#else // NT, POSIX, and VxWorks don't support this natively.
if (ACE_OS::mutex_lock (&rw->lock_) == -1)
return -1;
@@ -1483,7 +1492,7 @@ ACE_OS::rw_wrlock (ACE_rwlock_t *rw)
// ACE_TRACE ("ACE_OS::rw_wrlock");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_wrlock (rw), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rw_wrlock (rw), ace_result_), int, -1);
#else // NT, POSIX, and VxWorks don't support this natively.
#if defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
pthread_cleanup_push (ACE_OS::mutex_lock_cleanup, (void *) &rw->lock_);
@@ -1527,9 +1536,11 @@ ACE_OS::rwlock_init (ACE_rwlock_t *rw,
void *arg)
{
// ACE_TRACE ("ACE_OS::rwlock_init");
+ type = type;
+ name = name;
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_init (rw, type, arg), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_init (rw, type, arg), ace_result_), int, -1);
#else // NT, POSIX, and VxWorks don't support this natively.
int result = -1;
@@ -1566,7 +1577,7 @@ ACE_OS::rwlock_destroy (ACE_rwlock_t *rw)
// ACE_TRACE ("ACE_OS::rwlock_destroy");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_destroy (rw), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::rwlock_destroy (rw), ace_result_), int, -1);
#else // NT, POSIX, and VxWorks don't support this natively.
ACE_OS::mutex_destroy (&rw->lock_);
ACE_OS::cond_destroy (&rw->waiting_readers_);
@@ -1618,7 +1629,7 @@ ACE_INLINE int
ACE_OS::event_destroy (ACE_event_t *event)
{
#if defined (ACE_WIN32)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (*event), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (*event), ace_result_), int, -1);
#elif defined (ACE_HAS_THREADS)
int r1 = ACE_OS::mutex_destroy (&event->lock_);
int r2 = ACE_OS::cond_destroy (&event->condition_);
@@ -1766,7 +1777,7 @@ ACE_INLINE int
ACE_OS::event_signal (ACE_event_t *event)
{
#if defined (ACE_WIN32)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::SetEvent (*event), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::SetEvent (*event), ace_result_), int, -1);
#elif defined (ACE_HAS_THREADS)
int result = 0;
int wakeup_failed = 0;
@@ -1823,7 +1834,7 @@ ACE_INLINE int
ACE_OS::event_pulse (ACE_event_t *event)
{
#if defined (ACE_WIN32)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::PulseEvent (*event), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::PulseEvent (*event), ace_result_), int, -1);
#elif defined (ACE_HAS_THREADS)
int result = 0;
int wakeup_failed = 0;
@@ -1873,7 +1884,7 @@ ACE_INLINE int
ACE_OS::event_reset (ACE_event_t *event)
{
#if defined (ACE_WIN32)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::ResetEvent (*event), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::ResetEvent (*event), ace_result_), int, -1);
#elif defined (ACE_HAS_THREADS)
// Grab the lock first.
if (ACE_OS::mutex_lock (&event->lock_) != 0)
@@ -1891,8 +1902,8 @@ ACE_OS::event_reset (ACE_event_t *event)
#if defined (ACE_WIN32)
#define ACE_SOCKCALL_RETURN(OP,TYPE,FAILVALUE) \
- do { TYPE _result = (TYPE) OP; \
- if ((ACE_SOCKET) _result == SOCKET_ERROR) { errno = ::WSAGetLastError (); return (TYPE) FAILVALUE; } else return _result; \
+ do { TYPE ace_result_ = (TYPE) OP; \
+ if ((ACE_SOCKET) ace_result_ == SOCKET_ERROR) { errno = ::WSAGetLastError (); return (TYPE) FAILVALUE; } else return ace_result_; \
} while (0)
#else
#define ACE_SOCKCALL_RETURN(OP,TYPE,FAILVALUE) ACE_OSCALL_RETURN(OP,TYPE,FAILVALUE)
@@ -1997,6 +2008,7 @@ ACE_OS::strtok_r (char *s, const char *tokens, char **lasts)
#if defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE)
return ::strtok_r (s, tokens, lasts);
#else
+ lasts = lasts;
return ::strtok (s, tokens);
#endif /* (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE) */
}
@@ -2624,7 +2636,7 @@ ACE_OS::sema_destroy (ACE_sema_t *s)
{
ACE_OS::free ((void *) s->name_);
ACE_OSCALL (ACE_ADAPT_RETVAL (::sem_unlink (s->name_), result), int, -1, result);
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_close (s->sema_), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_close (s->sema_), ace_result_), int, -1);
}
else
{
@@ -2635,13 +2647,13 @@ ACE_OS::sema_destroy (ACE_sema_t *s)
}
#elif defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_destroy (s), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_destroy (s), ace_result_), int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
int r1 = ACE_OS::mutex_destroy (&s->lock_);
int r2 = ACE_OS::cond_destroy (&s->count_nonzero_);
return r1 != 0 || r2 != 0 ? -1 : 0;
#elif defined (ACE_HAS_WTHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (*s), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::CloseHandle (*s), ace_result_), int, -1);
#endif /* ACE_HAS_STHREADS */
#else
ACE_NOTSUP_RETURN (-1);
@@ -2653,6 +2665,8 @@ ACE_OS::sema_init (ACE_sema_t *s, u_int count, int type,
LPCTSTR name, void *arg, int max)
{
// ACE_TRACE ("ACE_OS::sema_init");
+ name = name;
+ max = max;
#if defined (ACE_HAS_POSIX_SEM)
if (name)
{
@@ -2664,12 +2678,12 @@ ACE_OS::sema_init (ACE_sema_t *s, u_int count, int type,
{
s->name_ = 0;
ACE_NEW_RETURN (s->sema_, sem_t, -1);
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_init (s->sema_, type != USYNC_THREAD, count), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_init (s->sema_, type != USYNC_THREAD, count), ace_result_),
int, -1);
}
#elif defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_init (s, count, type, arg), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_init (s, count, type, arg), ace_result_),
int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
int result = -1;
@@ -2710,10 +2724,10 @@ ACE_OS::sema_post (ACE_sema_t *s)
{
// ACE_TRACE ("ACE_OS::sema_post");
#if defined (ACE_HAS_POSIX_SEM)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_post (s->sema_), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_post (s->sema_), ace_result_), int, -1);
#elif defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_post (s), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_post (s), ace_result_), int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
int result = -1;
@@ -2734,7 +2748,7 @@ ACE_OS::sema_post (ACE_sema_t *s)
return result;
#elif defined (ACE_HAS_WTHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::ReleaseSemaphore (*s, 1, 0),
- _result),
+ ace_result_),
int, -1);
#endif /* ACE_HAS_STHREADS */
#else
@@ -2748,13 +2762,13 @@ ACE_OS::sema_trywait (ACE_sema_t *s)
// ACE_TRACE ("ACE_OS::sema_trywait");
#if defined (ACE_HAS_POSIX_SEM)
// POSIX semaphores set errno to EAGAIN if trywait fails
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_trywait (s->sema_), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_trywait (s->sema_), ace_result_),
int, -1);
#elif defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
// STHREADS semaphores set errno to EBUSY if trywait fails
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_trywait (s),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
@@ -2796,10 +2810,10 @@ ACE_OS::sema_wait (ACE_sema_t *s)
{
// ACE_TRACE ("ACE_OS::sema_wait");
#if defined (ACE_HAS_POSIX_SEM)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_wait (s->sema_), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sem_wait (s->sema_), ace_result_), int, -1);
#elif defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_wait (s), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sema_wait (s), ace_result_), int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
int result = 0;
@@ -2867,13 +2881,13 @@ ACE_OS::thr_continue (ACE_hthread_t target_thread)
// ACE_TRACE ("ACE_OS::thr_continue");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_continue (target_thread), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_continue (target_thread), ace_result_), int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
ACE_NOTSUP_RETURN (-1);
#elif defined (ACE_HAS_WTHREADS)
return ::ResumeThread (target_thread) != ACE_SYSCALL_FAILED ? 0 : -1;
#elif defined (VXWORKS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::taskResume (target_thread), _result), int, ERROR);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::taskResume (target_thread), ace_result_), int, ERROR);
#endif /* ACE_HAS_STHREADS */
#else
ACE_NOTSUP_RETURN (-1);
@@ -2939,7 +2953,7 @@ ACE_OS::thr_getprio (ACE_hthread_t thr_id, int *prio)
// ACE_TRACE ("ACE_OS::thr_getprio");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getprio (thr_id, prio), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getprio (thr_id, prio), ace_result_), int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
ACE_NOTSUP_RETURN (-1);
#elif defined (ACE_HAS_WTHREADS)
@@ -2947,7 +2961,7 @@ ACE_OS::thr_getprio (ACE_hthread_t thr_id, int *prio)
int result = ::GetThreadPriority (thr_id);
return result == THREAD_PRIORITY_ERROR_RETURN ? -1 : result;
#elif defined (VXWORKS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::taskPriorityGet (thr_id, prio), _result), int, ERROR);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::taskPriorityGet (thr_id, prio), ace_result_), int, ERROR);
#endif /* ACE_HAS_STHREADS */
#else
ACE_NOTSUP_RETURN (-1);
@@ -2960,7 +2974,7 @@ ACE_OS::thr_getspecific (ACE_thread_key_t key, void **data)
// ACE_TRACE ("ACE_OS::thr_getspecific");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getspecific (key, data), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_getspecific (key, data), ace_result_), int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
#if !defined (ACE_HAS_FSU_PTHREADS) && !defined (ACE_HAS_SETKIND_NP)
*data = ::pthread_getspecific (key);
@@ -2990,10 +3004,10 @@ ACE_OS::thr_join (ACE_thread_t waiter_id, ACE_thread_t *thr_id, void **status)
// ACE_TRACE ("ACE_OS::thr_join");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_join (waiter_id, thr_id, status), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_join (waiter_id, thr_id, status), ace_result_),
int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_join (waiter_id, status), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_join (waiter_id, status), ace_result_),
int, -1);
#elif defined (ACE_HAS_WTHREADS)
ACE_NOTSUP_RETURN (-1);
@@ -3009,6 +3023,8 @@ ACE_INLINE int
ACE_OS::thr_join (ACE_hthread_t thr_handle, void **status)
{
// ACE_TRACE ("ACE_OS::thr_join");
+ thr_handle = thr_handle;
+ status = status;
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
ACE_NOTSUP_RETURN (-1);
@@ -3043,11 +3059,11 @@ ACE_OS::thr_setcancelstate (int new_state, int *old_state)
#if defined (ACE_HAS_DCETHREADS) || (defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_STHREADS))
#if defined (ACE_HAS_SETKIND_NP)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setcancel (new_state),
- _result),
+ ace_result_),
int, -1);
#else /* ACE_HAS_SETKIND_NP */
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setcancelstate (new_state, old_state),
- _result),
+ ace_result_),
int, -1);
#endif /* ACE_HAS_SETKIND_NP */
#elif defined (ACE_HAS_PTHREADS)
@@ -3075,11 +3091,11 @@ ACE_OS::thr_setcanceltype (int new_type, int *old_type)
#if defined (ACE_HAS_DCETHREADS) || (defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_STHREADS))
#if defined (ACE_HAS_SETKIND_NP)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setcancel (new_type),
- _result),
+ ace_result_),
int, -1);
#else /* ACE_HAS_SETKIND_NP */
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_setcanceltype (new_type, old_type),
- _result),
+ ace_result_),
int, -1);
#endif /* ACE_HAS_SETKIND_NP */
#elif defined (ACE_HAS_PTHREADS)
@@ -3106,7 +3122,7 @@ ACE_OS::thr_cancel (ACE_thread_t t_id)
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_DCETHREADS) || (defined (ACE_HAS_PTHREADS) && defined (ACE_HAS_STHREADS))
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_cancel(t_id),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_PTHREADS)
// I didn't manage to find pthread_cancel anywhere int the MIT
@@ -3129,19 +3145,20 @@ ACE_INLINE int
ACE_OS::sigwait (sigset_t *set, int *sig)
{
// ACE_TRACE ("ACE_OS::sigwait");
+ sig = sig;
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS) || defined (ACE_HAS_FSU_PTHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sigwait (set),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
#if defined (ACE_HAS_SETKIND_NP)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sigwait (set),
- _result),
+ ace_result_),
int, -1);
#else /* ACE_HAS_SETKIND_NP */
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sigwait (set, sig),
- _result),
+ ace_result_),
int, -1);
#endif /* ACE_HAS_SETKIND_NP */
#elif defined (ACE_HAS_WTHREADS)
@@ -3151,7 +3168,7 @@ ACE_OS::sigwait (sigset_t *set, int *sig)
// signal number is returned)
// third arg is timeout: NULL means forever
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sigtimedwait (set, NULL, NULL),
- _result),
+ ace_result_),
int, -1); // yes, the doc says -1, not ERROR
#endif /* ACE_HAS_STHREADS */
#else
@@ -3188,11 +3205,11 @@ ACE_OS::thr_sigsetmask (int how,
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_sigsetmask (how, nsm, osm),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_SETKIND_NP)
// ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sigaction (how, nsm, osm),
- // _result),
+ // ace_result_),
// int, -1);
// commented this out since nothing appropriate
// found in the man pages...
@@ -3200,20 +3217,20 @@ ACE_OS::thr_sigsetmask (int how,
#elif defined (ACE_HAS_DCETHREADS)
#if defined (ACE_HAS_PTHREADS_1003_DOT_1C)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_sigaction (how, nsm, osm),
- _result), int, -1);
+ ace_result_), int, -1);
#else
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::sigthreadmask (how, nsm, osm),
- _result), int, -1);
+ ace_result_), int, -1);
#endif /* ACE_HAS_PTHREADS_1003_DOT_1C */
#elif defined (ACE_HAS_PTHREADS) && !defined (ACE_HAS_FSU_PTHREADS)
#if defined (ACE_HAS_IRIX62_THREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_sigmask (how, nsm, osm),
- _result),int, -1);
+ ace_result_),int, -1);
#else
// as far as I can tell, this is now pthread_sigaction() -- jwr
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_sigaction (how, nsm, osm),
- _result), int, -1);
+ ace_result_), int, -1);
#endif /* ACE_HAS_IRIX62_THREADS */
#elif defined (ACE_HAS_WTHREADS)
ACE_NOTSUP_RETURN (-1);
@@ -3253,7 +3270,7 @@ ACE_OS::thr_min_stack (void)
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_min_stack (),
- _result),
+ ace_result_),
int, -1);
#elif (defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)) && !defined (ACE_HAS_SETKIND_NP)
#if defined (ACE_HAS_IRIX62_THREADS)
@@ -3291,11 +3308,11 @@ ACE_OS::thr_kill (ACE_thread_t thr_id, int signum)
#if defined (ACE_HAS_THREADS)
#if (defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)) && !defined (ACE_HAS_SETKIND_NP)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_kill (thr_id, signum),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_STHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_kill (thr_id, signum),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_WTHREADS)
ACE_NOTSUP_RETURN (-1);
@@ -3307,7 +3324,7 @@ ACE_OS::thr_kill (ACE_thread_t thr_id, int signum)
if ( tid == ERROR )
return -1;
else
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::kill (tid, signum), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::kill (tid, signum), ace_result_),
int, ERROR);
#else // This should not happen!
@@ -3365,7 +3382,7 @@ ACE_OS::thr_setconcurrency (int hint)
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setconcurrency (hint),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
ACE_NOTSUP_RETURN (-1);
@@ -3386,16 +3403,16 @@ ACE_OS::thr_setprio (ACE_hthread_t thr_id, int prio)
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_setprio (thr_id, prio),
- _result),
+ ace_result_),
int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
ACE_NOTSUP_RETURN (-1);
#elif defined (ACE_HAS_WTHREADS)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::SetThreadPriority (thr_id, prio),
- _result),
+ ace_result_),
int, -1);
#elif defined (VXWORKS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::taskPrioritySet (thr_id, prio), _result), int, ERROR);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::taskPrioritySet (thr_id, prio), ace_result_), int, ERROR);
#endif /* ACE_HAS_STHREADS */
#else
ACE_NOTSUP_RETURN (-1);
@@ -3408,7 +3425,7 @@ ACE_OS::thr_suspend (ACE_hthread_t target_thread)
// ACE_TRACE ("ACE_OS::thr_suspend");
#if defined (ACE_HAS_THREADS)
#if defined (ACE_HAS_STHREADS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_suspend (target_thread), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::thr_suspend (target_thread), ace_result_), int, -1);
#elif defined (ACE_HAS_DCETHREADS) || defined (ACE_HAS_PTHREADS)
ACE_NOTSUP_RETURN (-1);
#elif defined (ACE_HAS_WTHREADS)
@@ -3419,7 +3436,7 @@ ACE_OS::thr_suspend (ACE_hthread_t target_thread)
ACE_FAIL_RETURN (-1);
/* NOTREACHED */
#elif defined (VXWORKS)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::taskSuspend (target_thread), _result), int, ERROR);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::taskSuspend (target_thread), ace_result_), int, ERROR);
#endif /* ACE_HAS_STHREADS */
#else
ACE_NOTSUP_RETURN (-1);
@@ -3925,7 +3942,7 @@ ACE_OS::hostname (char name[], size_t maxnamelen)
// ACE_TRACE ("ACE_OS::uname");
#if defined (ACE_WIN32)
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::GetComputerName (name, LPDWORD (&maxnamelen)),
- _result), int, -1);
+ ace_result_), int, -1);
#else /* !ACE_WIN32 */
struct utsname host_info;
@@ -4023,7 +4040,7 @@ ACE_OS::dlclose (void *handle)
#endif /* ACE_HAS_AUTOMATIC_INIT_FINI */
ACE_OSCALL_RETURN (::dlclose (handle), int, -1);
#elif defined (ACE_WIN32)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::FreeLibrary (handle), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::FreeLibrary (handle), ace_result_), int, -1);
#else
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_HAS_SVR4_DYNAMIC_LINKING */
@@ -4143,6 +4160,7 @@ ACE_OS::write (ACE_HANDLE handle, const void *buf, size_t nbyte,
ACE_OVERLAPPED *overlapped)
{
// ACE_TRACE ("ACE_OS::write");
+ overlapped = overlapped;
#if defined (ACE_WIN32)
DWORD bytes_written; // This is set to 0 byte WriteFile.
@@ -4176,6 +4194,7 @@ ACE_OS::read (ACE_HANDLE handle, void *buf, size_t len,
ACE_OVERLAPPED *overlapped)
{
// ACE_TRACE ("ACE_OS::read");
+ overlapped = overlapped;
#if defined (ACE_WIN32)
DWORD ok_len;
return ::ReadFile (handle, buf, len, &ok_len, overlapped) ? (ssize_t) ok_len : -1;
@@ -4231,12 +4250,14 @@ ACE_OS::getrusage (int who, struct rusage *ru)
&dummy_2, // exited
&ru->ru_stime,
&ru->ru_utime),
- _result),
+ ace_result_),
int, -1);
#else
ACE_OSCALL_RETURN (::getrusage (who, ru), int, -1);
#endif /* ACE_WIN32 */
#else
+ who = who;
+ ru = ru;
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_HAS_SYSCALL_GETRUSAGE */
}
@@ -4310,6 +4331,7 @@ ACE_OS::mmap (void *addr,
else
return addr_mapping;
#elif !defined (ACE_LACKS_MMAP)
+ file_mapping = file_mapping;
ACE_OSCALL_RETURN ((void *) ::mmap ((ACE_MMAP_TYPE) addr, len,
prot, flags, file_handle, off),
void *, MAP_FAILED);
@@ -4342,7 +4364,7 @@ ACE_OS::msync (void *addr, size_t len, int sync)
{
// ACE_TRACE ("ACE_OS::msync");
#if defined (ACE_WIN32)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::FlushViewOfFile (addr, len), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::FlushViewOfFile (addr, len), ace_result_), int, -1);
#elif !defined (ACE_LACKS_MSYNC)
ACE_OSCALL_RETURN (::msync ((ACE_MMAP_TYPE) addr, len, sync), int, -1);
#else
@@ -4355,7 +4377,7 @@ ACE_OS::munmap (void *addr, size_t len)
{
// ACE_TRACE ("ACE_OS::munmap");
#if defined (ACE_WIN32)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::UnmapViewOfFile (addr), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::UnmapViewOfFile (addr), ace_result_), int, -1);
#elif !defined (ACE_LACKS_MMAP)
ACE_OSCALL_RETURN (::munmap ((ACE_MMAP_TYPE) addr, len), int, -1);
#else
@@ -4667,7 +4689,7 @@ ACE_OS::flock_wrlock (ACE_OS::flock_t *lock, short whence, off_t start, off_t le
if (len == 0)
len = ::GetFileSize (lock->handle_, NULL);
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::LockFileEx (lock->handle_, LOCKFILE_EXCLUSIVE_LOCK, 0, len, 0, &lock->overlapped_),
- _result), int, -1);
+ ace_result_), int, -1);
#elif defined (VXWORKS)
ACE_NOTSUP_RETURN (-1);
#else
@@ -4689,7 +4711,7 @@ ACE_OS::flock_rdlock (ACE_OS::flock_t *lock, short whence, off_t start, off_t le
if (len == 0)
len = ::GetFileSize (lock->handle_, NULL);
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::LockFileEx (lock->handle_, 0, 0, len, 0, &lock->overlapped_),
- _result), int, -1);
+ ace_result_), int, -1);
#elif defined (VXWORKS)
ACE_NOTSUP_RETURN (-1);
#else
@@ -4711,7 +4733,7 @@ ACE_OS::flock_trywrlock (ACE_OS::flock_t *lock, short whence, off_t start, off_t
if (len == 0)
len = ::GetFileSize (lock->handle_, NULL);
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::LockFileEx (lock->handle_, LOCKFILE_FAIL_IMMEDIATELY | LOCKFILE_EXCLUSIVE_LOCK, 0, len, 0, &lock->overlapped_),
- _result), int, -1);
+ ace_result_), int, -1);
#elif defined (VXWORKS)
ACE_NOTSUP_RETURN (-1);
#else
@@ -4734,7 +4756,7 @@ ACE_OS::flock_tryrdlock (ACE_OS::flock_t *lock, short whence, off_t start, off_t
if (len == 0)
len = ::GetFileSize (lock->handle_, NULL);
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::LockFileEx (lock->handle_, LOCKFILE_FAIL_IMMEDIATELY, 0, len, 0, &lock->overlapped_),
- _result), int, -1);
+ ace_result_), int, -1);
#elif defined (VXWORKS)
ACE_NOTSUP_RETURN (-1);
#else
@@ -4757,7 +4779,7 @@ ACE_OS::flock_unlock (ACE_OS::flock_t *lock, short whence, off_t start, off_t le
if (len == 0)
len = ::GetFileSize (lock->handle_, NULL);
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::UnlockFileEx (lock->handle_, 0, len, 0, &lock->overlapped_),
- _result), int, -1);
+ ace_result_), int, -1);
#elif defined (VXWORKS)
ACE_NOTSUP_RETURN (-1);
#else
@@ -4818,7 +4840,7 @@ ACE_OS::execvp (const char *file, char *const argv[])
}
ACE_INLINE int
-ACE_OS::execl (const char *path, const char *arg0, ...)
+ACE_OS::execl (const char */* path */, const char */* arg0 */, ...)
{
// ACE_TRACE ("ACE_OS::execl");
#if defined (ACE_WIN32) || defined (VXWORKS)
@@ -4831,7 +4853,7 @@ ACE_OS::execl (const char *path, const char *arg0, ...)
}
ACE_INLINE int
-ACE_OS::execle (const char *path, const char *arg0, ...)
+ACE_OS::execle (const char */* path */, const char * /* arg0 */, ...)
{
// ACE_TRACE ("ACE_OS::execle");
#if defined (ACE_WIN32) || defined (VXWORKS)
@@ -4844,7 +4866,7 @@ ACE_OS::execle (const char *path, const char *arg0, ...)
}
ACE_INLINE int
-ACE_OS::execlp (const char *file, const char *arg0, ...)
+ACE_OS::execlp (const char * /* file */, const char * /* arg0 */, ...)
{
// ACE_TRACE ("ACE_OS::execlp");
#if defined (ACE_WIN32) || defined (VXWORKS)
@@ -4888,7 +4910,7 @@ ACE_OS::ftruncate (ACE_HANDLE handle, off_t offset)
// ACE_TRACE ("ACE_OS::ftruncate");
#if defined (ACE_WIN32)
if (::SetFilePointer (handle, offset, NULL, FILE_BEGIN) != -1)
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::SetEndOfFile (handle), _result), int, -1);
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::SetEndOfFile (handle), ace_result_), int, -1);
else
ACE_FAIL_RETURN (-1);
/* NOTREACHED */
@@ -5098,7 +5120,7 @@ ACE_OS::ioctl (ACE_HANDLE handle, int cmd, void *val)
ACE_SOCKCALL_RETURN (::ioctlsocket (sock, cmd, (u_long *) val), int, -1);
#elif defined (VXWORKS)
// this may not work very well...
- ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::ioctl (handle, cmd, (int) val), _result),
+ ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::ioctl (handle, cmd, (int) val), ace_result_),
int, ERROR);
#else
ACE_OSCALL_RETURN (::ioctl (handle, cmd, val), int, -1);
diff --git a/ace/Proactor.cpp b/ace/Proactor.cpp
index 00db7991f7b..abb765b6997 100644
--- a/ace/Proactor.cpp
+++ b/ace/Proactor.cpp
@@ -30,10 +30,10 @@ public:
~ACE_Overlapped_IO (void);
// Death.
- int dispatch (u_long bytes_transfered);
+ int dispatch (u_long bytes_transferred);
// Callback the appropriate handle_* method on handler_.
- int initiate (u_long &bytes_transfered);
+ int initiate (u_long &bytes_transferred);
// Call ReadFile or Writefile.
operator ACE_OVERLAPPED * (void);
@@ -97,25 +97,25 @@ ACE_Overlapped_IO::~ACE_Overlapped_IO (void)
}
int
-ACE_Overlapped_IO::dispatch (u_long bytes_transfered)
+ACE_Overlapped_IO::dispatch (u_long bytes_transferred)
{
if (this->file_ != 0)
// Move the file pointer forward.
- file_->lseek (bytes_transfered, SEEK_CUR);
+ file_->lseek (bytes_transferred, SEEK_CUR);
if (this->mask_ == ACE_Event_Handler::WRITE_MASK)
{
// Update the message length to reflect what was sent.
- this->message_->rd_ptr (bytes_transfered);
+ this->message_->rd_ptr (bytes_transferred);
return handler_->handle_output_complete (this->message_,
- bytes_transfered);
+ bytes_transferred);
}
else // this->mask_ == ACE_Event_Handler::READ_MASK
{
// Update the message length to reflect what was received.
- this->message_->wr_ptr (bytes_transfered);
+ this->message_->wr_ptr (bytes_transferred);
return this->handler_->handle_input_complete (this->message_,
- bytes_transfered);
+ bytes_transferred);
}
}
@@ -123,7 +123,7 @@ ACE_Overlapped_IO::dispatch (u_long bytes_transfered)
// replace will generic ACE_OS calls.
int
-ACE_Overlapped_IO::initiate (u_long &bytes_transfered)
+ACE_Overlapped_IO::initiate (u_long &bytes_transferred)
{
#if defined (ACE_WIN32)
if (this->mask_ == ACE_Event_Handler::WRITE_MASK)
@@ -132,7 +132,7 @@ ACE_Overlapped_IO::initiate (u_long &bytes_transfered)
return ::WriteFile (this->handler_->get_handle (),
this->message_->rd_ptr (),
this->message_->length (),
- &bytes_transfered,
+ &bytes_transferred,
this);
}
else
@@ -141,10 +141,11 @@ ACE_Overlapped_IO::initiate (u_long &bytes_transfered)
return ::ReadFile (this->handler_->get_handle (),
this->message_->wr_ptr (),
this->message_->size (),
- &bytes_transfered,
+ &bytes_transferred,
this);
}
#else
+ bytes_transferred = bytes_transferred;
ACE_NOTSUP_RETURN (-1);
#endif
}
@@ -177,7 +178,7 @@ ACE_Proactor::close (void)
}
int
-ACE_Proactor::handle_signal (int index, siginfo_t *, ucontext_t *)
+ACE_Proactor::handle_signal (int, siginfo_t *, ucontext_t *)
{
ACE_TRACE ("ACE_Proactor::handle_signal");
@@ -224,7 +225,7 @@ ACE_Proactor::handle_events (ACE_Time_Value *how_long)
how_long = timer_queue_.calculate_timeout (how_long);
ACE_Overlapped_IO *overlapped = 0;
- u_long bytes_transfered = 0;
+ u_long bytes_transferred = 0;
#if defined (ACE_WIN32)
int error = 0;
@@ -235,7 +236,7 @@ ACE_Proactor::handle_events (ACE_Time_Value *how_long)
BOOL result;
result = ::GetQueuedCompletionStatus (this->completion_port_,
- &bytes_transfered,
+ &bytes_transferred,
(u_long *) &io_handle,
(ACE_OVERLAPPED **) &overlapped,
how_long == 0 ? INFINITE : how_long->msec ());
@@ -288,7 +289,7 @@ ACE_Proactor::handle_events (ACE_Time_Value *how_long)
// when operations fail, but they still need to be dispatched.
// Should we propogate this to the handler somehow? Maybe an extra
// failed/succeeded flag in the dispatch call?
- int dispatch_result = this->dispatch (overlapped, bytes_transfered);
+ int dispatch_result = this->dispatch (overlapped, bytes_transferred);
// Compute the time while the Proactor is processing.
ACE_Time_Value elapsed_time = ACE_OS::gettimeofday () - prev_time;
@@ -313,11 +314,11 @@ ACE_Proactor::handle_events (ACE_Time_Value *how_long)
// Returns 0 or 1 on success, -1 on failure.
int
ACE_Proactor::dispatch (ACE_Overlapped_IO *overlapped,
- u_long bytes_transfered)
+ u_long bytes_transferred)
{
// Call back the Event_Handler and do what it wants based on the
// return value.
- int dispatch_result = overlapped->dispatch (bytes_transfered);
+ int dispatch_result = overlapped->dispatch (bytes_transferred);
switch (dispatch_result)
{
@@ -368,7 +369,7 @@ int
ACE_Proactor::initiate (ACE_Overlapped_IO *overlapped)
{
#if defined (ACE_WIN32)
- u_long bytes_transfered = 0;
+ u_long bytes_transferred = 0;
ACE_HANDLE io_handle = overlapped->handler_->get_handle ();
ACE_HANDLE cp;
@@ -394,7 +395,7 @@ ACE_Proactor::initiate (ACE_Overlapped_IO *overlapped)
// Initiate a WriteFile/ReadFile. If it succeeds, dispatch the
// handler.
- int initiate_result = overlapped->initiate (bytes_transfered);
+ int initiate_result = overlapped->initiate (bytes_transferred);
if (initiate_result)
// Return 1; the OVERLAPPED will still get queued.
@@ -408,7 +409,7 @@ ACE_Proactor::initiate (ACE_Overlapped_IO *overlapped)
case ERROR_NETNAME_DELETED:
// The OVERLAPPED will *not* get queued for this case. Thus, we
// have to dispatch immediately.
- return this->dispatch (overlapped, bytes_transfered);
+ return this->dispatch (overlapped, bytes_transferred);
case ERROR_IO_PENDING:
// The IO will complete proactively.
@@ -419,6 +420,7 @@ ACE_Proactor::initiate (ACE_Overlapped_IO *overlapped)
return -1;
}
#else
+ overlapped = overlapped;
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_WIN32 */
}
@@ -501,6 +503,13 @@ ACE_Overlapped_File::open (const char *file_name,
return 0;
}
#else
+ file_name = file_name;
+ access = access;
+ share = share;
+ security = security;
+ creation = creation;
+ flags = flags;
+ template_file = template_file;
ACE_NOTSUP_RETURN (-1);
#endif /* ACE_WIN32 */
}
diff --git a/ace/Process.cpp b/ace/Process.cpp
index c2aa3ba9a84..d5aeb4effe1 100644
--- a/ace/Process.cpp
+++ b/ace/Process.cpp
@@ -2,6 +2,7 @@
// $Id$
#include "ace/Process.h"
+#include "ace/ARGV.h"
#if !defined (__ACE_INLINE__)
#include "ace/Process.i"
diff --git a/ace/Process.h b/ace/Process.h
index 094fa78216d..673c6c5290b 100644
--- a/ace/Process.h
+++ b/ace/Process.h
@@ -19,13 +19,6 @@
#define ACE_PROCESS_H
#include "ace/OS.h"
-#include "ace/ARGV.h"
-#include "ace/ACE.h"
-#include "ace/Mem_Map.h"
-#include "ace/Svc_Handler.h"
-#include "ace/Synch.h"
-#include "ace/Acceptor.h"
-#include "ace/SOCK_Acceptor.h"
class ACE_Export ACE_Process
// = TITLE
diff --git a/ace/README b/ace/README
index e39bd7a633c..83d029a3d9a 100644
--- a/ace/README
+++ b/ace/README
@@ -120,6 +120,7 @@ ACE_HAS_WIN32_TRYLOCK The Win32 platform support TryEnterCriticalSection()
ACE_HAS_XLI Platform has the XLI version of TLI
ACE_HAS_XT Platform has Xt and Motif
ACE_HAS_YIELD_VOID_PTR Platform requires pthread_yield() to take a NULL.
+ACE_LACKS_CONST_TIMESPEC_PTR Platform forgot const in cond_timewait (e.g., HP/UX).
ACE_LACKS_CONDATTR_PSHARED Platform has no implementation of pthread_condattr_setpshared(), even though it supports pthreads!
ACE_LACKS_MADVISE Platform lacks madvise() (e.g., Linux)
ACE_LACKS_MALLOC_H Platform lacks malloc.h
diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp
index 524e9cc434a..580bfe0b4ca 100644
--- a/ace/Reactor.cpp
+++ b/ace/Reactor.cpp
@@ -94,13 +94,13 @@ ACE_Handler_Repository::open (size_t size)
// Initialize a repository of the appropriate <size>.
ACE_Handler_Repository::ACE_Handler_Repository (void)
- : event_handlers_ (0),
- max_size_ (0),
+ : max_size_ (0),
#if defined (ACE_WIN32)
- cur_size_ (0)
+ cur_size_ (0),
#else
- max_handlep1_ (ACE_INVALID_HANDLE)
+ max_handlep1_ (ACE_INVALID_HANDLE),
#endif /* ACE_WIN32 */
+ event_handlers_ (0)
{
ACE_TRACE ("ACE_Handler_Repository::ACE_Handler_Repository");
}
@@ -886,13 +886,13 @@ ACE_Reactor::open (size_t size,
}
ACE_Reactor::ACE_Reactor (ACE_Sig_Handler *sh)
- : timer_skew_ (0, ACE_TIMER_SKEW),
+ : timer_queue_ (0),
+ requeue_position_ (-1), // Requeue at end of waiters by default.
initialized_ (0),
- timer_queue_ (0),
- requeue_position_ (-1) // Requeue at end of waiters by default.
#if defined (ACE_MT_SAFE)
- , token_ (*this)
+ token_ (*this),
#endif /* ACE_MT_SAFE */
+ timer_skew_ (0, ACE_TIMER_SKEW)
{
ACE_TRACE ("ACE_Reactor::ACE_Reactor");
if (this->open (ACE_Reactor::DEFAULT_SIZE, 0, sh))
@@ -902,13 +902,13 @@ ACE_Reactor::ACE_Reactor (ACE_Sig_Handler *sh)
// Initialize the new ACE_Reactor.
ACE_Reactor::ACE_Reactor (size_t size, int rs, ACE_Sig_Handler *sh)
- : timer_skew_ (0, ACE_TIMER_SKEW),
+ : timer_queue_ (0),
+ requeue_position_ (-1), // Requeue at end of waiters by default.
initialized_ (0),
- timer_queue_ (0),
- requeue_position_ (-1) // Requeue at end of waiters by default.
#if defined (ACE_MT_SAFE)
- , token_ (*this)
+ token_ (*this),
#endif /* ACE_MT_SAFE */
+ timer_skew_ (0, ACE_TIMER_SKEW)
{
ACE_TRACE ("ACE_Reactor::ACE_Reactor");
if (this->open (size, rs, sh) == -1)
@@ -1612,3 +1612,8 @@ ACE_Reactor::check_handles (void)
return result;
}
+
+#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION)
+template class ACE_Guard<ACE_Token>;
+#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */
+
diff --git a/ace/Remote_Tokens.cpp b/ace/Remote_Tokens.cpp
index e07b91a70ca..743eb593c64 100644
--- a/ace/Remote_Tokens.cpp
+++ b/ace/Remote_Tokens.cpp
@@ -138,14 +138,12 @@ ACE_Remote_Token_Proxy::initiate_connection (void)
int
ACE_Remote_Token_Proxy::request_reply (ACE_Token_Request &request,
- ACE_Synch_Options &options)
+ ACE_Synch_Options &)
{
ACE_TRACE ("ACE_Remote_Token_Proxy::request_reply");
- void *buffer;
+ void *buffer;
ssize_t length;
-// request.dump ();
-
if ((length = request.encode (buffer)) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "encode failed"), -1);
@@ -355,14 +353,14 @@ ACE_Remote_Token_Proxy::release (ACE_Synch_Options &options)
}
int
-ACE_Remote_Token_Proxy::remove (ACE_Synch_Options &options)
+ACE_Remote_Token_Proxy::remove (ACE_Synch_Options &)
{
ACE_TRACE ("ACE_Remote_Token_Proxy::remove");
return 0;
}
void
-ACE_Remote_Token_Proxy::token_acquired (ACE_TPQ_Entry *e)
+ACE_Remote_Token_Proxy::token_acquired (ACE_TPQ_Entry *)
{
ACE_TRACE ("ACE_Remote_Token_Proxy::token_acquired");
ACE_DEBUG ((LM_DEBUG, "(%t) shadow token %s acquired\n",
diff --git a/ace/SOCK_Connector.cpp b/ace/SOCK_Connector.cpp
index ad904cd6c19..cacce366992 100644
--- a/ace/SOCK_Connector.cpp
+++ b/ace/SOCK_Connector.cpp
@@ -23,8 +23,8 @@ ACE_SOCK_Connector::connect (ACE_SOCK_Stream &new_stream,
ACE_Time_Value *timeout,
const ACE_Addr &local_sap,
int reuse_addr,
- int flags,
- int perms,
+ int /* flags */,
+ int /* perms */,
int protocol_family,
int protocol)
{
diff --git a/ace/SOCK_Dgram_Bcast.cpp b/ace/SOCK_Dgram_Bcast.cpp
index b38fe768e6f..aace0c07b60 100644
--- a/ace/SOCK_Dgram_Bcast.cpp
+++ b/ace/SOCK_Dgram_Bcast.cpp
@@ -209,7 +209,7 @@ ACE_SOCK_Dgram_Bcast::send (const void *buf,
ssize_t
ACE_SOCK_Dgram_Bcast::send (const iovec iov[],
size_t n,
- u_short port_number,
+ u_short /* port_number */,
int flags) const
{
ACE_TRACE ("ACE_SOCK_Dgram_Bcast::send");
diff --git a/ace/SOCK_IO.cpp b/ace/SOCK_IO.cpp
index a09be6ce5a6..3da79a7d6c9 100644
--- a/ace/SOCK_IO.cpp
+++ b/ace/SOCK_IO.cpp
@@ -33,6 +33,8 @@ ACE_SOCK_IO::recv (iovec *io_vec)
return io_vec->iov_len;
}
else
+#else
+ io_vec = io_vec;
#endif /* FIONREAD */
// Could return ACE_NOTSUP_RETURN
return 0;
diff --git a/ace/SOCK_Stream.h b/ace/SOCK_Stream.h
index 3eceece50c2..cde111fc63a 100644
--- a/ace/SOCK_Stream.h
+++ b/ace/SOCK_Stream.h
@@ -29,16 +29,13 @@ class ACE_Export ACE_SOCK_Stream : public ACE_SOCK_IO
// This adds additional wrapper methods atop the <ACE_SOCK_IO> class.
{
public:
- //= The following two methods use write and read system calls,
- //= which are faster than the send and recv library functions
- //= used by the following two methods.
+ //= The following two methods use write and read system calls.
ssize_t send_n (const void *buf, int n) const;
// Send n bytes, keep trying until n are sent.
ssize_t recv_n (void *buf, int n) const;
// Recv n bytes, keep trying until n are received.
- // = The following two methods use the send and recv system
- // = calls.
+ // = The following two methods use the send and recv system calls.
ssize_t send_n (const void *buf, int n, int flags) const;
// Send n bytes, keep trying until n are sent.
ssize_t recv_n (void *buf, int n, int flags) const;
diff --git a/ace/SString.cpp b/ace/SString.cpp
index 82889f8fa7a..77068413a12 100644
--- a/ace/SString.cpp
+++ b/ace/SString.cpp
@@ -15,9 +15,8 @@ ACE_ALLOC_HOOK_DEFINE(ACE_CString)
// Copy constructor.
ACE_CString::ACE_CString (const ACE_CString &s)
- : len_ (s.len_),
- allocator_ (s.allocator_)
-
+ : allocator_ (s.allocator_),
+ len_ (s.len_)
{
ACE_TRACE ("ACE_CString::ACE_CString");
@@ -51,8 +50,9 @@ ACE_CString::length (void) const
// Default constructor.
ACE_CString::ACE_CString (ACE_Allocator *allocator)
- : len_ (0), rep_ (0),
- allocator_ (allocator)
+ : allocator_ (allocator),
+ len_ (0),
+ rep_ (0)
{
ACE_TRACE ("ACE_CString::ACE_CString");
@@ -197,8 +197,8 @@ ACE_SString::length (void) const
// Copy constructor.
ACE_SString::ACE_SString (const ACE_SString &s)
- : len_ (s.len_),
- allocator_ (s.allocator_)
+ : allocator_ (s.allocator_),
+ len_ (s.len_)
{
ACE_TRACE ("ACE_SString::ACE_SString");
@@ -213,8 +213,10 @@ ACE_SString::ACE_SString (const ACE_SString &s)
// Default constructor.
ACE_SString::ACE_SString (ACE_Allocator *allocator)
- : allocator_ (allocator),
- len_ (0), rep_ (0)
+ : allocator_ (allocator),
+ len_ (0),
+ rep_ (0)
+
{
ACE_TRACE ("ACE_SString::ACE_SString");
@@ -275,7 +277,7 @@ ACE_SString::rep (char *s)
// Constructor that actually copies memory.
ACE_SString::ACE_SString (const char *s,
- ACE_Allocator *allocator)
+ ACE_Allocator *allocator)
: allocator_ (allocator)
{
ACE_TRACE ("ACE_SString::ACE_SString");
@@ -354,9 +356,9 @@ ACE_WString::dump (void) const
// Default constructor.
ACE_WString::ACE_WString (ACE_Allocator *allocator)
- : len_ (0),
- rep_ (0),
- allocator_ (allocator)
+ : allocator_ (allocator),
+ len_ (0),
+ rep_ (0)
{
ACE_TRACE ("ACE_WString::ACE_WString");
@@ -497,8 +499,8 @@ ACE_WString::length (void) const
// Copy constructor.
ACE_WString::ACE_WString (const ACE_WString &s)
-: len_ (s.len_),
- allocator_ (s.allocator_)
+ : allocator_ (s.allocator_),
+ len_ (s.len_)
{
ACE_TRACE ("ACE_WString::ACE_WString");
diff --git a/ace/SV_Shared_Memory.cpp b/ace/SV_Shared_Memory.cpp
index 8cfc1adc2c8..76a70f93b24 100644
--- a/ace/SV_Shared_Memory.cpp
+++ b/ace/SV_Shared_Memory.cpp
@@ -56,9 +56,9 @@ ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (key_t external_id,
// The "do nothing" constructor.
ACE_SV_Shared_Memory::ACE_SV_Shared_Memory (void)
- : segment_ptr_ (0),
- internal_id_ (0),
- size_ (0)
+ : internal_id_ (0),
+ size_ (0),
+ segment_ptr_ (0)
{
ACE_TRACE ("ACE_SV_Shared_Memory::ACE_SV_Shared_Memory");
}
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp
index fe316000bf0..8c5b91b40d7 100644
--- a/ace/Service_Repository.cpp
+++ b/ace/Service_Repository.cpp
@@ -18,8 +18,8 @@ ACE_Service_Repository::dump (void) const
ACE_Service_Repository::ACE_Service_Repository (void)
: service_vector_ (0),
- total_size_ (0),
- current_size_ (0)
+ current_size_ (0),
+ total_size_ (0)
{
ACE_TRACE ("ACE_Service_Repository::ACE_Service_Repository");
}
diff --git a/ace/Set.cpp b/ace/Set.cpp
index 85d5568149d..8f5b8dc0812 100644
--- a/ace/Set.cpp
+++ b/ace/Set.cpp
@@ -100,8 +100,6 @@ ACE_Fixed_Set<T, SIZE>::remove (const T &item)
{
if (this->search_structure_[i].item_ == item)
{
- size_t index = i;
-
// Mark this entry as being free.
this->search_structure_[i].is_free_ = 1;
@@ -268,8 +266,6 @@ ACE_Bounded_Set<T>::remove (const T &item)
{
if (this->search_structure_[i].item_ == item)
{
- size_t index = i;
-
// Mark this entry as being free.
this->search_structure_[i].is_free_ = 1;
diff --git a/ace/Signal.cpp b/ace/Signal.cpp
index 0c858aff023..fea398c7ee8 100644
--- a/ace/Signal.cpp
+++ b/ace/Signal.cpp
@@ -179,7 +179,7 @@ int
ACE_Sig_Handler::remove_handler (int signum,
ACE_Sig_Action *new_disp,
ACE_Sig_Action *old_disp,
- int sigkey)
+ int)
{
ACE_TRACE ("ACE_Sig_Handler::remove_handler");
ACE_MT (ACE_TSS_Guard<ACE_Recursive_Thread_Mutex> m (ACE_Sig_Handler::ace_sig_handler_lock_));
@@ -370,7 +370,7 @@ int
ACE_Sig_Handlers::register_handler (int signum,
ACE_Event_Handler *new_sh,
ACE_Sig_Action *new_disp,
- ACE_Event_Handler **old_sh,
+ ACE_Event_Handler **,
ACE_Sig_Action *old_disp)
{
ACE_TRACE ("ACE_Sig_Handlers::register_handler");
@@ -626,6 +626,7 @@ ACE_Sig_Handlers::handler (int signum, ACE_Event_Handler *new_sh)
}
#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION)
+template class ACE_TSS_Guard<ACE_Recursive_Thread_Mutex>;
template class ACE_Fixed_Set<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>;
template class ACE_Fixed_Set_Iterator<ACE_Event_Handler *, ACE_MAX_SIGNAL_HANDLERS>;
#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */
diff --git a/ace/Strategies.cpp b/ace/Strategies.cpp
index fc85d67e150..db7f8b6630d 100644
--- a/ace/Strategies.cpp
+++ b/ace/Strategies.cpp
@@ -7,24 +7,19 @@
#define ACE_BUILD_DLL
#include "ace/Strategies.h"
-#define SH SVC_HANDLER
-#define PR_AC_1 ACE_PEER_ACCEPTOR_1
-#define PR_AC_2 ACE_PEER_ACCEPTOR_2
-#define PR_AD ACE_PEER_ACCEPTOR_ADDR
-
ACE_ALLOC_HOOK_DEFINE(ACE_Singleton_Strategy)
-template <class SH> void
-ACE_Singleton_Strategy<SH>::dump (void) const
+template <class SVC_HANDLER> void
+ACE_Singleton_Strategy<SVC_HANDLER>::dump (void) const
{
- ACE_TRACE ("ACE_Singleton_Strategy<SH>::dump");
+ ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::dump");
}
-template <class SH> int
-ACE_Singleton_Strategy<SH>::open (SVC_HANDLER *sh,
+template <class SVC_HANDLER> int
+ACE_Singleton_Strategy<SVC_HANDLER>::open (SVC_HANDLER *sh,
ACE_Thread_Manager *)
{
- ACE_TRACE ("ACE_Singleton_Strategy<SH>::open");
+ ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::open");
if (this->svc_handler_ != 0)
delete this->svc_handler_;
@@ -32,123 +27,123 @@ ACE_Singleton_Strategy<SH>::open (SVC_HANDLER *sh,
return 0;
}
-template <class SH>
-ACE_Singleton_Strategy<SH>::ACE_Singleton_Strategy (SVC_HANDLER *sh,
- ACE_Thread_Manager *tm)
+template <class SVC_HANDLER>
+ACE_Singleton_Strategy<SVC_HANDLER>::ACE_Singleton_Strategy (SVC_HANDLER *sh,
+ ACE_Thread_Manager *tm)
: svc_handler_ (0)
{
- ACE_TRACE ("ACE_Singleton_Strategy<SH>::ACE_Singleton_Strategy");
+ ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::ACE_Singleton_Strategy");
this->open (sh, tm);
}
-template <class SH>
-ACE_Singleton_Strategy<SH>::~ACE_Singleton_Strategy (void)
+template <class SVC_HANDLER>
+ACE_Singleton_Strategy<SVC_HANDLER>::~ACE_Singleton_Strategy (void)
{
- ACE_TRACE ("ACE_Singleton_Strategy<SH>::~ACE_Singleton_Strategy");
+ ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::~ACE_Singleton_Strategy");
delete this->svc_handler_;
}
// Create a Singleton SVC_HANDLER by always returning the same
// SVC_HANDLER.
-template <class SH> SVC_HANDLER *
-ACE_Singleton_Strategy<SH>::make_svc_handler (void)
+template <class SVC_HANDLER> SVC_HANDLER *
+ACE_Singleton_Strategy<SVC_HANDLER>::make_svc_handler (void)
{
- ACE_TRACE ("ACE_Singleton_Strategy<SH>::make_svc_handler");
+ ACE_TRACE ("ACE_Singleton_Strategy<SVC_HANDLER>::make_svc_handler");
return this->svc_handler_;
}
ACE_ALLOC_HOOK_DEFINE(ACE_Creation_Strategy)
-template <class SH> void
-ACE_Creation_Strategy<SH>::dump (void) const
+template <class SVC_HANDLER> void
+ACE_Creation_Strategy<SVC_HANDLER>::dump (void) const
{
- ACE_TRACE ("ACE_Creation_Strategy<SH>::dump");
+ ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::dump");
}
-template <class SH> int
-ACE_Creation_Strategy<SH>::open (ACE_Thread_Manager *thr_mgr)
+template <class SVC_HANDLER> int
+ACE_Creation_Strategy<SVC_HANDLER>::open (ACE_Thread_Manager *thr_mgr)
{
- ACE_TRACE ("ACE_Creation_Strategy<SH>::open");
+ ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::open");
this->thr_mgr_ = thr_mgr;
return 0;
}
-template <class SH>
-ACE_Creation_Strategy<SH>::ACE_Creation_Strategy (ACE_Thread_Manager *thr_mgr)
+template <class SVC_HANDLER>
+ACE_Creation_Strategy<SVC_HANDLER>::ACE_Creation_Strategy (ACE_Thread_Manager *thr_mgr)
{
- ACE_TRACE ("ACE_Creation_Strategy<SH>::ACE_Creation_Strategy");
+ ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::ACE_Creation_Strategy");
this->open (thr_mgr);
}
// Default behavior is to make a new SVC_HANDLER, passing in the
// Thread_Manager (if any).
-template <class SH> SH *
-ACE_Creation_Strategy<SH>::make_svc_handler (void)
+template <class SVC_HANDLER> SVC_HANDLER *
+ACE_Creation_Strategy<SVC_HANDLER>::make_svc_handler (void)
{
- ACE_TRACE ("ACE_Creation_Strategy<SH>::make_svc_handler");
- return new SH (this->thr_mgr_);
+ ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::make_svc_handler");
+ return new SVC_HANDLER (this->thr_mgr_);
}
-template <class SH>
-ACE_Creation_Strategy<SH>::~ACE_Creation_Strategy (void)
+template <class SVC_HANDLER>
+ACE_Creation_Strategy<SVC_HANDLER>::~ACE_Creation_Strategy (void)
{
- ACE_TRACE ("ACE_Creation_Strategy<SH>::~ACE_Creation_Strategy");
+ ACE_TRACE ("ACE_Creation_Strategy<SVC_HANDLER>::~ACE_Creation_Strategy");
}
ACE_ALLOC_HOOK_DEFINE(ACE_DLL_Strategy)
-template <class SH> void
-ACE_DLL_Strategy<SH>::dump (void) const
+template <class SVC_HANDLER> void
+ACE_DLL_Strategy<SVC_HANDLER>::dump (void) const
{
- ACE_TRACE ("ACE_DLL_Strategy<SH>::dump");
+ ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::dump");
}
-template <class SH> int
-ACE_DLL_Strategy<SH>::open (const char svc_dll_info[],
- ACE_Service_Config *svc_config,
- ACE_Thread_Manager *thr_mgr)
+template <class SVC_HANDLER> int
+ACE_DLL_Strategy<SVC_HANDLER>::open (const char svc_dll_info[],
+ ACE_Service_Config *svc_config,
+ ACE_Thread_Manager *thr_mgr)
{
- ACE_TRACE ("ACE_DLL_Strategy<SH>::open");
+ ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::open");
this->inherited::open (thr_mgr);
this->svc_config_ = svc_config;
return 0;
}
-template <class SH>
-ACE_DLL_Strategy<SH>::ACE_DLL_Strategy (const char svc_dll_info[],
- ACE_Service_Config *sc,
- ACE_Thread_Manager *thr_mgr)
+template <class SVC_HANDLER>
+ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy (const char svc_dll_info[],
+ ACE_Service_Config *sc,
+ ACE_Thread_Manager *thr_mgr)
{
- ACE_TRACE ("ACE_DLL_Strategy<SH>::ACE_DLL_Strategy");
+ ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy");
if (this->open (svc_dll_info, sc, thr_mgr) == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "open"));
}
-template <class SH>
-ACE_DLL_Strategy<SH>::ACE_DLL_Strategy (void)
+template <class SVC_HANDLER>
+ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy (void)
{
- ACE_TRACE ("ACE_DLL_Strategy<SH>::ACE_DLL_Strategy");
+ ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::ACE_DLL_Strategy");
}
// Create a SVC_HANDLER by dynamically linking it from a DLL.
-template <class SH> SH *
-ACE_DLL_Strategy<SH>::make_svc_handler (void)
+template <class SVC_HANDLER> SVC_HANDLER *
+ACE_DLL_Strategy<SVC_HANDLER>::make_svc_handler (void)
{
- ACE_TRACE ("ACE_DLL_Strategy<SH>::make_svc_handler");
+ ACE_TRACE ("ACE_DLL_Strategy<SVC_HANDLER>::make_svc_handler");
// Open the shared library.
void *handle = (void *) ACE_OS::dlopen (this->shared_library_);
// Extract the factory function.
- SH *(*factory)(void) = (SH *(*)(void)) ACE_OS::dlsym (handle,
- this->factory_function_);
+ SVC_HANDLER *(*factory)(void) = (SVC_HANDLER *(*)(void)) ACE_OS::dlsym (handle,
+ this->factory_function_);
// Call the factory function to obtain the new SVC_Handler (should
// use RTTI here when it becomes available...)
- SH *svc_handler = (*factory)();
+ SVC_HANDLER *svc_handler = (*factory)();
if (svc_handler != 0)
{
@@ -164,21 +159,21 @@ ACE_DLL_Strategy<SH>::make_svc_handler (void)
ACE_ALLOC_HOOK_DEFINE(ACE_Concurrency_Strategy)
-template <class SH> void
-ACE_Concurrency_Strategy<SH>::dump (void) const
+template <class SVC_HANDLER> void
+ACE_Concurrency_Strategy<SVC_HANDLER>::dump (void) const
{
- ACE_TRACE ("ACE_Concurrency_Strategy<SH>::dump");
+ ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::dump");
}
// Default behavior is to activate the SVC_HANDLER by calling it's
// open() method, which allows the SVC_HANDLER to determine its own
// concurrency strategy.
-template <class SH> int
-ACE_Concurrency_Strategy<SH>::activate_svc_handler (SH *svc_handler,
+template <class SVC_HANDLER> int
+ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handler,
void *arg)
{
- ACE_TRACE ("ACE_Concurrency_Strategy<SH>::activate_svc_handler");
+ ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler");
// Delegate control to the application-specific service
// handler.
@@ -192,26 +187,26 @@ ACE_Concurrency_Strategy<SH>::activate_svc_handler (SH *svc_handler,
return 0;
}
-template <class SH>
-ACE_Concurrency_Strategy<SH>::~ACE_Concurrency_Strategy (void)
+template <class SVC_HANDLER>
+ACE_Concurrency_Strategy<SVC_HANDLER>::~ACE_Concurrency_Strategy (void)
{
- ACE_TRACE ("ACE_Concurrency_Strategy<SH>::~ACE_Concurrency_Strategy");
+ ACE_TRACE ("ACE_Concurrency_Strategy<SVC_HANDLER>::~ACE_Concurrency_Strategy");
}
ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Strategy)
-template <class SH> void
-ACE_Thread_Strategy<SH>::dump (void) const
+template <class SVC_HANDLER> void
+ACE_Thread_Strategy<SVC_HANDLER>::dump (void) const
{
- ACE_TRACE ("ACE_Thread_Strategy<SH>::dump");
+ ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::dump");
}
-template <class SH> int
-ACE_Thread_Strategy<SH>::open (ACE_Thread_Manager *thr_mgr,
+template <class SVC_HANDLER> int
+ACE_Thread_Strategy<SVC_HANDLER>::open (ACE_Thread_Manager *thr_mgr,
long thr_flags,
int n_threads)
{
- ACE_TRACE ("ACE_Thread_Strategy<SH>::open");
+ ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::open");
this->thr_mgr_ = thr_mgr;
this->n_threads_ = n_threads;
this->thr_flags_ = thr_flags;
@@ -224,32 +219,32 @@ ACE_Thread_Strategy<SH>::open (ACE_Thread_Manager *thr_mgr,
return 0;
}
-template <class SH>
-ACE_Thread_Strategy<SH>::ACE_Thread_Strategy (ACE_Thread_Manager *thr_mgr,
+template <class SVC_HANDLER>
+ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy (ACE_Thread_Manager *thr_mgr,
long thr_flags,
int n_threads)
{
- ACE_TRACE ("ACE_Thread_Strategy<SH>::ACE_Thread_Strategy");
+ ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy");
this->open (thr_mgr, thr_flags, n_threads);
}
-template <class SH>
-ACE_Thread_Strategy<SH>::ACE_Thread_Strategy (void)
+template <class SVC_HANDLER>
+ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy (void)
{
- ACE_TRACE ("ACE_Thread_Strategy<SH>::ACE_Thread_Strategy");
+ ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::ACE_Thread_Strategy");
}
-template <class SH>
-ACE_Thread_Strategy<SH>::~ACE_Thread_Strategy (void)
+template <class SVC_HANDLER>
+ACE_Thread_Strategy<SVC_HANDLER>::~ACE_Thread_Strategy (void)
{
- ACE_TRACE ("ACE_Thread_Strategy<SH>::~ACE_Thread_Strategy");
+ ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::~ACE_Thread_Strategy");
}
-template <class SH> int
-ACE_Thread_Strategy<SH>::activate_svc_handler (SH *svc_handler,
+template <class SVC_HANDLER> int
+ACE_Thread_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handler,
void *arg)
{
- ACE_TRACE ("ACE_Thread_Strategy<SH>::activate_svc_handler");
+ ACE_TRACE ("ACE_Thread_Strategy<SVC_HANDLER>::activate_svc_handler");
// Call up to our parent to do the SVC_HANDLER initialization.
if (this->inherited::activate_svc_handler (svc_handler, arg) == -1)
return -1;
@@ -261,39 +256,41 @@ ACE_Thread_Strategy<SH>::activate_svc_handler (SH *svc_handler,
ACE_ALLOC_HOOK_DEFINE(ACE_Accept_Strategy)
-template <class SH, PR_AC_1> void
-ACE_Accept_Strategy<SH, PR_AC_2>::dump (void) const
-{
- ACE_TRACE ("ACE_Accept_Strategy<SH, PR_AC_2>::dump");
-}
-
-template <class SH, PR_AC_1> int
-ACE_Accept_Strategy<SH, PR_AC_2>::open (const PR_AD &local_addr,
- int restart)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy
+ (const ACE_PEER_ACCEPTOR_ADDR &local_addr, int restart)
{
- ACE_TRACE ("ACE_Accept_Strategy<SH, PR_AC_2>::open");
return this->peer_acceptor_.open (local_addr, restart);
}
-template <class SH, PR_AC_1>
-ACE_Accept_Strategy<SH, PR_AC_2>::ACE_Accept_Strategy (const PR_AD &local_addr,
- int restart)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::open
+ (const ACE_PEER_ACCEPTOR_ADDR &local_addr, int restart)
{
- ACE_TRACE ("ACE_Accept_Strategy<SH, PR_AC_2>::ACE_Accept_Strategy");
+ ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy");
+
if (this->open (local_addr, restart) == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "open"));
}
-template <class SH, PR_AC_1>
-ACE_Accept_Strategy<SH, PR_AC_2>::ACE_Accept_Strategy (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> void
+ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump (void) const
+{
+ ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::dump");
+}
+
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy (void)
{
- ACE_TRACE ("ACE_Accept_Strategy<SH, PR_AC_2>::ACE_Accept_Strategy");
+ ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Accept_Strategy");
}
-template <class SH, PR_AC_1> int
-ACE_Accept_Strategy<SH, PR_AC_2>::accept_svc_handler (SH *svc_handler)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> int
+ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
+ (SVC_HANDLER *svc_handler)
{
- ACE_TRACE ("ACE_Accept_Strategy<SH, PR_AC_2>::accept_svc_handler");
+ ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler");
+
if (this->peer_acceptor_.accept (*svc_handler) == -1)
{
svc_handler->close (0);
@@ -303,69 +300,69 @@ ACE_Accept_Strategy<SH, PR_AC_2>::accept_svc_handler (SH *svc_handler)
return 0;
}
-template <class SH, PR_AC_1> ACE_HANDLE
-ACE_Accept_Strategy<SH, PR_AC_2>::get_handle (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_HANDLE
+ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle (void) const
{
- ACE_TRACE ("ACE_Accept_Strategy<SH, PR_AC_2>::get_handle");
+ ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::get_handle");
return this->peer_acceptor_.get_handle ();
}
-template <class SH, PR_AC_1> ACE_PEER_ACCEPTOR &
-ACE_Accept_Strategy<SH, PR_AC_2>::acceptor (void) const
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> ACE_PEER_ACCEPTOR &
+ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor (void) const
{
- ACE_TRACE ("ACE_Accept_Strategy<SH, PR_AC_2>::acceptor");
+ ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::acceptor");
return (ACE_PEER_ACCEPTOR &) this->peer_acceptor_;
}
-template <class SH, PR_AC_1>
-ACE_Accept_Strategy<SH, PR_AC_2>::~ACE_Accept_Strategy (void)
+template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
+ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Accept_Strategy (void)
{
- ACE_TRACE ("ACE_Accept_Strategy<SH, PR_AC_2>::~ACE_Accept_Strategy");
+ ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::~ACE_Accept_Strategy");
if (this->peer_acceptor_.close () == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "close"));
}
ACE_ALLOC_HOOK_DEFINE(ACE_Process_Strategy)
-template <class SH> void
-ACE_Process_Strategy<SH>::dump (void) const
+template <class SVC_HANDLER> void
+ACE_Process_Strategy<SVC_HANDLER>::dump (void) const
{
- ACE_TRACE ("ACE_Process_Strategy<SH>::dump");
+ ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::dump");
}
-template <class SH> int
-ACE_Process_Strategy<SH>::open (int n_processes)
+template <class SVC_HANDLER> int
+ACE_Process_Strategy<SVC_HANDLER>::open (int n_processes)
{
- ACE_TRACE ("ACE_Process_Strategy<SH>::open");
+ ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::open");
this->n_processes_ = n_processes;
return 0;
}
-template <class SH>
-ACE_Process_Strategy<SH>::ACE_Process_Strategy (int n_processes)
+template <class SVC_HANDLER>
+ACE_Process_Strategy<SVC_HANDLER>::ACE_Process_Strategy (int n_processes)
{
- ACE_TRACE ("ACE_Process_Strategy<SH>::ACE_Process_Strategy");
+ ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::ACE_Process_Strategy");
this->open (thr_mgr, thr_flags, n_threads);
}
-template <class SH>
-ACE_Process_Strategy<SH>::ACE_Process_Strategy (void)
+template <class SVC_HANDLER>
+ACE_Process_Strategy<SVC_HANDLER>::ACE_Process_Strategy (void)
{
- ACE_TRACE ("ACE_Process_Strategy<SH>::ACE_Process_Strategy");
+ ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::ACE_Process_Strategy");
}
-template <class SH>
-ACE_Process_Strategy<SH>::~ACE_Process_Strategy (void)
+template <class SVC_HANDLER>
+ACE_Process_Strategy<SVC_HANDLER>::~ACE_Process_Strategy (void)
{
- ACE_TRACE ("ACE_Process_Strategy<SH>::~ACE_Process_Strategy");
+ ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::~ACE_Process_Strategy");
}
-template <class SH> int
-ACE_Process_Strategy<SH>::activate_svc_handler (SH *svc_handler,
- void *arg)
+template <class SVC_HANDLER> int
+ACE_Process_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *svc_handler,
+ void *arg)
{
- ACE_TRACE ("ACE_Process_Strategy<SH>::activate_svc_handler");
+ ACE_TRACE ("ACE_Process_Strategy<SVC_HANDLER>::activate_svc_handler");
switch (ACE_OS::fork ())
{
case -1:
@@ -381,18 +378,18 @@ ACE_Process_Strategy<SH>::activate_svc_handler (SH *svc_handler,
}
}
-template <class SH>
-ACE_Scheduling_Strategy<SH>::ACE_Scheduling_Strategy (SH *scheduler)
+template <class SVC_HANDLER>
+ACE_Scheduling_Strategy<SVC_HANDLER>::ACE_Scheduling_Strategy (SVC_HANDLER *scheduler)
: scheduler_ (scheduler),
delete_scheduler_ (0)
{
- ACE_TRACE ("ACE_Scheduling_Strategy<SH>::ACE_Scheduling_Strategy");
+ ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::ACE_Scheduling_Strategy");
if (this->scheduler_ == 0)
{
// Create a new SVC_HANDLER and assign the global Thread_Manager
// and Reactor to it...
- ACE_NEW (this->scheduler_, SH);
+ ACE_NEW (this->scheduler_, SVC_HANDLER);
if (this->scheduler_->thr_mgr () == 0)
this->scheduler_->thr_mgr (ACE_Service_Config::thr_mgr ());
@@ -404,19 +401,19 @@ ACE_Scheduling_Strategy<SH>::ACE_Scheduling_Strategy (SH *scheduler)
}
}
-template <class SH>
-ACE_Scheduling_Strategy<SH>::~ACE_Scheduling_Strategy (void)
+template <class SVC_HANDLER>
+ACE_Scheduling_Strategy<SVC_HANDLER>::~ACE_Scheduling_Strategy (void)
{
- ACE_TRACE ("ACE_Scheduling_Strategy<SH>::~ACE_Scheduling_Strategy");
+ ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::~ACE_Scheduling_Strategy");
if (this->delete_scheduler_)
this->scheduler_->destroy ();
}
-template <class SH> void
-ACE_Scheduling_Strategy<SH>::dump (void) const
+template <class SVC_HANDLER> void
+ACE_Scheduling_Strategy<SVC_HANDLER>::dump (void) const
{
- ACE_TRACE ("ACE_Scheduling_Strategy<SH>::dump");
+ ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, "scheduler_ = %x", this->scheduler_));
@@ -424,81 +421,78 @@ ACE_Scheduling_Strategy<SH>::dump (void) const
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
}
-template <class SH> int
-ACE_Scheduling_Strategy<SH>::suspend (void)
+template <class SVC_HANDLER> int
+ACE_Scheduling_Strategy<SVC_HANDLER>::suspend (void)
{
- ACE_TRACE ("ACE_Scheduling_Strategy<SH>::suspend");
+ ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::suspend");
return -1;
}
-template <class SH> int
-ACE_Scheduling_Strategy<SH>::resume (void)
+template <class SVC_HANDLER> int
+ACE_Scheduling_Strategy<SVC_HANDLER>::resume (void)
{
- ACE_TRACE ("ACE_Scheduling_Strategy<SH>::resume");
+ ACE_TRACE ("ACE_Scheduling_Strategy<SVC_HANDLER>::resume");
return -1;
}
-template <class SH>
-ACE_Schedule_All_Reactive_Strategy<SH>::ACE_Schedule_All_Reactive_Strategy (SH *scheduler)
- : ACE_Scheduling_Strategy<SH> (scheduler)
+template <class SVC_HANDLER>
+ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::ACE_Schedule_All_Reactive_Strategy
+ (SVC_HANDLER *scheduler)
+ : ACE_Scheduling_Strategy<SVC_HANDLER> (scheduler)
{
- ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SH>::ACE_Schedule_All_Reactive_Strategy");
+ ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::ACE_Schedule_All_Reactive_Strategy");
}
-template <class SH> int
-ACE_Schedule_All_Reactive_Strategy<SH>::suspend (void)
+template <class SVC_HANDLER> int
+ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::suspend (void)
{
- ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SH>::suspend");
+ ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::suspend");
return this->scheduler_->reactor ()->suspend_handlers ();
}
-template <class SH> void
-ACE_Schedule_All_Reactive_Strategy<SH>::dump (void) const
+template <class SVC_HANDLER> void
+ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::dump (void) const
{
- ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SH>::dump");
+ ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::dump");
- ACE_Scheduling_Strategy<SH>::dump ();
+ ACE_Scheduling_Strategy<SVC_HANDLER>::dump ();
}
template <class SVC_HANDLER> int
-ACE_Schedule_All_Reactive_Strategy<SH>::resume (void)
+ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::resume (void)
{
- ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SH>::resume");
+ ACE_TRACE ("ACE_Schedule_All_Reactive_Strategy<SVC_HANDLER>::resume");
return this->scheduler_->reactor ()->resume_handlers ();
}
-template <class SH>
-ACE_Schedule_All_Threaded_Strategy<SH>::ACE_Schedule_All_Threaded_Strategy (SH *scheduler)
- : ACE_Scheduling_Strategy<SH> (scheduler)
+template <class SVC_HANDLER>
+ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::ACE_Schedule_All_Threaded_Strategy
+ (SVC_HANDLER *scheduler)
+ : ACE_Scheduling_Strategy<SVC_HANDLER> (scheduler)
{
- ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SH>::ACE_Schedule_All_Threaded_Strategy");
+ ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::ACE_Schedule_All_Threaded_Strategy");
}
-template <class SH> int
-ACE_Schedule_All_Threaded_Strategy<SH>::suspend (void)
+template <class SVC_HANDLER> int
+ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::suspend (void)
{
- ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SH>::suspend");
+ ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::suspend");
return this->scheduler_->thr_mgr ()->suspend_all ();
}
template <class SVC_HANDLER> int
-ACE_Schedule_All_Threaded_Strategy<SH>::resume (void)
+ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::resume (void)
{
- ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SH>::resume");
+ ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::resume");
return this->scheduler_->thr_mgr ()->resume_all ();
}
-template <class SH> void
-ACE_Schedule_All_Threaded_Strategy<SH>::dump (void) const
+template <class SVC_HANDLER> void
+ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::dump (void) const
{
- ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SH>::dump");
+ ACE_TRACE ("ACE_Schedule_All_Threaded_Strategy<SVC_HANDLER>::dump");
- ACE_Scheduling_Strategy<SH>::dump ();
+ ACE_Scheduling_Strategy<SVC_HANDLER>::dump ();
}
-#undef SH
-#undef PR_AC_1
-#undef PR_AC_2
-#undef PR_AD
-
#endif /* ACE_STRATEGIES_C */
diff --git a/ace/Strategies.h b/ace/Strategies.h
index f8677201f5f..6506a0eb9c5 100644
--- a/ace/Strategies.h
+++ b/ace/Strategies.h
@@ -19,18 +19,6 @@
#include "ace/Service_Config.h"
-#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
-#define ACE_PEER_ACCEPTOR_1 class PEER_ACCEPTOR
-#define ACE_PEER_ACCEPTOR_2 PEER_ACCEPTOR
-#define ACE_PEER_ACCEPTOR PEER_ACCEPTOR
-#define ACE_PEER_ACCEPTOR_ADDR PEER_ACCEPTOR::PEER_ADDR
-#else
-#define ACE_PEER_ACCEPTOR_1 class PEER_ACCEPTOR, class PEER_ADDR
-#define ACE_PEER_ACCEPTOR_2 PEER_ACCEPTOR, PEER_ADDR
-#define ACE_PEER_ACCEPTOR PEER_ACCEPTOR
-#define ACE_PEER_ACCEPTOR_ADDR PEER_ADDR
-#endif /* ACE_TEMPLATE_TYPEDEFS */
-
template <class SVC_HANDLER>
class ACE_Creation_Strategy
// = TITLE
diff --git a/ace/Synch.cpp b/ace/Synch.cpp
index 7201a4bb933..f8dfcb4f9bd 100644
--- a/ace/Synch.cpp
+++ b/ace/Synch.cpp
@@ -430,10 +430,10 @@ ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (const ACE_Recursive_Thre
ACE_Recursive_Thread_Mutex::ACE_Recursive_Thread_Mutex (LPCTSTR name,
void *arg)
- : nesting_level_ (0),
- owner_id_ (ACE_OS::NULL_thread),
- nesting_mutex_ (name, arg),
- lock_available_ (nesting_mutex_, name, arg)
+ : nesting_mutex_ (name, arg),
+ lock_available_ (nesting_mutex_, name, arg),
+ nesting_level_ (0),
+ owner_id_ (ACE_OS::NULL_thread)
{
#if defined (ACE_HAS_FSU_PTHREADS)
// Initialize FSU pthreads package.
diff --git a/ace/Synch_T.cpp b/ace/Synch_T.cpp
index d9389f139a2..a24ab8e46b9 100644
--- a/ace/Synch_T.cpp
+++ b/ace/Synch_T.cpp
@@ -310,7 +310,7 @@ ACE_TSS<TYPE>::ts_get (void) const
if (this->once_ == 0)
{
// Insure that we are serialized!
- ACE_GUARD_RETURN (ACE_Mutex, ace_mon, (ACE_Mutex &) this->keylock_, 0);
+ ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, (ACE_Thread_Mutex &) this->keylock_, 0);
// Use the Double-Check pattern to make sure we only create the
// key once!
@@ -365,7 +365,7 @@ template <class TYPE> TYPE *
ACE_TSS<TYPE>::ts_object (void) const
{
// Ensure that we are serialized!
- ACE_GUARD_RETURN (ACE_Mutex, ace_mon, (ACE_Mutex &) this->keylock_, 0);
+ ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, (ACE_Thread_Mutex &) this->keylock_, 0);
if (this->once_ == 0) // Return 0 if we've never been initialized.
return 0;
@@ -384,7 +384,7 @@ template <class TYPE> TYPE *
ACE_TSS<TYPE>::ts_object (TYPE *new_ts_obj)
{
// Ensure that we are serialized!
- ACE_GUARD_RETURN (ACE_Mutex, ace_mon, this->keylock_, 0);
+ ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->keylock_, 0);
if (this->once_ == 0) // Return 0 if we've never been initialized.
return 0;
diff --git a/ace/Synch_T.h b/ace/Synch_T.h
index ef0583686bf..0f559bd2271 100644
--- a/ace/Synch_T.h
+++ b/ace/Synch_T.h
@@ -189,7 +189,7 @@ protected:
TYPE type_;
// This implementation only works for non-threading systems...
#else
- ACE_Mutex keylock_;
+ ACE_Thread_Mutex keylock_;
// Avoid race conditions during initialization.
int once_;
diff --git a/ace/System_Time.cpp b/ace/System_Time.cpp
index 4c38e951aac..7d606909a9a 100644
--- a/ace/System_Time.cpp
+++ b/ace/System_Time.cpp
@@ -71,10 +71,10 @@ ACE_System_Time::get_master_system_time (ACE_UINT32 &time_out)
}
// Synchronize local system time with the central time server using
-// specified mode.
+// specified mode (currently unimplemented).
int
-ACE_System_Time::sync_local_system_time (ACE_System_Time::Sync_Mode mode)
+ACE_System_Time::sync_local_system_time (ACE_System_Time::Sync_Mode)
{
ACE_TRACE ("ACE_System_Time::sync_local_system_time");
return 0;
diff --git a/ace/TLI_Connector.cpp b/ace/TLI_Connector.cpp
index 2a03693b5d9..f39c6b7c6de 100644
--- a/ace/TLI_Connector.cpp
+++ b/ace/TLI_Connector.cpp
@@ -32,7 +32,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream,
const ACE_Addr &local_sap,
int reuse_addr,
int flags,
- int perms,
+ int /* perms */,
const char device[],
struct t_info *info,
int rwf,
diff --git a/ace/TLI_Stream.i b/ace/TLI_Stream.i
index 4c330dadfd7..bc27e6d72c5 100644
--- a/ace/TLI_Stream.i
+++ b/ace/TLI_Stream.i
@@ -48,8 +48,8 @@ inline ssize_t
ACE_TLI_Stream::send_n (const void *buf, size_t n, int flags) const
{
ACE_TRACE ("ACE_TLI_Stream::send_n");
- int b_sent;
- int b_written;
+ size_t b_sent;
+ ssize_t b_written;
for (b_sent = 0; b_sent < n; b_sent += b_written)
if ((b_written = ACE_OS::t_snd (this->get_handle (),
@@ -71,7 +71,7 @@ inline ssize_t
ACE_TLI_Stream::recv_n (void *buf, size_t n, int *flags) const
{
ACE_TRACE ("ACE_TLI_Stream::recv_n");
- ssize_t b_read = 0;
+ size_t b_read = 0;
ssize_t b_recv = 0;
int f = 0;
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp
index bad4f22aa2f..dd300addec7 100644
--- a/ace/Thread_Manager.cpp
+++ b/ace/Thread_Manager.cpp
@@ -148,11 +148,11 @@ ACE_Thread_Manager::open (size_t size)
// Initialize the synchronization variables.
ACE_Thread_Manager::ACE_Thread_Manager (size_t size)
- : zero_cond_ (lock_),
+ : thr_table_ (0),
max_table_size_ (0),
- thr_table_ (0),
current_count_ (0),
- grp_id_ (1)
+ grp_id_ (1),
+ zero_cond_ (lock_)
{
ACE_TRACE ("ACE_Thread_Manager::ACE_Thread_Manager");
if (this->open (size) == -1)
diff --git a/ace/Token.h b/ace/Token.h
index a29d3f95d43..f75180c4b71 100644
--- a/ace/Token.h
+++ b/ace/Token.h
@@ -41,7 +41,7 @@ public:
// = Initialization and termination.
ACE_Token (const char *name = 0, void * = 0);
- ~ACE_Token (void);
+ virtual ~ACE_Token (void);
// = Synchronization operations.
diff --git a/ace/UPIPE_Connector.cpp b/ace/UPIPE_Connector.cpp
index e4aad1a28a3..f8e6cce603e 100644
--- a/ace/UPIPE_Connector.cpp
+++ b/ace/UPIPE_Connector.cpp
@@ -23,8 +23,8 @@ int
ACE_UPIPE_Connector::connect (ACE_UPIPE_Stream &new_stream,
const ACE_UPIPE_Addr &addr,
ACE_Time_Value *timeout,
- const ACE_Addr &local_sap,
- int reuse_addr,
+ const ACE_Addr & /* local_sap */,
+ int /* reuse_addr */,
int flags,
int perms)
{
diff --git a/ace/config-hpux-10.x-g++.h b/ace/config-hpux-10.x-g++.h
index 2930a01a058..91ba2545911 100644
--- a/ace/config-hpux-10.x-g++.h
+++ b/ace/config-hpux-10.x-g++.h
@@ -12,6 +12,9 @@
#define HPUX
#endif /* HPUX */
+// They forgot a const in the prototype of const_timewait...
+#define ACE_LACKS_CONST_TIMESPEC_PTR
+
// Compiler's template mechanism must see source code (i.e., .C files).
#define ACE_TEMPLATES_REQUIRE_SOURCE
// Compiler doesn't support static data member templates.
diff --git a/ace/config-hpux-10.x.h b/ace/config-hpux-10.x.h
index cdfad30891e..082ac36aa1a 100644
--- a/ace/config-hpux-10.x.h
+++ b/ace/config-hpux-10.x.h
@@ -17,6 +17,9 @@
#include <sys/stdsyms.h>
#include <sched.h> // pthread.h doesn't include this
+// They forgot a const in the prototype of const_timewait...
+#define ACE_LACKS_CONST_TIMESPEC_PTR
+
#define ACE_LACKS_SYSCALL
#define ACE_HAS_POSIX_TIME
diff --git a/ace/config-hpux-9.x-orbix.h b/ace/config-hpux-9.x-orbix.h
index 0cf71f2f3ee..7eec3166a0d 100644
--- a/ace/config-hpux-9.x-orbix.h
+++ b/ace/config-hpux-9.x-orbix.h
@@ -12,6 +12,9 @@
#define HPUX
#endif /* HPUX */
+// They forgot a const in the prototype of const_timewait...
+#define ACE_LACKS_CONST_TIMESPEC_PTR
+
// ************* HERE IS THE ORBIX STUFF - Dave 4/2/96
#define ACE_HAS_ORBIX
diff --git a/ace/config-hpux-9.x.h b/ace/config-hpux-9.x.h
index 57a90f3cb59..d106ad3a35c 100644
--- a/ace/config-hpux-9.x.h
+++ b/ace/config-hpux-9.x.h
@@ -12,6 +12,9 @@
#define HPUX
#endif /* HPUX */
+// They forgot a const in the prototype of const_timewait...
+#define ACE_LACKS_CONST_TIMESPEC_PTR
+
#define ACE_LACKS_SYSCALL
#define ACE_LACKS_STRRECVFD
diff --git a/ace/config-m88k.h b/ace/config-m88k.h
index f2c2222a17c..59f540c939c 100644
--- a/ace/config-m88k.h
+++ b/ace/config-m88k.h
@@ -173,7 +173,7 @@ struct ip_mreq
#define ACE_HAS_SYS_SIGLIST
#endif // m88k
-/* Turn off the following four defines if you want to disable threading. */
+/* Turn off the following five defines if you want to disable threading. */
// Compile using multi-thread libraries.
#define ACE_MT_SAFE
diff --git a/ace/config-sunos5.5-g++.h b/ace/config-sunos5.5-g++.h
index 8917421aebf..f54f7a6135b 100644
--- a/ace/config-sunos5.5-g++.h
+++ b/ace/config-sunos5.5-g++.h
@@ -2,13 +2,16 @@
// $Id$
// The following configuration file is designed to work for SunOS 5.5
-// platforms using the GNU g++ compiler.
+// platforms using the GNU g++ compiler (version 2.7.2 or later).
#if !defined (ACE_CONFIG_H)
#define ACE_CONFIG_H
#define ACE_HAS_UNICODE
+// G++ doesn't support template typedefs fully (yet).
+// #define ACE_HAS_TEMPLATE_TYPEDEFS
+
// Must specialize templates due to G++'s lame parameterized type
// support...
#define ACE_TEMPLATES_REQUIRE_SPECIALIZATION
@@ -126,7 +129,7 @@
// Compiler/platform supports sys_siglist array.
#define ACE_HAS_SYS_SIGLIST
-/* Turn off the following four defines if you want to disable threading. */
+/* Turn off the following five defines if you want to disable threading. */
// Compile using multi-thread libraries.
#define ACE_MT_SAFE
@@ -136,12 +139,13 @@
// Platform supports POSIX pthreads *and* Solaris threads!
#define ACE_HAS_STHREADS
#define ACE_HAS_PTHREADS
-#define ACE_HAS_SIGWAIT
-#define ACE_LACKS_CONDATTR_PSHARED
// Compiler/platform has thread-specific storage
#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+#define ACE_HAS_SIGWAIT
+#define ACE_LACKS_CONDATTR_PSHARED
+
// Platform supports TLI timod STREAMS module.
#define ACE_HAS_TIMOD_H
diff --git a/ace/config-sunos5.5-sunc++-4.x-orbix.h b/ace/config-sunos5.5-sunc++-4.x-orbix.h
index 3c325dab04e..d778a0f57cc 100644
--- a/ace/config-sunos5.5-sunc++-4.x-orbix.h
+++ b/ace/config-sunos5.5-sunc++-4.x-orbix.h
@@ -121,7 +121,7 @@
// Compiler/platform supports sys_siglist array.
#define ACE_HAS_SYS_SIGLIST
-/* Turn off the following four defines if you want to disable threading. */
+/* Turn off the following five defines if you want to disable threading. */
// Compile using multi-thread libraries.
#define ACE_MT_SAFE
@@ -131,12 +131,13 @@
// Platform supports POSIX pthreads *and* Solaris threads!
#define ACE_HAS_STHREADS
#define ACE_HAS_PTHREADS
-#define ACE_HAS_SIGWAIT
-#define ACE_LACKS_CONDATTR_PSHARED
// Compiler/platform has thread-specific storage
#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+#define ACE_HAS_SIGWAIT
+#define ACE_LACKS_CONDATTR_PSHARED
+
// Reactor detects deadlock
// #define ACE_REACTOR_HAS_DEADLOCK_DETECTION
diff --git a/ace/config-sunos5.5-sunc++-4.x.h b/ace/config-sunos5.5-sunc++-4.x.h
index a3d9ebb70bc..e374a75e1bd 100644
--- a/ace/config-sunos5.5-sunc++-4.x.h
+++ b/ace/config-sunos5.5-sunc++-4.x.h
@@ -8,7 +8,7 @@
#define ACE_CONFIG_H
#define ACE_HAS_UNICODE
-#define ACE_HAS_TEMPLATE_TYPEDEFS
+// #define ACE_HAS_TEMPLATE_TYPEDEFS
// Platform supports System V IPC (most versions of UNIX, but not Win32)
#define ACE_HAS_SYSV_IPC
diff --git a/ace/config-sunx86-sunc++-4.x.h b/ace/config-sunx86-sunc++-4.x.h
index c29373b495b..b4df1689da5 100644
--- a/ace/config-sunx86-sunc++-4.x.h
+++ b/ace/config-sunx86-sunc++-4.x.h
@@ -103,7 +103,7 @@
// Compiler/platform supports sys_siglist array.
#define ACE_HAS_SYS_SIGLIST
-/* Turn off the following four defines if you want to disable threading. */
+/* Turn off the following three defines if you want to disable threading. */
// Compile using multi-thread libraries.
#define ACE_MT_SAFE
diff --git a/ace/config-win32-msvc2.0.h b/ace/config-win32-msvc2.0.h
index a438b6ffe41..724cc6243fb 100644
--- a/ace/config-win32-msvc2.0.h
+++ b/ace/config-win32-msvc2.0.h
@@ -92,15 +92,16 @@ inline void *operator new (unsigned int, void *p) { return p; }
// Platform supports Windows32 threads.
#define ACE_HAS_WTHREADS
+
+// Compiler/platform has thread-specific storage
+#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+
#define ACE_WIN32
#define ACE_HAS_TEMPLATE_INSTANTIATION
//#define ACE_HAS_ALLOC_HOOKS
#define ACE_TEMPLATES_REQUIRE_SOURCE
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
// Platform supports ACE_TLI timod STREAMS module.
//define ACE_HAS_TIMOD_H
diff --git a/ace/config-win32-msvc4.0.h b/ace/config-win32-msvc4.0.h
index aacf85f8d73..d47c772c03c 100644
--- a/ace/config-win32-msvc4.0.h
+++ b/ace/config-win32-msvc4.0.h
@@ -50,6 +50,7 @@
// #define ACE_HAS_ORBIX
// #define ACE_HAS_MT_ORBIX
+#define ACE_HAS_TEMPLATE_TYPEDEFS
#define ACE_LACKS_SBRK
#define ACE_LACKS_UTSNAME_T
#define ACE_LACKS_SEMBUF_T
@@ -126,15 +127,16 @@
// Platform supports Windows32 threads.
#define ACE_HAS_WTHREADS
+
+// Compiler/platform has thread-specific storage
+#define ACE_HAS_THREAD_SPECIFIC_STORAGE
+
#define ACE_WIN32
#define ACE_HAS_TEMPLATE_INSTANTIATION
//#define ACE_HAS_ALLOC_HOOKS
#define ACE_TEMPLATES_REQUIRE_SOURCE
-// Compiler/platform has thread-specific storage
-#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-
// Platform supports ACE_TLI timod STREAMS module.
//define ACE_HAS_TIMOD_H