summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-11-23 16:37:10 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-11-23 16:37:10 +0000
commit8eb9e09dffd0e5c9bb76b1d9d5ac879e5ac3bab2 (patch)
tree599367c59b3abfb30f6616b4af594a7030f5607c /ace
parenta8506638025e0da852a133db31a1d87eacc13f00 (diff)
downloadATCD-8eb9e09dffd0e5c9bb76b1d9d5ac879e5ac3bab2.tar.gz
ChangeLogTag:Fri Nov 23 08:40:33 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
Diffstat (limited to 'ace')
-rw-r--r--ace/Acceptor.cpp14
-rw-r--r--ace/Base_Thread_Adapter.cpp12
-rw-r--r--ace/Base_Thread_Adapter.h2
-rw-r--r--ace/Base_Thread_Adapter.inl3
-rw-r--r--ace/Refcounted_Auto_Ptr.h6
-rw-r--r--ace/Refcounted_Auto_Ptr.i13
6 files changed, 30 insertions, 20 deletions
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp
index 1e279feef43..2d9cad5e54f 100644
--- a/ace/Acceptor.cpp
+++ b/ace/Acceptor.cpp
@@ -250,7 +250,7 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::make_svc_handler (SVC_HANDLER *&
-1);
// Set the reactor of the newly created <SVC_HANDLER> to the same
- // reactor that this <Acceptor> is using.
+ // reactor that this <ACE_Acceptor> is using.
if (this->reactor ())
sh->reactor (this->reactor ());
@@ -274,12 +274,12 @@ ACE_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler
// associations.
int reset_new_handle = this->reactor ()->uses_event_associations ();
- if (this->peer_acceptor_.accept (svc_handler->peer (), // stream
- 0, // remote address
- 0, // timeout
- 1, // restart
- reset_new_handle // reset new handler
- ) == -1)
+ if (this->acceptor ().accept (svc_handler->peer (), // stream
+ 0, // remote address
+ 0, // timeout
+ 1, // restart
+ reset_new_handle // reset new handler
+ ) == -1)
{
// Close down handler to avoid memory leaks.
svc_handler->close (0);
diff --git a/ace/Base_Thread_Adapter.cpp b/ace/Base_Thread_Adapter.cpp
index 2f8efd4e58f..b0ceffe5cd9 100644
--- a/ace/Base_Thread_Adapter.cpp
+++ b/ace/Base_Thread_Adapter.cpp
@@ -59,27 +59,21 @@ void
ACE_Base_Thread_Adapter::close_log_msg (void)
{
if (ACE_Base_Thread_Adapter::close_log_msg_hook_ != 0)
- {
- (*ACE_Base_Thread_Adapter::close_log_msg_hook_) ();
- }
+ (*ACE_Base_Thread_Adapter::close_log_msg_hook_) ();
}
void
ACE_Base_Thread_Adapter::sync_log_msg (const ACE_TCHAR *prg)
{
if (ACE_Base_Thread_Adapter::sync_log_msg_hook_ != 0)
- {
- (*ACE_Base_Thread_Adapter::sync_log_msg_hook_) (prg);
- }
+ (*ACE_Base_Thread_Adapter::sync_log_msg_hook_) (prg);
}
ACE_OS_Thread_Descriptor *
ACE_Base_Thread_Adapter::thr_desc_log_msg (void)
{
if (ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_ != 0)
- {
- return (*ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_) ();
- }
+ return (*ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_) ();
return 0;
}
diff --git a/ace/Base_Thread_Adapter.h b/ace/Base_Thread_Adapter.h
index dfa6cde0071..a57351545bc 100644
--- a/ace/Base_Thread_Adapter.h
+++ b/ace/Base_Thread_Adapter.h
@@ -1,4 +1,3 @@
-
//=============================================================================
/**
* @file Base_Thread_Adapter.h
@@ -9,7 +8,6 @@
*/
//=============================================================================
-
#ifndef ACE_BASE_THREAD_ADAPTER_H
#define ACE_BASE_THREAD_ADAPTER_H
#include "ace/pre.h"
diff --git a/ace/Base_Thread_Adapter.inl b/ace/Base_Thread_Adapter.inl
index 01187486eca..1d0d6ba7a49 100644
--- a/ace/Base_Thread_Adapter.inl
+++ b/ace/Base_Thread_Adapter.inl
@@ -6,7 +6,6 @@ ACE_OS_Thread_Descriptor::flags (void) const
return flags_;
}
-
ACE_INLINE
ACE_OS_Thread_Descriptor::ACE_OS_Thread_Descriptor (long flags)
: flags_ (flags)
@@ -25,7 +24,7 @@ ACE_Base_Thread_Adapter::set_log_msg_hooks (
ACE_Base_Thread_Adapter::inherit_log_msg_hook_ = inherit_hook;
ACE_Base_Thread_Adapter::close_log_msg_hook_ = close_hook;
ACE_Base_Thread_Adapter::sync_log_msg_hook_ = sync_hook;
- ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_ = thr_desc_hook;
+ ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_ = thr_desc_hook;
}
ACE_INLINE ACE_THR_C_FUNC
diff --git a/ace/Refcounted_Auto_Ptr.h b/ace/Refcounted_Auto_Ptr.h
index f28fdc2cbfb..bb1ce9f9af4 100644
--- a/ace/Refcounted_Auto_Ptr.h
+++ b/ace/Refcounted_Auto_Ptr.h
@@ -86,6 +86,9 @@ public:
/// Get the pointer value.
X *get (void);
+ /// Get the reference count value.
+ int count (void) const;
+
// = Utility method.
/// Allows us to check for NULL on all ACE_Refcounted_Auto_Ptr objects.
@@ -126,6 +129,9 @@ private:
/// Get the pointer value.
X *get (void);
+ /// Get the reference count value.
+ int count (void) const;
+
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
diff --git a/ace/Refcounted_Auto_Ptr.i b/ace/Refcounted_Auto_Ptr.i
index 90baf4dac92..8fe557b3dde 100644
--- a/ace/Refcounted_Auto_Ptr.i
+++ b/ace/Refcounted_Auto_Ptr.i
@@ -6,6 +6,19 @@
#include "Synch_T.h"
template <class X, class ACE_LOCK> inline int
+ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::count (void) const
+{
+ ACE_GUARD_RETURN (ACE_LOCK, guard, ACE_const_cast (ACE_LOCK &, this->lock_), 0);
+ return this->ref_count_;
+}
+
+template <class X, class ACE_LOCK> inline int
+ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>::count (void) const
+{
+ return this->rep_->count ();
+}
+
+template <class X, class ACE_LOCK> inline int
ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::null (void) const
{
ACE_GUARD_RETURN (ACE_LOCK, guard,