summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-30 06:21:46 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-30 06:21:46 +0000
commit86ad45a6b01752efd0358643bda3012718456a7e (patch)
treec42445da4ca7044706475da9c19a83a952a53c49 /ace
parent9ec3191e96ea79c6c5e9ce3a85fde020d8567a6d (diff)
downloadATCD-86ad45a6b01752efd0358643bda3012718456a7e.tar.gz
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r--ace/Dynamic.cpp6
-rw-r--r--ace/Dynamic.h7
-rw-r--r--ace/Svc_Handler.cpp8
-rw-r--r--ace/Svc_Handler.h6
4 files changed, 18 insertions, 9 deletions
diff --git a/ace/Dynamic.cpp b/ace/Dynamic.cpp
index f32606a5d1f..c984a8ecf41 100644
--- a/ace/Dynamic.cpp
+++ b/ace/Dynamic.cpp
@@ -18,6 +18,12 @@ ACE_Dynamic::ACE_Dynamic (void)
ACE_TRACE ("ACE_Dynamic::ACE_Dynamic");
}
+/* static */ ACE_Dynamic *
+ACE_Dynamic::instance (void)
+{
+ return DYNAMIC::instance ();
+}
+
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_TSS_Singleton<ACE_Dynamic, ACE_Null_Mutex>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
diff --git a/ace/Dynamic.h b/ace/Dynamic.h
index a6c3cc3ca92..f1a8da54273 100644
--- a/ace/Dynamic.h
+++ b/ace/Dynamic.h
@@ -19,6 +19,8 @@
#define ACE_DYNAMIC_H
#include "ace/ACE.h"
+#include "ace/Synch_T.h"
+#include "ace/Singleton.h"
class ACE_Export ACE_Dynamic
{
@@ -47,6 +49,11 @@ public:
void reset (void);
// Resets state flag.
+ static ACE_Dynamic *instance (void);
+
+ typedef ACE_TSS_Singleton<ACE_Dynamic, ACE_SYNCH_NULL_MUTEX> DYNAMIC;
+ // Point of access to the ACE_Dynamic singleton.
+
private:
int is_dynamic_;
// Flag that indicates that the object was dynamically created. This
diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp
index 4cd622eeab7..4226538b82e 100644
--- a/ace/Svc_Handler.cpp
+++ b/ace/Svc_Handler.cpp
@@ -13,6 +13,8 @@
#include "ace/Svc_Handler.i"
#endif /* __ACE_INLINE__ */
+#include "ace/Dynamic.h"
+
ACE_RCSID(ace, Svc_Handler, "$Id$")
#define PR_ST_1 ACE_PEER_STREAM_1
@@ -24,7 +26,7 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator new (size_t n)
ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator new");
// Allocate the memory and store it (usually in thread-specific
// storage, depending on config flags).
- DYNAMIC::instance ()->set ();
+ ACE_Dynamic::instance ()->set ();
return ::new char[n];
}
@@ -76,10 +78,10 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::ACE_Svc_Handler (ACE_Thread_Manager *tm
// in the April '96 issue of the C++ Report. We've spruced it up to
// work correctly in multi-threaded programs by using our ACE_TSS
// class.
- this->dynamic_ = DYNAMIC::instance ()->is_dynamic ();
+ this->dynamic_ = ACE_Dynamic::instance ()->is_dynamic ();
if (this->dynamic_)
// Make sure to reset the flag
- DYNAMIC::instance ()->reset ();
+ ACE_Dynamic::instance ()->reset ();
}
// Default behavior for a ACE_Svc_Handler object is to be registered with
diff --git a/ace/Svc_Handler.h b/ace/Svc_Handler.h
index 02c0a616bb7..d04ca2db879 100644
--- a/ace/Svc_Handler.h
+++ b/ace/Svc_Handler.h
@@ -23,9 +23,6 @@ class ACE_Connection_Recycling_Strategy;
#include "ace/Synch_Options.h"
#include "ace/Task.h"
#include "ace/Service_Config.h"
-#include "ace/Synch_T.h"
-#include "ace/Dynamic.h"
-#include "ace/Singleton.h"
template <ACE_PEER_STREAM_1, ACE_SYNCH_DECL>
class ACE_Svc_Handler : public ACE_Task<ACE_SYNCH_USE>
@@ -154,9 +151,6 @@ private:
ACE_PEER_STREAM peer_;
// Maintain connection with client.
- typedef ACE_TSS_Singleton<ACE_Dynamic, ACE_SYNCH_NULL_MUTEX> DYNAMIC;
- // Point of access to the ACE_Dynamic singleton.
-
int dynamic_;
// Have we been dynamically created?