diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-08-06 20:51:14 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-08-06 20:51:14 +0000 |
commit | 9ef6e9f8bc57551d9ad1fe84da7cde9e4b27125f (patch) | |
tree | 217066bb25f7612f656d4c2fa87b97787945100c /TAO | |
parent | 93f7df5a05a37270bf748c210e7b8c8a7d7c469e (diff) | |
download | ATCD-9ef6e9f8bc57551d9ad1fe84da7cde9e4b27125f.tar.gz |
ChangeLogTag:Sun Aug 06 16:46:31 2000 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO')
42 files changed, 1775 insertions, 322 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 1c6feb3b4d4..a0078460293 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,7 +1,142 @@ +Sun Aug 06 16:46:31 2000 Ossama Othman <ossama@uci.edu> + + * tao/TAO_Singleton.cpp: + * tao/TAO_Singleton.h: + * tao/TAO_Singleton.inl: + + TAO-specific Singleton classes. These classes registers with + the TAO_Singleton_Manager instead of the ACE_Object_Manager to + ensure that TAO Singletons are isolated within TAO. + + * tao/TAO_Singleton_Manager.cpp: + * tao/TAO_Singleton_Manager.h: + * tao/TAO_Singleton_Manager.inl: + + TAO-specific singleton/object manager. This is basically a + stripped down version of the ACE_Object_Manager. TAO_Singletons + register with the TAO_Singleton_Manager. The + TAO_Singleton_Manager cleans up all registered + singletons/objects upon destruction of the last ORB reference. + + * tao/DLL_ORB.cpp: + * tao/DLL_ORB.h: + * tao/DLL_ORB.inl: + + New helper class that can be used to ensure that the ORB is + properly initialized and destroyed when dynamically loading and + unloading the ORB. + + * tao/TAO_Export.h: + + New header that contains the TAO-specific Win32 DLL + export/import macros. + + * tao/corbafwd.h: + + Removed the TAO-specific Win32 DLL export/import macros. They + are now defined in `TAO_Export.h'. + + * tao/ORB.cpp (ORB_init): + + Initialize the TAO_Singleton_Manager prior to initializing + anything else. If the TAO_Singleton_Manager hasn't already been + explicitly initialized prior to this call, then this call to + TAO_Singleton_Manager::init() will cause the + TAO_Singleton_Manager to register a cleanup function with the + ACE_Object_Manager. + + * tao/ORB_Core.h: + * tao/ORB_Core.i (instance): + + The ORB table is now a TAO_Singleton, instead of an + ACE_Singleton. + + * tao/ORB_Core.cpp: + + Removed unnecessary inclusion of "ace/Object_Manager.h." + + The ORB table is now a TAO_Singleton, instead of an + ACE_Singleton. Changed the template instantiations + accordingly. + + TAO's thread-specific storage resources are now accessed through + a TAO_TSS_Singleton instead of an ACE_TSS_Singleton. + + (unbind): + + Decrement reference count on ORB Core after check for equality + to first_orb_. This fixes an "expression uses dangling pointer" + error. + + (TAO_ORB_Core_instance): + + The call to CORBA::ORB_init() in this function returns a + duplicated ORB reference, so make sure that reference is stored + in an ORB_var so that no leak occurs. The return value was + previously ignored. The duplicate ORB reference isn't needed + outside the scope of this function since the corresponding ORB + Core instance will still exist in the ORB table after the ORB + reference is destroyed. + + * tao/Typecode.cpp (~CORBA_TypeCode): + + Removed redundant zero pointer checks. The standard C++ + delete() already performs such a check. + + * tao/Exception.cpp (init): + * tao/Exception.h: + * tao/Typecode.h: + * tao/Typecode_Constants.cpp (init): + + Added static flag/variable that is used to denote when the + CORBA Exceptions and TypeCode constants have been initialized. + This is necessary to prevent multiple initializations from + occuring, which in turn fixes a memory leak that was occuring + due to pointer reassignment. + + * tao/IIOP_Factory.cpp: + * tao/SHMIOP_Factory.cpp: + * tao/UIOP_Factory.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp: + + Removed unnecessary inclusion of "ace/Dynamic_Service.h." + + * tao/Makefile: + * tao/Makefile.am: + * tao/Makefile.bor: + * tao/TAO.dsp: + + Added new files (e.g. TAO_Export.h, TAO_Singleton_Manager.*, + TAO_Singleton.*, DLL_ORB.*) to list of sources. + + * tao/default_resource.h: + + Removed extraneous include of "ace/Singleton.h." + + * tao/ImplRepoC.cpp: + * tao/ImplRepoC.h: + * tao/InterfaceC.cpp: + * tao/InterfaceC.h: + * tao/MessagingC.cpp: + * tao/MessagingC.h: + * tao/Operation_Table.cpp: + * tao/Operation_Table.h: + * tao/ValueFactory_Map.cpp: + * tao/ValueFactory_Map.h: + + Use new TAO_Singleton class instead of ACE_Singleton to ensure + resources are isolated to TAO. + + * TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp (visit_interface): + * TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp (visit_interface): + + Generated code now uses TAO_Singletons instead of ACE_Singletons + to ensure isolation of resources to TAO. + Fri Aug 4 18:50:00 2000 Kirthika Parameswaran <kirthika@cs.wustl.edu> * tao/corba.h: Rectified spelling mistake in checking whether - the smart proxy feature was available. + the smart proxy feature was available. Fri Aug 4 15:49:26 2000 Carlos O'Ryan <coryan@uci.edu> diff --git a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp index 71493775fec..617ffc0d672 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp @@ -84,6 +84,8 @@ int be_visitor_interface_smart_proxy_ch::visit_interface (be_interface *node) << "{" << be_nl << "public:" << be_idt_nl << be_nl << "friend class ACE_Singleton<TAO_" << node->flat_name () + << "_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>;" << be_nl + << "friend class TAO_Singleton<TAO_" << node->flat_name () << "_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>;" << be_nl << be_nl << "int register_proxy_factory (" << be_idt << be_idt_nl << "TAO_" << node->flat_name () << "_Default_Proxy_Factory *df,"<< be_nl @@ -117,7 +119,7 @@ int be_visitor_interface_smart_proxy_ch::visit_interface (be_interface *node) << "};\n\n"; os->indent (); - *os << "typedef ACE_Singleton<TAO_"<<node->flat_name () + *os << "typedef TAO_Singleton<TAO_"<<node->flat_name () << "_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_" << node->flat_name ()<< "_PROXY_FACTORY_ADAPTER;"<<be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp index bf9d80107f5..f97b49c0cd6 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp @@ -308,7 +308,7 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node) os->indent (); *os << "#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \\" << be_idt_nl<<"defined (ACE_HAS_GNU_REPO)"<<be_uidt_nl - << "template class ACE_Singleton<"; + << "template class TAO_Singleton<"; *os << scope->full_name (); // Only if there exists any nesting "::" is needed! @@ -318,7 +318,7 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node) << "_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;"<<be_nl << "#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)" << be_nl - << "#pragma instantiate ACE_Singleton<"; + << "#pragma instantiate TAO_Singleton<"; *os << scope->full_name (); // Only if there exists any nesting "::" is needed! diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp index 439584f42e5..85a31485836 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp @@ -1,6 +1,5 @@ // $Id$ - #include "ace/config-all.h" #if defined (ACE_HAS_SSL) && ACE_HAS_SSL == 1 @@ -9,7 +8,6 @@ #include "SSLIOP_Acceptor.h" #include "SSLIOP_Connector.h" #include "ace/SSL/SSL_Context.h" -#include "ace/Dynamic_Service.h" ACE_RCSID(TAO_SSLIOP, SSLIOP_Factory, "$Id$") diff --git a/TAO/tao/DLL_ORB.cpp b/TAO/tao/DLL_ORB.cpp new file mode 100644 index 00000000000..f8a8e289d45 --- /dev/null +++ b/TAO/tao/DLL_ORB.cpp @@ -0,0 +1,148 @@ +// -*- C++ -*- + +#include "ace/ARGV.h" +#include "ace/Dynamic_Service.h" +#include "tao/DLL_ORB.h" +#include "tao/TAO_Singleton_Manager.h" + +ACE_RCSID (tao, DLL_ORB, "$Id$") + +#if !defined (__ACE_INLINE__) +# include "tao/DLL_ORB.inl" +#endif /* ! __ACE_INLINE__ */ + +TAO_DLL_ORB::TAO_DLL_ORB (void) + : orb_ () +{ + // Nothing +} + +TAO_DLL_ORB::~TAO_DLL_ORB (void) +{ + // Nothing +} + +int +TAO_DLL_ORB::init (int argc, ACE_TCHAR *argv[]) +{ + // Make sure TAO's singleton manager is initialized, and set to not + // register itself with the ACE_Object_Manager since it is under the + // control of the Service Configurator. + int register_with_object_manager = 0; + + if (TAO_Singleton_Manager::instance ()->init ( + register_with_object_manager) == -1) + return -1; // No exceptions yet. + + ACE_TRY_NEW_ENV + { + ACE_ARGV new_argv; + + // Respect the argc supplied by the user instead of the one + // calculated by the ACE_ARGV class. Also, add two to the new + // argc since "dummy -ORBSkipServiceConfigOpen" is being added + // to the argv vector. + int new_argc = argc + 2; + + // Prevent the ORB from opening the Service Configurator file + // again since the Service Configurator file is already in the + // process of being opened. + if (new_argv.add (ACE_TEXT ("dummy -ORBSkipServiceConfigOpen")) == -1 + || new_argv.add (argv) == -1) + return -1; + + // Initialize the ORB. + this->orb_ = CORBA::ORB_init (new_argc, + new_argv.argv (), + 0, + ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (CORBA::is_nil (this->orb_.in ())) + return -1; + } + ACE_CATCHANY + { +// ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, +// ACE_TEXT ("TAO_DLL_ORB::init")); + + return -1; + } + ACE_ENDTRY; + +#if defined (ACE_HAS_THREADS) + // Become an Active Object so that the ORB + // will execute in a separate thread. + return this->activate (); +#else + return 0; +#endif /* ACE_HAS_THREADS */ +} + +int +TAO_DLL_ORB::fini (void) +{ + ACE_TRY_NEW_ENV + { + this->orb_->destroy (ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (TAO_Singleton_Manager::instance ()->fini () == -1) + return -1; + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + ACE_TEXT ("TAO_DLL_ORB::fini")); + return -1; + } + ACE_ENDTRY; + + return 0; +} + +int +TAO_DLL_ORB::svc (void) +{ + ACE_TRY_NEW_ENV + { + // Run the ORB event loop in its own thread. + this->orb_->run (ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + ACE_TEXT ("TAO_DLL_ORB::svc")); + return -1; + } + ACE_ENDTRY; + + return 0; +} + + +ACE_STATIC_SVC_DEFINE (TAO_DLL_ORB, + ACE_TEXT ("DLL_ORB"), + ACE_SVC_OBJ_T, + &ACE_SVC_NAME (TAO_DLL_ORB), + ACE_Service_Type::DELETE_THIS + | ACE_Service_Type::DELETE_OBJ, + 0) + +ACE_FACTORY_DEFINE (TAO, TAO_DLL_ORB) + + + +// Template instantiations necessary for use when dynamically load the +// TAO_DLL_ORB. + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Dynamic_Service<TAO_DLL_ORB>; + +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#pragma instantiate ACE_Dynamic_Service<TAO_DLL_ORB> + +#endif diff --git a/TAO/tao/DLL_ORB.h b/TAO/tao/DLL_ORB.h new file mode 100644 index 00000000000..a6d5e856fe7 --- /dev/null +++ b/TAO/tao/DLL_ORB.h @@ -0,0 +1,88 @@ +// -*- C++ -*- +// +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// DLL_ORB.h +// +// = DESCRIPTION +// Header file for the TAO_DLL_ORB helper class. +// +// = AUTHOR +// Ossama Othman <ossama@uci.edu> +// +// ============================================================================ + +#ifndef TAO_DLL_ORB_H +#define TAO_DLL_ORB_H + +#include "ace/pre.h" + +#include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/ORB.h" + +class TAO_Export TAO_DLL_ORB : public ACE_Task_Base +{ + // = TITLE + // Manager for TAO library services and singleton cleanup. + // + // = DESCRIPTION + // The <TAO_Singleton_Manager> is basically simplified version of + // the ACE_Object_Manager. It is designed specifically to + // manage singletons created by TAO. For example, Singleton + // instances created by TAO will be automatically registered + // with the Singleton instance of this Singleton Manager. + // + // This class is necessary to ensure that TAO-specific + // Singletons are centrally isolated. The idea is that + // destruction of the instance of the <TAO_Singleton_Manager> + // triggers destruction of all objects/services registered with + // it. + +public: + + TAO_DLL_ORB (void); + // Constructor + + ~TAO_DLL_ORB (void); + // Destructor + + virtual int init (int argc, ACE_TCHAR *argv[]); + // Initializes ORB when dynamic linking occurs. + + virtual int fini (void); + // Terminates ORB when dynamic unlinking occurs. + + virtual int svc (void); + // Run by a daemon thread to handle deferred processing. + + CORBA::ORB_ptr orb (void); + // Returns a duplicate reference to the ORB. + +private: + + CORBA::ORB_var orb_; + // Reference to the ORB. + +}; + +#if defined (__ACE_INLINE__) +# include "tao/DLL_ORB.inl" +#endif /* ! __ACE_INLINE__ */ + +ACE_STATIC_SVC_DECLARE (TAO_DLL_ORB) +ACE_FACTORY_DECLARE (TAO, TAO_DLL_ORB) + +#include "ace/post.h" + +#endif /* TAO_DLL_ORB_H */ diff --git a/TAO/tao/DLL_ORB.inl b/TAO/tao/DLL_ORB.inl new file mode 100644 index 00000000000..464ec7ffd8e --- /dev/null +++ b/TAO/tao/DLL_ORB.inl @@ -0,0 +1,7 @@ +// -*- C++ -*- + +ACE_INLINE CORBA::ORB_ptr +TAO_DLL_ORB::orb (void) +{ + return CORBA::ORB::_duplicate (this->orb_.in()); +} diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp index c43d060ee3a..22b242d6fba 100644 --- a/TAO/tao/Exception.cpp +++ b/TAO/tao/Exception.cpp @@ -25,6 +25,10 @@ ACE_RCSID(tao, Exception, "$Id$") CORBA::ExceptionList *TAO_Exceptions::system_exceptions; ACE_Allocator *TAO_Exceptions::global_allocator_; +// Flag that denotes that the TAO TypeCode constants have been +// initialized. +int TAO_Exceptions::initialized_ = 0; + // TAO specific typecode extern CORBA::TypeCode_ptr TC_completion_status; @@ -846,6 +850,14 @@ void TAO_Exceptions::init (CORBA::Environment &ACE_TRY_ENV) { // This routine should only be called once. + + // Not thread safe. Caller must provide synchronization. + + if (TAO_Exceptions::initialized_ != 0) + return; + + TAO_Exceptions::initialized_ = 1; + // Initialize the start up allocator. ACE_NEW (TAO_Exceptions::global_allocator_, ACE_New_Allocator); @@ -889,6 +901,8 @@ void TAO_Exceptions::fini (void) { delete TAO_Exceptions::system_exceptions; + TAO_Exceptions::system_exceptions = 0; + #define TAO_SYSTEM_EXCEPTION(name) \ CORBA::release (CORBA::_tc_ ## name); \ CORBA::_tc_ ## name = 0; @@ -896,7 +910,10 @@ TAO_Exceptions::fini (void) #undef TAO_SYSTEM_EXCEPTION delete CORBA::_tc_UnknownUserException; + CORBA::_tc_UnknownUserException = 0; + delete TAO_Exceptions::global_allocator_; + TAO_Exceptions::global_allocator_ = 0; } #define TAO_SYSTEM_EXCEPTION(name) \ diff --git a/TAO/tao/Exception.h b/TAO/tao/Exception.h index 5196c3dbfc9..4069b85f6e6 100644 --- a/TAO/tao/Exception.h +++ b/TAO/tao/Exception.h @@ -384,6 +384,10 @@ private: // typecodes. Since at the time, the ORB is mostly still not // available. Using a separate allocator prevent CDR routine from // accessing the optimized allocators from the ORB. + + static int initialized_; + // Flag that denotes that the TAO's CORBA exceptions have been + // initialized. }; class CORBA_ExceptionList; diff --git a/TAO/tao/IIOP_Factory.cpp b/TAO/tao/IIOP_Factory.cpp index 38fa1c2cf21..f36657a2ffe 100644 --- a/TAO/tao/IIOP_Factory.cpp +++ b/TAO/tao/IIOP_Factory.cpp @@ -3,7 +3,6 @@ #include "tao/IIOP_Factory.h" #include "tao/IIOP_Acceptor.h" #include "tao/IIOP_Connector.h" -#include "ace/Dynamic_Service.h" ACE_RCSID(tao, IIOP_Factory, "$Id$") diff --git a/TAO/tao/ImplRepoC.cpp b/TAO/tao/ImplRepoC.cpp index 0d70147678f..e5ad32490c2 100644 --- a/TAO/tao/ImplRepoC.cpp +++ b/TAO/tao/ImplRepoC.cpp @@ -425,9 +425,9 @@ void ImplementationRepository::TAO_ImplementationRepository_ServerObject_Smart_P #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_ImplementationRepository_ServerObject[] = @@ -2662,9 +2662,9 @@ void ImplementationRepository::TAO_ImplementationRepository_Administration_Smart #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_ImplementationRepository_Administration[] = @@ -3105,9 +3105,9 @@ void ImplementationRepository::TAO_ImplementationRepository_ServerInformationIte #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_ImplementationRepository_ServerInformationIterator[] = diff --git a/TAO/tao/ImplRepoC.h b/TAO/tao/ImplRepoC.h index 11788012c7d..7ec32a247a6 100644 --- a/TAO/tao/ImplRepoC.h +++ b/TAO/tao/ImplRepoC.h @@ -19,7 +19,7 @@ #include "tao/CDR.h" #include "tao/Any.h" #include "tao/Typecode.h" -#include "ace/Singleton.h" +#include "tao/TAO_Singleton.h" #if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) #include "ace/streams.h" @@ -205,6 +205,7 @@ class TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory *df, @@ -234,7 +235,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_ImplementationRepository_ServerObject_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_ImplementationRepository_ServerObject_PROXY_FACTORY_ADAPTER; class TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base : public virtual ACE_NESTED_CLASS (ImplementationRepository, ServerObject) { public: @@ -1195,6 +1196,7 @@ class TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_ImplementationRepository_Administration_Default_Proxy_Factory *df, @@ -1224,7 +1226,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_ImplementationRepository_Administration_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_ImplementationRepository_Administration_PROXY_FACTORY_ADAPTER; class TAO_ImplementationRepository_Administration_Smart_Proxy_Base : public virtual ACE_NESTED_CLASS (ImplementationRepository, Administration) { public: @@ -1491,6 +1493,7 @@ class TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapt public: friend class ACE_Singleton<TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory *df, @@ -1520,7 +1523,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_ImplementationRepository_ServerInformationIterator_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_ImplementationRepository_ServerInformationIterator_PROXY_FACTORY_ADAPTER; class TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base : public virtual ACE_NESTED_CLASS (ImplementationRepository, ServerInformationIterator) { public: diff --git a/TAO/tao/InterfaceC.cpp b/TAO/tao/InterfaceC.cpp index e83dd6cbce1..289011fe534 100644 --- a/TAO/tao/InterfaceC.cpp +++ b/TAO/tao/InterfaceC.cpp @@ -542,9 +542,9 @@ void TAO_CORBA_IRObject_Smart_Proxy_Base::destroy ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_CORBA_IRObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_CORBA_IRObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_CORBA_IRObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_CORBA_IRObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_CORBA_IRObject[] = @@ -2248,9 +2248,9 @@ void TAO_IR_Contained_Smart_Proxy_Base::move ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_Contained_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_Contained_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_Contained_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_Contained_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_Contained[] = @@ -7495,9 +7495,9 @@ IR_NativeDef_ptr TAO_IR_Container_Smart_Proxy_Base::create_native ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_Container_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_Container_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_Container_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_Container_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_Container[] = @@ -7809,9 +7809,9 @@ CORBA::TypeCode_ptr TAO_IR_IDLType_Smart_Proxy_Base::type ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_IDLType_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_IDLType_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_IDLType_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_IDLType_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_IDLType[] = @@ -9159,9 +9159,9 @@ IR_FixedDef_ptr TAO_IR_Repository_Smart_Proxy_Base::create_fixed ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_Repository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_Repository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_Repository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_Repository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_Repository[] = @@ -9660,9 +9660,9 @@ IR_HomeDef_ptr TAO_IR_ComponentRepository_Smart_Proxy_Base::create_home ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ComponentRepository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ComponentRepository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ComponentRepository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ComponentRepository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ComponentRepository[] = @@ -9845,9 +9845,9 @@ TAO_IR_ModuleDef_Smart_Proxy_Base::_stubobj (void) const #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ModuleDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ModuleDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ModuleDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ModuleDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ModuleDef[] = @@ -10759,9 +10759,9 @@ void TAO_IR_ConstantDef_Smart_Proxy_Base::value ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ConstantDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ConstantDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ConstantDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ConstantDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ConstantDef[] = @@ -11022,9 +11022,9 @@ TAO_IR_TypedefDef_Smart_Proxy_Base::_stubobj (void) const #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_TypedefDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_TypedefDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_TypedefDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_TypedefDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_TypedefDef[] = @@ -11548,9 +11548,9 @@ void TAO_IR_StructDef_Smart_Proxy_Base::members ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_StructDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_StructDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_StructDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_StructDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_StructDef[] = @@ -12393,9 +12393,9 @@ void TAO_IR_UnionDef_Smart_Proxy_Base::members ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_UnionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_UnionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_UnionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_UnionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_UnionDef[] = @@ -12843,9 +12843,9 @@ void TAO_IR_EnumDef_Smart_Proxy_Base::members ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_EnumDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_EnumDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_EnumDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_EnumDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_EnumDef[] = @@ -13292,9 +13292,9 @@ void TAO_IR_AliasDef_Smart_Proxy_Base::original_type_def ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_AliasDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_AliasDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_AliasDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_AliasDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_AliasDef[] = @@ -13478,9 +13478,9 @@ TAO_IR_NativeDef_Smart_Proxy_Base::_stubobj (void) const #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_NativeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_NativeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_NativeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_NativeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_NativeDef[] = @@ -13792,9 +13792,9 @@ IR::PrimitiveKind TAO_IR_PrimitiveDef_Smart_Proxy_Base::kind ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_PrimitiveDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_PrimitiveDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_PrimitiveDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_PrimitiveDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_PrimitiveDef[] = @@ -14238,9 +14238,9 @@ void TAO_IR_StringDef_Smart_Proxy_Base::bound ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_StringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_StringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_StringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_StringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_StringDef[] = @@ -14684,9 +14684,9 @@ void TAO_IR_WstringDef_Smart_Proxy_Base::bound ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_WstringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_WstringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_WstringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_WstringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_WstringDef[] = @@ -15392,9 +15392,9 @@ void TAO_IR_FixedDef_Smart_Proxy_Base::scale ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_FixedDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_FixedDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_FixedDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_FixedDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_FixedDef[] = @@ -16232,9 +16232,9 @@ void TAO_IR_SequenceDef_Smart_Proxy_Base::element_type_def ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_SequenceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_SequenceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_SequenceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_SequenceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_SequenceDef[] = @@ -17072,9 +17072,9 @@ void TAO_IR_ArrayDef_Smart_Proxy_Base::element_type_def ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ArrayDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ArrayDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ArrayDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ArrayDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ArrayDef[] = @@ -17652,9 +17652,9 @@ void TAO_IR_ExceptionDef_Smart_Proxy_Base::members ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ExceptionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ExceptionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ExceptionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ExceptionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ExceptionDef[] = @@ -18909,9 +18909,9 @@ void TAO_IR_AttributeDef_Smart_Proxy_Base::mode ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_AttributeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_AttributeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_AttributeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_AttributeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_AttributeDef[] = @@ -21125,9 +21125,9 @@ void TAO_IR_OperationDef_Smart_Proxy_Base::exceptions ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_OperationDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_OperationDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_OperationDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_OperationDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_OperationDef[] = @@ -23583,9 +23583,9 @@ IR_OperationDef_ptr TAO_IR_InterfaceDef_Smart_Proxy_Base::create_operation ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_InterfaceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_InterfaceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_InterfaceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_InterfaceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_InterfaceDef[] = @@ -25300,9 +25300,9 @@ void TAO_IR_ValueMemberDef_Smart_Proxy_Base::access ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ValueMemberDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ValueMemberDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ValueMemberDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ValueMemberDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ValueMemberDef[] = @@ -27954,9 +27954,9 @@ IR_OperationDef_ptr TAO_IR_ValueDef_Smart_Proxy_Base::create_operation ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ValueDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ValueDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ValueDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ValueDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ValueDef[] = @@ -29211,9 +29211,9 @@ void TAO_IR_ValueBoxDef_Smart_Proxy_Base::original_type_def ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ValueBoxDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ValueBoxDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ValueBoxDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ValueBoxDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ValueBoxDef[] = @@ -29526,9 +29526,9 @@ IR_InterfaceDef_ptr TAO_IR_ProvidesDef_Smart_Proxy_Base::interface_type ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ProvidesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ProvidesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ProvidesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ProvidesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ProvidesDef[] = @@ -30050,9 +30050,9 @@ CORBA::Boolean TAO_IR_UsesDef_Smart_Proxy_Base::is_multiple ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_UsesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_UsesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_UsesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_UsesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_UsesDef[] = @@ -30949,9 +30949,9 @@ IR_ValueDef_ptr TAO_IR_EventDef_Smart_Proxy_Base::event ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_EventDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_EventDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_EventDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_EventDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_EventDef[] = @@ -31213,9 +31213,9 @@ TAO_IR_EmitsDef_Smart_Proxy_Base::_stubobj (void) const #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_EmitsDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_EmitsDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_EmitsDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_EmitsDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_EmitsDef[] = @@ -31398,9 +31398,9 @@ TAO_IR_PublishesDef_Smart_Proxy_Base::_stubobj (void) const #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_PublishesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_PublishesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_PublishesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_PublishesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_PublishesDef[] = @@ -31583,9 +31583,9 @@ TAO_IR_ConsumesDef_Smart_Proxy_Base::_stubobj (void) const #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ConsumesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ConsumesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ConsumesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ConsumesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ConsumesDef[] = @@ -33719,9 +33719,9 @@ IR_ConsumesDef_ptr TAO_IR_ComponentDef_Smart_Proxy_Base::create_consumes ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_ComponentDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_ComponentDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_ComponentDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_ComponentDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_ComponentDef[] = @@ -34617,9 +34617,9 @@ IR_ValueDef_ptr TAO_IR_PrimaryKeyDef_Smart_Proxy_Base::primary_key ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_PrimaryKeyDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_PrimaryKeyDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_PrimaryKeyDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_PrimaryKeyDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_PrimaryKeyDef[] = @@ -34881,9 +34881,9 @@ TAO_IR_FactoryDef_Smart_Proxy_Base::_stubobj (void) const #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_FactoryDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_FactoryDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_FactoryDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_FactoryDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_FactoryDef[] = @@ -35066,9 +35066,9 @@ TAO_IR_FinderDef_Smart_Proxy_Base::_stubobj (void) const #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_FinderDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_FinderDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_FinderDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_FinderDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_FinderDef[] = @@ -36504,9 +36504,9 @@ IR_FinderDef_ptr TAO_IR_HomeDef_Smart_Proxy_Base::create_finder ( #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_IR_HomeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_IR_HomeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_IR_HomeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_IR_HomeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_IR_HomeDef[] = @@ -39941,9 +39941,9 @@ CORBA::TypeCode_ptr TAO_CORBA_TypeCodeFactory_Smart_Proxy_Base::create_home_tc #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) -template class ACE_Singleton<TAO_CORBA_TypeCodeFactory_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; +template class TAO_Singleton<TAO_CORBA_TypeCodeFactory_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Singleton<TAO_CORBA_TypeCodeFactory_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_CORBA_TypeCodeFactory_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ static const CORBA::Long _oc_CORBA_TypeCodeFactory[] = diff --git a/TAO/tao/InterfaceC.h b/TAO/tao/InterfaceC.h index 0958f96dd3a..51697f49612 100644 --- a/TAO/tao/InterfaceC.h +++ b/TAO/tao/InterfaceC.h @@ -12,7 +12,7 @@ #define TAO_IDL_INTERFACEC_H #include "ace/pre.h" -#include "ace/Singleton.h" +#include "tao/TAO_Singleton.h" #include "tao/corbafwd.h" #include "tao/ifrfwd.h" #include "tao/Any.h" @@ -173,6 +173,7 @@ class TAO_CORBA_IRObject_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_CORBA_IRObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_CORBA_IRObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_CORBA_IRObject_Default_Proxy_Factory *df, @@ -202,7 +203,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_CORBA_IRObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_CORBA_IRObject_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_CORBA_IRObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_CORBA_IRObject_PROXY_FACTORY_ADAPTER; class TAO_CORBA_IRObject_Smart_Proxy_Base : public virtual CORBA_IRObject { public: @@ -589,6 +590,7 @@ class TAO_IR_Contained_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_Contained_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_Contained_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_Contained_Default_Proxy_Factory *df, @@ -618,7 +620,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_Contained_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_Contained_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_Contained_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_Contained_PROXY_FACTORY_ADAPTER; class TAO_IR_Contained_Smart_Proxy_Base : public virtual IR_Contained { public: @@ -4260,6 +4262,7 @@ class TAO_IR_Container_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_Container_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_Container_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_Container_Default_Proxy_Factory *df, @@ -4289,7 +4292,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_Container_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_Container_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_Container_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_Container_PROXY_FACTORY_ADAPTER; class TAO_IR_Container_Smart_Proxy_Base : public virtual IR_Container { public: @@ -4556,6 +4559,7 @@ class TAO_IR_IDLType_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_IDLType_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_IDLType_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_IDLType_Default_Proxy_Factory *df, @@ -4585,7 +4589,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_IDLType_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_IDLType_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_IDLType_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_IDLType_PROXY_FACTORY_ADAPTER; class TAO_IR_IDLType_Smart_Proxy_Base : public virtual IR_IDLType { public: @@ -5015,6 +5019,7 @@ class TAO_IR_Repository_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_Repository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_Repository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_Repository_Default_Proxy_Factory *df, @@ -5044,7 +5049,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_Repository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_Repository_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_Repository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_Repository_PROXY_FACTORY_ADAPTER; class TAO_IR_Repository_Smart_Proxy_Base : public virtual IR_Repository { public: @@ -5268,6 +5273,7 @@ class TAO_IR_ComponentRepository_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ComponentRepository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ComponentRepository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ComponentRepository_Default_Proxy_Factory *df, @@ -5297,7 +5303,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ComponentRepository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ComponentRepository_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ComponentRepository_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ComponentRepository_PROXY_FACTORY_ADAPTER; class TAO_IR_ComponentRepository_Smart_Proxy_Base : public virtual IR_ComponentRepository { public: @@ -5401,6 +5407,7 @@ class TAO_IR_ModuleDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ModuleDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ModuleDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ModuleDef_Default_Proxy_Factory *df, @@ -5430,7 +5437,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ModuleDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ModuleDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ModuleDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ModuleDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ModuleDef_Smart_Proxy_Base : public virtual IR_ModuleDef { public: @@ -5611,6 +5618,7 @@ class TAO_IR_ConstantDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ConstantDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ConstantDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ConstantDef_Default_Proxy_Factory *df, @@ -5640,7 +5648,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ConstantDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ConstantDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ConstantDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ConstantDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ConstantDef_Smart_Proxy_Base : public virtual IR_ConstantDef { public: @@ -5868,6 +5876,7 @@ class TAO_IR_TypedefDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_TypedefDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_TypedefDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_TypedefDef_Default_Proxy_Factory *df, @@ -5897,7 +5906,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_TypedefDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_TypedefDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_TypedefDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_TypedefDef_PROXY_FACTORY_ADAPTER; class TAO_IR_TypedefDef_Smart_Proxy_Base : public virtual IR_TypedefDef { public: @@ -6054,6 +6063,7 @@ class TAO_IR_StructDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_StructDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_StructDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_StructDef_Default_Proxy_Factory *df, @@ -6083,7 +6093,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_StructDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_StructDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_StructDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_StructDef_PROXY_FACTORY_ADAPTER; class TAO_IR_StructDef_Smart_Proxy_Base : public virtual IR_StructDef { public: @@ -6219,6 +6229,7 @@ class TAO_IR_UnionDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_UnionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_UnionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_UnionDef_Default_Proxy_Factory *df, @@ -6248,7 +6259,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_UnionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_UnionDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_UnionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_UnionDef_PROXY_FACTORY_ADAPTER; class TAO_IR_UnionDef_Smart_Proxy_Base : public virtual IR_UnionDef { public: @@ -6384,6 +6395,7 @@ class TAO_IR_EnumDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_EnumDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_EnumDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_EnumDef_Default_Proxy_Factory *df, @@ -6413,7 +6425,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_EnumDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_EnumDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_EnumDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_EnumDef_PROXY_FACTORY_ADAPTER; class TAO_IR_EnumDef_Smart_Proxy_Base : public virtual IR_EnumDef { public: @@ -6523,7 +6535,9 @@ class TAO_IR_AliasDef_Proxy_Factory_Adapter { public: + friend class ACE_Singleton<TAO_IR_AliasDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_AliasDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_AliasDef_Default_Proxy_Factory *df, @@ -6553,7 +6567,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_AliasDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_AliasDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_AliasDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_AliasDef_PROXY_FACTORY_ADAPTER; class TAO_IR_AliasDef_Smart_Proxy_Base : public virtual IR_AliasDef { public: @@ -6647,6 +6661,7 @@ class TAO_IR_NativeDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_NativeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_NativeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_NativeDef_Default_Proxy_Factory *df, @@ -6676,7 +6691,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_NativeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_NativeDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_NativeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_NativeDef_PROXY_FACTORY_ADAPTER; class TAO_IR_NativeDef_Smart_Proxy_Base : public virtual IR_NativeDef { public: @@ -6761,6 +6776,7 @@ class TAO_IR_PrimitiveDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_PrimitiveDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_PrimitiveDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_PrimitiveDef_Default_Proxy_Factory *df, @@ -6790,7 +6806,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_PrimitiveDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_PrimitiveDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_PrimitiveDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_PrimitiveDef_PROXY_FACTORY_ADAPTER; class TAO_IR_PrimitiveDef_Smart_Proxy_Base : public virtual IR_PrimitiveDef { public: @@ -6892,6 +6908,7 @@ class TAO_IR_StringDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_StringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_StringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_StringDef_Default_Proxy_Factory *df, @@ -6921,7 +6938,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_StringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_StringDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_StringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_StringDef_PROXY_FACTORY_ADAPTER; class TAO_IR_StringDef_Smart_Proxy_Base : public virtual IR_StringDef { public: @@ -7032,6 +7049,7 @@ class TAO_IR_WstringDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_WstringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_WstringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_WstringDef_Default_Proxy_Factory *df, @@ -7061,7 +7079,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_WstringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_WstringDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_WstringDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_WstringDef_PROXY_FACTORY_ADAPTER; class TAO_IR_WstringDef_Smart_Proxy_Base : public virtual IR_WstringDef { public: @@ -7189,6 +7207,7 @@ class TAO_IR_FixedDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_FixedDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_FixedDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_FixedDef_Default_Proxy_Factory *df, @@ -7218,7 +7237,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_FixedDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_FixedDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_FixedDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_FixedDef_PROXY_FACTORY_ADAPTER; class TAO_IR_FixedDef_Smart_Proxy_Base : public virtual IR_FixedDef { public: @@ -7371,6 +7390,7 @@ class TAO_IR_SequenceDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_SequenceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_SequenceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_SequenceDef_Default_Proxy_Factory *df, @@ -7400,7 +7420,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_SequenceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_SequenceDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_SequenceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_SequenceDef_PROXY_FACTORY_ADAPTER; class TAO_IR_SequenceDef_Smart_Proxy_Base : public virtual IR_SequenceDef { public: @@ -7561,6 +7581,7 @@ class TAO_IR_ArrayDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ArrayDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ArrayDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ArrayDef_Default_Proxy_Factory *df, @@ -7590,7 +7611,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ArrayDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ArrayDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ArrayDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ArrayDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ArrayDef_Smart_Proxy_Base : public virtual IR_ArrayDef { public: @@ -7734,6 +7755,7 @@ class TAO_IR_ExceptionDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ExceptionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ExceptionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ExceptionDef_Default_Proxy_Factory *df, @@ -7763,7 +7785,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ExceptionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ExceptionDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ExceptionDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ExceptionDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ExceptionDef_Smart_Proxy_Base : public virtual IR_ExceptionDef { public: @@ -8254,6 +8276,7 @@ class TAO_IR_AttributeDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_AttributeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_AttributeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_AttributeDef_Default_Proxy_Factory *df, @@ -8283,7 +8306,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_AttributeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_AttributeDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_AttributeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_AttributeDef_PROXY_FACTORY_ADAPTER; class TAO_IR_AttributeDef_Smart_Proxy_Base : public virtual IR_AttributeDef { public: @@ -8870,6 +8893,7 @@ class TAO_IR_OperationDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_OperationDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_OperationDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_OperationDef_Default_Proxy_Factory *df, @@ -8899,7 +8923,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_OperationDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_OperationDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_OperationDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_OperationDef_PROXY_FACTORY_ADAPTER; class TAO_IR_OperationDef_Smart_Proxy_Base : public virtual IR_OperationDef { public: @@ -9548,6 +9572,7 @@ class TAO_IR_InterfaceDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_InterfaceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_InterfaceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_InterfaceDef_Default_Proxy_Factory *df, @@ -9577,7 +9602,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_InterfaceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_InterfaceDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_InterfaceDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_InterfaceDef_PROXY_FACTORY_ADAPTER; class TAO_IR_InterfaceDef_Smart_Proxy_Base : public virtual IR_InterfaceDef { public: @@ -10084,6 +10109,7 @@ class TAO_IR_ValueMemberDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ValueMemberDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ValueMemberDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ValueMemberDef_Default_Proxy_Factory *df, @@ -10113,7 +10139,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ValueMemberDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ValueMemberDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ValueMemberDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ValueMemberDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ValueMemberDef_Smart_Proxy_Base : public virtual IR_ValueMemberDef { public: @@ -10404,6 +10430,7 @@ class TAO_IR_ValueDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ValueDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ValueDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ValueDef_Default_Proxy_Factory *df, @@ -10433,7 +10460,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ValueDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ValueDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ValueDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ValueDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ValueDef_Smart_Proxy_Base : public virtual IR_ValueDef { public: @@ -10772,6 +10799,7 @@ class TAO_IR_ValueBoxDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ValueBoxDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ValueBoxDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ValueBoxDef_Default_Proxy_Factory *df, @@ -10801,7 +10829,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ValueBoxDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ValueBoxDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ValueBoxDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ValueBoxDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ValueBoxDef_Smart_Proxy_Base : public virtual IR_ValueBoxDef { public: @@ -10903,6 +10931,7 @@ class TAO_IR_ProvidesDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ProvidesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ProvidesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ProvidesDef_Default_Proxy_Factory *df, @@ -10932,7 +10961,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ProvidesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ProvidesDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ProvidesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ProvidesDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ProvidesDef_Smart_Proxy_Base : public virtual IR_ProvidesDef { public: @@ -11096,6 +11125,7 @@ class TAO_IR_UsesDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_UsesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_UsesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_UsesDef_Default_Proxy_Factory *df, @@ -11125,7 +11155,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_UsesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_UsesDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_UsesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_UsesDef_PROXY_FACTORY_ADAPTER; class TAO_IR_UsesDef_Smart_Proxy_Base : public virtual IR_UsesDef { public: @@ -11540,6 +11570,7 @@ class TAO_IR_EventDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_EventDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_EventDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_EventDef_Default_Proxy_Factory *df, @@ -11569,7 +11600,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_EventDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_EventDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_EventDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_EventDef_PROXY_FACTORY_ADAPTER; class TAO_IR_EventDef_Smart_Proxy_Base : public virtual IR_EventDef { public: @@ -11726,6 +11757,7 @@ class TAO_IR_EmitsDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_EmitsDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_EmitsDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_EmitsDef_Default_Proxy_Factory *df, @@ -11755,7 +11787,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_EmitsDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_EmitsDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_EmitsDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_EmitsDef_PROXY_FACTORY_ADAPTER; class TAO_IR_EmitsDef_Smart_Proxy_Base : public virtual IR_EmitsDef { public: @@ -11832,6 +11864,7 @@ class TAO_IR_PublishesDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_PublishesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_PublishesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_PublishesDef_Default_Proxy_Factory *df, @@ -11861,7 +11894,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_PublishesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_PublishesDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_PublishesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_PublishesDef_PROXY_FACTORY_ADAPTER; class TAO_IR_PublishesDef_Smart_Proxy_Base : public virtual IR_PublishesDef { public: @@ -11938,6 +11971,7 @@ class TAO_IR_ConsumesDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ConsumesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ConsumesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ConsumesDef_Default_Proxy_Factory *df, @@ -11967,7 +12001,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ConsumesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ConsumesDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ConsumesDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ConsumesDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ConsumesDef_Smart_Proxy_Base : public virtual IR_ConsumesDef { public: @@ -12178,6 +12212,7 @@ class TAO_IR_ComponentDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_ComponentDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_ComponentDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_ComponentDef_Default_Proxy_Factory *df, @@ -12207,7 +12242,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_ComponentDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ComponentDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_ComponentDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_ComponentDef_PROXY_FACTORY_ADAPTER; class TAO_IR_ComponentDef_Smart_Proxy_Base : public virtual IR_ComponentDef { public: @@ -12506,6 +12541,7 @@ class TAO_IR_PrimaryKeyDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_PrimaryKeyDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_PrimaryKeyDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_PrimaryKeyDef_Default_Proxy_Factory *df, @@ -12535,7 +12571,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_PrimaryKeyDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_PrimaryKeyDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_PrimaryKeyDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_PrimaryKeyDef_PROXY_FACTORY_ADAPTER; class TAO_IR_PrimaryKeyDef_Smart_Proxy_Base : public virtual IR_PrimaryKeyDef { public: @@ -12692,6 +12728,7 @@ class TAO_IR_FactoryDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_FactoryDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_FactoryDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_FactoryDef_Default_Proxy_Factory *df, @@ -12721,7 +12758,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_FactoryDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_FactoryDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_FactoryDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_FactoryDef_PROXY_FACTORY_ADAPTER; class TAO_IR_FactoryDef_Smart_Proxy_Base : public virtual IR_FactoryDef { public: @@ -12798,6 +12835,7 @@ class TAO_IR_FinderDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_FinderDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_FinderDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_FinderDef_Default_Proxy_Factory *df, @@ -12827,7 +12865,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_FinderDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_FinderDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_FinderDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_FinderDef_PROXY_FACTORY_ADAPTER; class TAO_IR_FinderDef_Smart_Proxy_Base : public virtual IR_FinderDef { public: @@ -12990,6 +13028,7 @@ class TAO_IR_HomeDef_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_IR_HomeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_IR_HomeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_IR_HomeDef_Default_Proxy_Factory *df, @@ -13019,7 +13058,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_IR_HomeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_HomeDef_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_IR_HomeDef_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_IR_HomeDef_PROXY_FACTORY_ADAPTER; class TAO_IR_HomeDef_Smart_Proxy_Base : public virtual IR_HomeDef { public: @@ -13484,6 +13523,7 @@ class TAO_CORBA_TypeCodeFactory_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_CORBA_TypeCodeFactory_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_CORBA_TypeCodeFactory_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_CORBA_TypeCodeFactory_Default_Proxy_Factory *df, @@ -13513,7 +13553,7 @@ protected: ACE_SYNCH_RECURSIVE_MUTEX lock_; }; - typedef ACE_Singleton<TAO_CORBA_TypeCodeFactory_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_CORBA_TypeCodeFactory_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_CORBA_TypeCodeFactory_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_CORBA_TypeCodeFactory_PROXY_FACTORY_ADAPTER; class TAO_CORBA_TypeCodeFactory_Smart_Proxy_Base : public virtual CORBA_TypeCodeFactory { public: diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile index 866d8b1cb1d..7cb4625ff7c 100644 --- a/TAO/tao/Makefile +++ b/TAO/tao/Makefile @@ -61,7 +61,11 @@ PUB_HDRS = \ IORC \ IORManipulation \ BoundC \ - GIOPC + GIOPC \ + TAO_Export \ + TAO_Singleton_Manager \ + TAO_Singleton \ + DLL_ORB POA_FILES = \ Object_Adapter \ @@ -206,10 +210,15 @@ ORB_CORE_FILES = \ BoundsC \ TAOC \ TAOS \ - Object_Loader + Object_Loader \ + TAO_Singleton_Manager \ + DLL_ORB DYNAMIC_ANY_FILES = +TEMPLATE_FILES = \ + TAO_Singleton + ifndef TAO_ROOT TAO_ROOT = $(ACE_ROOT)/TAO endif diff --git a/TAO/tao/Makefile.am b/TAO/tao/Makefile.am index 822e480ea7b..1a8f7017d00 100644 --- a/TAO/tao/Makefile.am +++ b/TAO/tao/Makefile.am @@ -47,19 +47,19 @@ PLUGGABLE_PROTOCOLS_FILES = \ IORManipulation.cpp PLUGGABLE_MESSAGING_FILES = \ -Pluggable_Messaging \ -Pluggable_Messaging_Utils \ -GIOP_Message_Base \ -GIOP_Message_Connectors \ -GIOP_Message_Acceptors \ -GIOP_Message_Accept_State \ -GIOP_Utils \ -GIOP_Message_Headers \ -target_specification \ -GIOP_Server_Request \ -GIOP_Message_Lite \ -GIOP_Message_State \ -Tagged_Profile + Pluggable_Messaging \ + Pluggable_Messaging_Utils \ + GIOP_Message_Base \ + GIOP_Message_Connectors \ + GIOP_Message_Acceptors \ + GIOP_Message_Accept_State \ + GIOP_Utils \ + GIOP_Message_Headers \ + target_specification \ + GIOP_Server_Request \ + GIOP_Message_Lite \ + GIOP_Message_State \ + Tagged_Profile DEFAULT_RESOURCES_FILES = \ default_client.cpp \ @@ -163,7 +163,9 @@ ORB_CORE_FILES = \ Direct_Priority_Mapping.cpp \ RT_Current.cpp \ Pool_Per_Endpoint.cpp \ - GIOPC.cpp + GIOPC.cpp \ + TAO_Singleton_Manager.cpp \ + DLL_ORB.cpp DYNAMIC_ANY_FILES = \ DynAnyC.cpp \ @@ -240,6 +242,7 @@ TEMPLATE_FILES = \ Sequence_T.cpp \ TAOS_T.cpp \ TimeBaseS_T.cpp \ + TAO_Singleton.cpp else TEMPLATE_FILES = endif @@ -266,6 +269,7 @@ HEADER_FILES = \ Connector_Registry.h \ Context.h \ CurrentC.h \ + DLL_ORB.h Direct_Priority_Mapping.h \ DomainC.h \ DomainS_T.h \ @@ -355,6 +359,7 @@ HEADER_FILES = \ TAOS.h \ TAOS_T.h \ TAO_Internal.h \ + TAO_Singleton.h \ Tagged_Components.h \ TimeBaseC.h \ TimeBaseS.h \ @@ -414,6 +419,7 @@ INLINE_FILES = \ Connector_Registry.i \ Context.i \ CurrentC.i \ + DLL_ORB.inl \ Direct_Priority_Mapping.i \ DomainC.i \ DomainS_T.i \ @@ -482,6 +488,7 @@ INLINE_FILES = \ Single_Reactor.i \ Stub.i \ Sync_Strategies.i \ + TAO_Singleton.inl \ TAOC.i \ TAOS.i \ TAOS_T.i \ diff --git a/TAO/tao/Makefile.bor b/TAO/tao/Makefile.bor index 75c7d5c2a76..b2c88efb121 100644 --- a/TAO/tao/Makefile.bor +++ b/TAO/tao/Makefile.bor @@ -27,6 +27,7 @@ OBJFILES = \ $(OBJDIR)\default_resource.obj \ $(OBJDIR)\default_server.obj \ $(OBJDIR)\Direct_Priority_Mapping.obj \ + $(OBJDIR)\DLL_ORB.obj \ $(OBJDIR)\DomainC.obj \ $(OBJDIR)\DomainS.obj \ $(OBJDIR)\DynAny_i.obj \ @@ -143,6 +144,7 @@ OBJFILES = \ $(OBJDIR)\Tagged_Profile.obj \ $(OBJDIR)\TAO.obj \ $(OBJDIR)\TAO_Internal.obj \ + $(OBJDIR)\TAO_Singleton_Manager.obj \ $(OBJDIR)\TAOC.obj \ $(OBJDIR)\TAOS.obj \ $(OBJDIR)\target_specification.obj \ diff --git a/TAO/tao/MessagingC.cpp b/TAO/tao/MessagingC.cpp index 0cbfa58c05d..ed0fca74ade 100644 --- a/TAO/tao/MessagingC.cpp +++ b/TAO/tao/MessagingC.cpp @@ -1795,9 +1795,9 @@ Messaging::TAO_Messaging_ReplyHandler_Smart_Proxy_Base::get_proxy (void) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) - template class ACE_Singleton<Messaging::TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; + template class TAO_Singleton<Messaging::TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - #pragma instantiate ACE_Singleton<Messaging::TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> + #pragma instantiate TAO_Singleton<Messaging::TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /* TAO_HAS_SMART_PROXIES */ diff --git a/TAO/tao/MessagingC.h b/TAO/tao/MessagingC.h index dfa4d6ef04e..36bc43877da 100644 --- a/TAO/tao/MessagingC.h +++ b/TAO/tao/MessagingC.h @@ -35,7 +35,7 @@ #if (TAO_HAS_SMART_PROXIES == 1) #include "tao/Smart_Proxies.h" -#include "ace/Singleton.h" +#include "tao/TAO_Singleton.h" #endif /*TAO_HAS_SMART_PROXIES == 1*/ #if defined (TAO_EXPORT_MACRO) @@ -2584,6 +2584,7 @@ class TAO_Export TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter public: friend class ACE_Singleton<TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; + friend class TAO_Singleton<TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>; int register_proxy_factory ( TAO_Messaging_ReplyHandler_Default_Proxy_Factory *df, @@ -2614,7 +2615,7 @@ class TAO_Export TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter }; - typedef ACE_Singleton<TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_Messaging_ReplyHandler_PROXY_FACTORY_ADAPTER; + typedef TAO_Singleton<TAO_Messaging_ReplyHandler_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_Messaging_ReplyHandler_PROXY_FACTORY_ADAPTER; class TAO_Export TAO_Messaging_ReplyHandler_Smart_Proxy_Base : public virtual ReplyHandler, diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 9cd7de967e0..7bbdac0ade0 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -1,12 +1,10 @@ // $Id$ #include "tao/ORB.h" -#include "tao/Acceptor_Registry.h" #include "tao/Connector_Registry.h" #include "ace/Dynamic_Service.h" #include "ace/Service_Repository.h" -#include "ace/Object_Manager.h" #include "ace/SOCK_Dgram_Mcast.h" #include "ace/SOCK_Acceptor.h" #include "ace/Thread_Manager.h" @@ -174,15 +172,12 @@ CORBA_ORB::CORBA_ORB (TAO_ORB_Core *orb_core) CORBA_ORB::~CORBA_ORB (void) { - ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, - tao_mon, - *ACE_Static_Object_Lock::instance ())); - - CORBA_ORB::orb_init_count_--; + // This destructor is only invoked when the last ORB reference (not + // instance) is being destroyed. # ifdef TAO_HAS_VALUETYPE // delete valuetype_factory_map_; - // not really, its a singleton + // @@ not really, its a singleton # endif /* TAO_HAS_VALUETYPE */ } @@ -303,7 +298,11 @@ CORBA_ORB::create_list (CORBA::Long count, // Create an empty list ACE_NEW_THROW_EX (new_list, CORBA::NVList, - CORBA::NO_MEMORY ()); + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); ACE_CHECK; // If count is greater than 0, create a list of NamedValues. @@ -316,7 +315,11 @@ CORBA_ORB::create_list (CORBA::Long count, CORBA::NamedValue_ptr nv = 0; ACE_NEW_THROW_EX (nv, CORBA::NamedValue, - CORBA::NO_MEMORY ()); + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); ACE_CHECK; new_list->values_.enqueue_tail (nv); @@ -332,7 +335,11 @@ CORBA_ORB::create_exception_list (CORBA::ExceptionList_ptr &list, CORBA_Environment &ACE_TRY_ENV) { ACE_NEW_THROW_EX (list, CORBA::ExceptionList (), - CORBA::NO_MEMORY ()); + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); } void @@ -340,7 +347,11 @@ CORBA_ORB::create_environment (CORBA::Environment_ptr &environment, CORBA_Environment &ACE_TRY_ENV) { ACE_NEW_THROW_EX (environment, CORBA::Environment (), - CORBA::NO_MEMORY ()); + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); } CORBA::Boolean @@ -348,8 +359,11 @@ CORBA_ORB::get_service_information (CORBA::ServiceType /* service_type */, CORBA::ServiceInformation_out /* service_information */, CORBA::Environment &ACE_TRY_ENV) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO), + ACE_THROW_RETURN (CORBA::NO_IMPLEMENT ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO), 0); } @@ -359,54 +373,76 @@ CORBA_ORB::create_named_value (CORBA::NamedValue_ptr &nv, { ACE_NEW_THROW_EX (nv, CORBA::NamedValue, - CORBA::NO_MEMORY ()); + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); } void CORBA_ORB::create_context_list (CORBA::ContextList_ptr &, CORBA_Environment &ACE_TRY_ENV) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO)); + ACE_THROW (CORBA::NO_IMPLEMENT ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO)); } void CORBA_ORB::get_default_context (CORBA::Context_ptr &, CORBA_Environment &ACE_TRY_ENV) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO)); + ACE_THROW (CORBA::NO_IMPLEMENT ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO)); } void CORBA_ORB::send_multiple_requests_oneway (const CORBA_ORB_RequestSeq, CORBA_Environment &ACE_TRY_ENV) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO)); + ACE_THROW (CORBA::NO_IMPLEMENT ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO)); } void CORBA_ORB::send_multiple_requests_deferred (const CORBA_ORB_RequestSeq, CORBA_Environment &ACE_TRY_ENV) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO)); + ACE_THROW (CORBA::NO_IMPLEMENT ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO)); } void CORBA_ORB::get_next_response (CORBA_Request_ptr &, CORBA_Environment &ACE_TRY_ENV) { - ACE_THROW (CORBA::NO_IMPLEMENT (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO)); + ACE_THROW (CORBA::NO_IMPLEMENT ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO)); } CORBA::Boolean CORBA_ORB::poll_next_response (CORBA_Environment &ACE_TRY_ENV) { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO), + ACE_THROW_RETURN (CORBA::NO_IMPLEMENT ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO), 0); } @@ -793,7 +829,7 @@ CORBA_ORB::multicast_query (char *&buf, // in order to support pluggable protocols! But, it does use // UDP and multicast. Not all transport protocols may support // this, connectionless and multicast. fredk -// @@ FRED: Should define a flag, something like Protocol_Has_Multicast + // @@ FRED: Should define a flag, something like Protocol_Has_Multicast // If there is no multicast, then this functionality is not available // and we return NULL. @@ -1235,58 +1271,50 @@ CORBA_WString_var::operator= (const CORBA_WString_var& r) void CORBA_ORB::init_orb_globals (CORBA::Environment &ACE_TRY_ENV) { - ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, tao_mon, - *ACE_Static_Object_Lock::instance ())); + // This method should be invoked atomically. It is the caller's + // responsibility to ensure that this condition is satisfied. - // Put these initializations here so that exceptions are enabled - // immediately. - - if (CORBA_ORB::orb_init_count_ == 0) - { #if defined(ACE_HAS_EXCEPTIONS) - set_unexpected (CORBA_ORB::_tao_unexpected_exception); + set_unexpected (CORBA_ORB::_tao_unexpected_exception); #endif /* ACE_HAS_EXCEPTIONS */ - // initialize the system TypeCodes - TAO_TypeCodes::init (); + // initialize the system TypeCodes + TAO_TypeCodes::init (); - // initialize the system exceptions - TAO_Exceptions::init (ACE_TRY_ENV); - ACE_CHECK; + // initialize the system exceptions + TAO_Exceptions::init (ACE_TRY_ENV); + ACE_CHECK; - // Verify some of the basic implementation requirements. This - // test gets optimized away by a decent compiler (or else the - // rest of the routine does). - // - // NOTE: we still "just" assume that native floating point is - // IEEE. - if (sizeof (CORBA::Short) != 2 - || sizeof (CORBA::Long) != 4 - || sizeof (CORBA::LongLong) != 8 - || sizeof (CORBA::Float) != 4 - || sizeof (CORBA::Double) != 8 - || sizeof (CORBA::LongDouble) != 16 - || sizeof (CORBA::WChar) < 2 - || sizeof (void *) != ACE_SIZEOF_VOID_P) - { - ACE_DEBUG ((LM_DEBUG, - "%s; ERROR: unexpected basic type size; " - "s:%d l:%d ll:%d f:%d d:%d ld:%d wc:%d v:%d\n" - "please reconfigure TAO\n", - __FILE__, - sizeof (CORBA::Short), - sizeof (CORBA::Long), - sizeof (CORBA::LongLong), - sizeof (CORBA::Float), - sizeof (CORBA::Double), - sizeof (CORBA::LongDouble), - sizeof (CORBA::WChar), - sizeof (void *))); - - ACE_THROW (CORBA::INITIALIZE ()); - } + // Verify some of the basic implementation requirements. This test + // gets optimized away by a decent compiler (or else the rest of the + // routine does). + // + // NOTE: we still "just" assume that native floating point is IEEE. + if (sizeof (CORBA::Short) != 2 + || sizeof (CORBA::Long) != 4 + || sizeof (CORBA::LongLong) != 8 + || sizeof (CORBA::Float) != 4 + || sizeof (CORBA::Double) != 8 + || sizeof (CORBA::LongDouble) != 16 + || sizeof (CORBA::WChar) < 2 + || sizeof (void *) != ACE_SIZEOF_VOID_P) + { + ACE_DEBUG ((LM_DEBUG, + "%s; ERROR: unexpected basic type size; " + "s:%d l:%d ll:%d f:%d d:%d ld:%d wc:%d v:%d\n" + "please reconfigure TAO\n", + __FILE__, + sizeof (CORBA::Short), + sizeof (CORBA::Long), + sizeof (CORBA::LongLong), + sizeof (CORBA::Float), + sizeof (CORBA::Double), + sizeof (CORBA::LongDouble), + sizeof (CORBA::WChar), + sizeof (void *))); + + ACE_THROW (CORBA::INITIALIZE ()); } - CORBA_ORB::orb_init_count_++; } void CORBA_ORB::_tao_unexpected_exception (void) @@ -1301,8 +1329,7 @@ void CORBA_ORB::_tao_unexpected_exception (void) // **************************************************************** -// ORB initialisation, per OMG document 98-12-01. -// +// ORB initialization, per OMG document 98-12-01. CORBA::ORB_ptr CORBA::ORB_init (int &argc, @@ -1327,13 +1354,21 @@ CORBA::ORB_init (int &argc, *ACE_Static_Object_Lock::instance (), CORBA::ORB::_nil ())); - // Make sure initialization of TAO globals only occurs once. - CORBA_ORB::init_orb_globals (ACE_TRY_ENV); - ACE_CHECK_RETURN (CORBA::ORB::_nil ()); + // Make sure TAO's singleton manager is initialized. + if (TAO_Singleton_Manager::instance ()->init () == -1) + return CORBA::ORB::_nil (); + + if (CORBA::ORB::orb_init_count_ == 0) + { + CORBA_ORB::init_orb_globals (ACE_TRY_ENV); + ACE_CHECK_RETURN (CORBA::ORB::_nil ()); + + CORBA::ORB::orb_init_count_++; + } + + // Make sure the following is done after the global ORB + // initialization since we need to have exceptions initialized. - // @@ Make sure the following is done after the global ORB - // initialization since we need to have exceptions initialized. - // // It doesn't make sense for argc to be zero and argv to be // non-empty/zero, or for argc to be greater than zero and argv be // zero. @@ -1408,13 +1443,15 @@ CORBA::ORB_init (int &argc, } - // @@ As part of the ORB re-architecture this will the point where - // we locate the right ORB (from a table) and use that one - // instead of just creating a new one every time. + // An ORB corresponding to the desired ORBid doesn't exist so create + // a new one. ACE_NEW_THROW_EX (oc, TAO_ORB_Core (orbid), - CORBA::NO_MEMORY (TAO_DEFAULT_MINOR_CODE, - CORBA::COMPLETED_NO)); + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); ACE_CHECK_RETURN (CORBA::ORB::_nil ()); TAO_ORB_Core_Auto_Ptr safe_oc (oc); diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 4e1982ce759..ad5c0b9a256 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -26,7 +26,6 @@ #include "tao/Priority_Mapping_Manager.h" #include "tao/RT_Current.h" -#include "ace/Object_Manager.h" #include "ace/Env_Value_T.h" #include "ace/Dynamic_Service.h" #include "ace/Arg_Shifter.h" @@ -1291,8 +1290,9 @@ TAO_ORB_Core::fini (void) // this method is invoked? Specifically, is it possible that // the Server_Strategy_Factory will already have been unloaded? if (this->server_factory ()->activate_server_connections () == 0) - (void) this->reactor ()->remove_handler (this->handle_set_, - ACE_Event_Handler::ALL_EVENTS_MASK); + (void) this->reactor ()->remove_handler ( + this->handle_set_, + ACE_Event_Handler::ALL_EVENTS_MASK); TAO_Internal::close_services (); @@ -2407,12 +2407,6 @@ TAO_ORB_Table::~TAO_ORB_Table (void) (*i).int_id_->_decr_refcnt (); } this->table_.close (); - - // free up all the ORB owned Exceptions - TAO_Exceptions::fini (); - - // free up all the ORB owned TypeCodes - TAO_TypeCodes::fini (); } TAO_ORB_Table::Iterator @@ -2457,7 +2451,6 @@ TAO_ORB_Table::unbind (const char *orb_id) int result = this->table_.unbind (id, orb_core); if (result == 0) { - orb_core->_decr_refcnt (); if (orb_core == this->first_orb_) { Iterator begin = this->begin (); @@ -2467,7 +2460,10 @@ TAO_ORB_Table::unbind (const char *orb_id) else this->first_orb_ = 0; } + + orb_core->_decr_refcnt (); } + return result; } @@ -2486,11 +2482,21 @@ TAO_ORB_Core_instance (void) if (orb_table->first_orb () == 0) { + // Calling CORBA::ORB_init() returns a duplicated ORB + // reference, so make sure that reference is stored in an + // ORB_var so that no leak occurs. The duplicate ORB + // reference isn't needed outside the scope of this function + // since the corresponding ORB Core instance will still + // exist in the ORB table after the ORB reference is + // destroyed. + + CORBA::ORB_var orb; + int argc = 0; ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { - (void) CORBA::ORB_init (argc, 0, 0, ACE_TRY_ENV); + orb = CORBA::ORB_init (argc, 0, 0, ACE_TRY_ENV); ACE_TRY_CHECK; } ACE_CATCHANY @@ -2514,11 +2520,11 @@ template class ACE_Guard<ACE_Reverse_Lock<ACE_SYNCH_MUTEX> >; template class ACE_Env_Value<int>; template class ACE_Env_Value<u_int>; -template class ACE_TSS_Singleton<TAO_TSS_Resources, ACE_SYNCH_MUTEX>; +template class TAO_TSS_Singleton<TAO_TSS_Resources, ACE_SYNCH_MUTEX>; template class ACE_TSS<TAO_TSS_Resources>; template class ACE_TSS<TAO_ORB_Core_TSS_Resources>; -template class ACE_Singleton<TAO_ORB_Table,ACE_SYNCH_MUTEX>; +template class TAO_Singleton<TAO_ORB_Table,ACE_SYNCH_MUTEX>; template class ACE_Map_Entry<ACE_CString,TAO_ORB_Core*>; template class ACE_Map_Manager<ACE_CString,TAO_ORB_Core*,ACE_Null_Mutex>; template class ACE_Map_Iterator_Base<ACE_CString,TAO_ORB_Core*,ACE_Null_Mutex>; @@ -2533,11 +2539,11 @@ template class ACE_Map_Reverse_Iterator<ACE_CString,TAO_ORB_Core*,ACE_Null_Mutex #pragma instantiate ACE_Env_Value<int> #pragma instantiate ACE_Env_Value<u_int> -#pragma instantiate ACE_TSS_Singleton<TAO_TSS_Resources, ACE_SYNCH_MUTEX> +#pragma instantiate TAO_TSS_Singleton<TAO_TSS_Resources, ACE_SYNCH_MUTEX> #pragma instantiate ACE_TSS<TAO_TSS_Resources> #pragma instantiate ACE_TSS<TAO_ORB_Core_TSS_Resources> -#pragma instantiate ACE_Singleton<TAO_ORB_Table,ACE_SYNCH_MUTEX> +#pragma instantiate TAO_Singleton<TAO_ORB_Table,ACE_SYNCH_MUTEX> #pragma instantiate ACE_Map_Entry<ACE_CString,TAO_ORB_Core*> #pragma instantiate ACE_Map_Manager<ACE_CString,TAO_ORB_Core*,ACE_Null_Mutex> #pragma instantiate ACE_Map_Iterator_Base<ACE_CString,TAO_ORB_Core*,ACE_Null_Mutex> diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h index caf1b416a20..c9a2f9c05fc 100644 --- a/TAO/tao/ORB_Core.h +++ b/TAO/tao/ORB_Core.h @@ -29,9 +29,10 @@ #include "tao/Resource_Factory.h" #include "tao/params.h" #include "tao/PortableServerC.h" +#include "tao/TAO_Singleton_Manager.h" +#include "tao/TAO_Singleton.h" #include "ace/Map_Manager.h" -#include "ace/Singleton.h" // Forward declarations class TAO_POA; @@ -802,7 +803,7 @@ public: }; // @@ Must go away.... -typedef ACE_TSS_Singleton<TAO_TSS_Resources, ACE_SYNCH_MUTEX> +typedef TAO_TSS_Singleton<TAO_TSS_Resources, ACE_SYNCH_MUTEX> TAO_TSS_RESOURCES; // **************************************************************** @@ -843,7 +844,8 @@ public: // Return a unique instance protected: - friend class ACE_Singleton<TAO_ORB_Table,ACE_SYNCH_MUTEX>; + friend class ACE_Singleton<TAO_ORB_Table, ACE_SYNCH_MUTEX>; + friend class TAO_Singleton<TAO_ORB_Table, ACE_SYNCH_MUTEX>; TAO_ORB_Table (void); // Constructor diff --git a/TAO/tao/ORB_Core.i b/TAO/tao/ORB_Core.i index 317c02a6049..d9881a54d16 100644 --- a/TAO/tao/ORB_Core.i +++ b/TAO/tao/ORB_Core.i @@ -483,7 +483,7 @@ TAO_ORB_Core_Auto_Ptr::operator *() const ACE_INLINE TAO_ORB_Table * TAO_ORB_Table::instance (void) { - return ACE_Singleton<TAO_ORB_Table, ACE_SYNCH_MUTEX>::instance (); + return TAO_Singleton<TAO_ORB_Table, ACE_SYNCH_MUTEX>::instance (); } ACE_INLINE TAO_ORB_Core * diff --git a/TAO/tao/Operation_Table.cpp b/TAO/tao/Operation_Table.cpp index c5ac60ba652..8d0e56b30fa 100644 --- a/TAO/tao/Operation_Table.cpp +++ b/TAO/tao/Operation_Table.cpp @@ -367,7 +367,7 @@ template class ACE_Hash_Map_Iterator_Ex<const char *, TAO_Skeleton, ACE_Hash<con template class ACE_Hash_Map_Reverse_Iterator_Ex<const char *, TAO_Skeleton, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>; template class ACE_Hash_Map_Manager_Ex<const char *, TAO_Skeleton, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>; template class ACE_Hash_Map_Entry<const char *, TAO_Skeleton>; -template class ACE_Singleton<TAO_Operation_Table_Parameters, ACE_SYNCH_RECURSIVE_MUTEX>; +template class TAO_Singleton<TAO_Operation_Table_Parameters, ACE_SYNCH_RECURSIVE_MUTEX>; #elif defined (ACE_HAS_GNU_REPO) // This is necessary with g++ 2.91.66 to avoid a couple of strange // unresolved ACE_Hash_Map_Entry symbols. (Strange because c++filt @@ -379,5 +379,5 @@ template class ACE_Hash_Map_Entry<char const *, void (*)(CORBA_ServerRequest &, #pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const char *, TAO_Skeleton, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> #pragma instantiate ACE_Hash_Map_Manager_Ex<const char *, TAO_Skeleton, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> #pragma instantiate ACE_Hash_Map_Entry<const char *, TAO_Skeleton> -#pragma instantiate ACE_Singleton<TAO_Operation_Table_Parameters, ACE_SYNCH_RECURSIVE_MUTEX> +#pragma instantiate TAO_Singleton<TAO_Operation_Table_Parameters, ACE_SYNCH_RECURSIVE_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/Operation_Table.h b/TAO/tao/Operation_Table.h index 0c5eff7e321..bcc2ab32ce5 100644 --- a/TAO/tao/Operation_Table.h +++ b/TAO/tao/Operation_Table.h @@ -24,7 +24,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Singleton.h" +#include "tao/TAO_Singleton.h" #include "ace/Synch.h" #include "tao/corbafwd.h" @@ -327,13 +327,13 @@ private: // Define a singleton instance of operation table parameters. -typedef ACE_Singleton<TAO_Operation_Table_Parameters, +typedef TAO_Singleton<TAO_Operation_Table_Parameters, ACE_SYNCH_RECURSIVE_MUTEX> TAO_OP_TABLE_PARAMETERS; // Define a singleton instance of the operation table factory. -typedef ACE_Singleton<TAO_Operation_Table_Factory, +typedef TAO_Singleton<TAO_Operation_Table_Factory, ACE_SYNCH_RECURSIVE_MUTEX> TAO_OP_TABLE_FACTORY; diff --git a/TAO/tao/SHMIOP_Factory.cpp b/TAO/tao/SHMIOP_Factory.cpp index 75e04cbc5b4..1cf30e48ad6 100644 --- a/TAO/tao/SHMIOP_Factory.cpp +++ b/TAO/tao/SHMIOP_Factory.cpp @@ -6,7 +6,6 @@ #include "tao/SHMIOP_Acceptor.h" #include "tao/SHMIOP_Connector.h" -#include "ace/Dynamic_Service.h" ACE_RCSID(tao, SHMIOP_Factory, "$Id$") diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp index c78f14afab1..e0b8f22fa8c 100644 --- a/TAO/tao/TAO.dsp +++ b/TAO/tao/TAO.dsp @@ -689,6 +689,25 @@ SOURCE=.\Direct_Priority_Mapping.cpp # End Source File
# Begin Source File
+SOURCE=.\DLL_ORB.cpp
+
+!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Alpha Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=.\DomainC.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2038,7 +2057,7 @@ SOURCE=.\POA.cpp # End Source File
# Begin Source File
-SOURCE=.\PortableServerC.cpp
+SOURCE=.\POAManager.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2057,7 +2076,7 @@ SOURCE=.\PortableServerC.cpp # End Source File
# Begin Source File
-SOURCE=.\POAManager.cpp
+SOURCE=.\Policy_Factory.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2076,7 +2095,7 @@ SOURCE=.\POAManager.cpp # End Source File
# Begin Source File
-SOURCE=.\Policy_Factory.cpp
+SOURCE=.\Policy_Manager.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2095,7 +2114,7 @@ SOURCE=.\Policy_Factory.cpp # End Source File
# Begin Source File
-SOURCE=.\Policy_Manager.cpp
+SOURCE=.\PolicyC.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2114,7 +2133,7 @@ SOURCE=.\Policy_Manager.cpp # End Source File
# Begin Source File
-SOURCE=.\PolicyC.cpp
+SOURCE=.\PolicyS.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2133,7 +2152,7 @@ SOURCE=.\PolicyC.cpp # End Source File
# Begin Source File
-SOURCE=.\PolicyS.cpp
+SOURCE=.\PollableC.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2152,7 +2171,7 @@ SOURCE=.\PolicyS.cpp # End Source File
# Begin Source File
-SOURCE=.\PollableC.cpp
+SOURCE=.\PollableS.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2171,7 +2190,7 @@ SOURCE=.\PollableC.cpp # End Source File
# Begin Source File
-SOURCE=.\PollableS.cpp
+SOURCE=.\Pool_Per_Endpoint.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2190,7 +2209,7 @@ SOURCE=.\PollableS.cpp # End Source File
# Begin Source File
-SOURCE=.\Pool_Per_Endpoint.cpp
+SOURCE=.\PortableServerC.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -2931,6 +2950,25 @@ SOURCE=.\TAO_Internal.cpp # End Source File
# Begin Source File
+SOURCE=.\TAO_Singleton_Manager.cpp
+
+!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Alpha Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=.\TAOC.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
@@ -3468,6 +3506,10 @@ SOURCE=.\Direct_Priority_Mapping.h # End Source File
# Begin Source File
+SOURCE=.\DLL_ORB.h
+# End Source File
+# Begin Source File
+
SOURCE=.\DomainC.h
# End Source File
# Begin Source File
@@ -3724,10 +3766,6 @@ SOURCE=.\poa_macros.h # End Source File
# Begin Source File
-SOURCE=.\PortableServerC.h
-# End Source File
-# Begin Source File
-
SOURCE=.\POAManager.h
# End Source File
# Begin Source File
@@ -3756,6 +3794,10 @@ SOURCE=.\Pool_Per_Endpoint.h # End Source File
# Begin Source File
+SOURCE=.\PortableServerC.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Principal.h
# End Source File
# Begin Source File
@@ -3908,10 +3950,22 @@ SOURCE=.\TAO.h # End Source File
# Begin Source File
+SOURCE=.\TAO_Export.h
+# End Source File
+# Begin Source File
+
SOURCE=.\TAO_Internal.h
# End Source File
# Begin Source File
+SOURCE=.\TAO_Singleton.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TAO_Singleton_Manager.h
+# End Source File
+# Begin Source File
+
SOURCE=.\TAOC.h
# End Source File
# Begin Source File
@@ -4072,6 +4126,10 @@ SOURCE=.\Direct_Priority_Mapping.i # End Source File
# Begin Source File
+SOURCE=.\DLL_ORB.inl
+# End Source File
+# Begin Source File
+
SOURCE=.\DomainC.i
# End Source File
# Begin Source File
@@ -4228,10 +4286,6 @@ SOURCE=.\params.i # End Source File
# Begin Source File
-SOURCE=.\PortableServerC.i
-# End Source File
-# Begin Source File
-
SOURCE=.\POAManager.i
# End Source File
# Begin Source File
@@ -4256,6 +4310,10 @@ SOURCE=.\Pool_Per_Endpoint.i # End Source File
# Begin Source File
+SOURCE=.\PortableServerC.i
+# End Source File
+# Begin Source File
+
SOURCE=.\Priority_Mapping.i
# End Source File
# Begin Source File
@@ -4364,6 +4422,14 @@ SOURCE=.\TAO_Internal.i # End Source File
# Begin Source File
+SOURCE=.\TAO_Singleton.inl
+# End Source File
+# Begin Source File
+
+SOURCE=.\TAO_Singleton_Manager.inl
+# End Source File
+# Begin Source File
+
SOURCE=.\TAOC.i
# End Source File
# Begin Source File
@@ -4411,5 +4477,28 @@ SOURCE=.\ValueFactory_Map.i SOURCE=.\tao.rc
# End Source File
# End Group
+# Begin Group "Template Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\TAO_Singleton.cpp
+
+!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Alpha Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Debug"
+
+!ENDIF
+
+# End Source File
+# End Group
# End Target
# End Project
diff --git a/TAO/tao/TAO_Export.h b/TAO/tao/TAO_Export.h new file mode 100644 index 00000000000..51fd5c981e2 --- /dev/null +++ b/TAO/tao/TAO_Export.h @@ -0,0 +1,40 @@ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by +// generate_export_file.pl +// ------------------------------ +#ifndef TAO_EXPORT_H +#define TAO_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (TAO_HAS_DLL) +#define TAO_HAS_DLL 1 +#endif /* ! TAO_HAS_DLL */ + +#if defined (TAO_HAS_DLL) +# if (TAO_HAS_DLL == 1) +# if defined (TAO_BUILD_DLL) +# define TAO_Export ACE_Proper_Export_Flag +# define TAO_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define TAO_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else +# define TAO_Export ACE_Proper_Import_Flag +# define TAO_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define TAO_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* TAO_BUILD_DLL */ +# else +# define TAO_Export +# define TAO_SINGLETON_DECLARATION(T) +# define TAO_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ! TAO_HAS_DLL == 1 */ +#else +# define TAO_Export +# define TAO_SINGLETON_DECLARATION(T) +# define TAO_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* TAO_HAS_DLL */ + +#endif /* TAO_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/tao/TAO_Singleton.cpp b/TAO/tao/TAO_Singleton.cpp new file mode 100644 index 00000000000..2c4962a8675 --- /dev/null +++ b/TAO/tao/TAO_Singleton.cpp @@ -0,0 +1,205 @@ +// -*- C++ -*- +// +// $Id$ + +#ifndef TAO_SINGLETON_CPP +#define TAO_SINGLETON_CPP + +#include "tao/TAO_Singleton.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Synch_T.h" +#include "ace/Log_Msg.h" +#include "tao/TAO_Singleton_Manager.h" + +#if !defined (__ACE_INLINE__) +#include "tao/TAO_Singleton.inl" +#endif /* __ACE_INLINE__ */ + +ACE_RCSID (tao, TAO_Singleton, "$Id$") + +template <class TYPE, class ACE_LOCK> void +TAO_Singleton<TYPE, ACE_LOCK>::dump (void) +{ + ACE_TRACE ("TAO_Singleton<TYPE, ACE_LOCK>::dump"); + +#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), + TAO_Singleton<TYPE, ACE_LOCK>::instance_i ())); + ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); +#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ +} + +template <class TYPE, class ACE_LOCK> TAO_Singleton<TYPE, ACE_LOCK> *& +TAO_Singleton<TYPE, ACE_LOCK>::instance_i (void) +{ +#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) + // Pointer to the Singleton instance. This works around a bug with + // G++ and it's (mis-)handling of templates and statics... + static TAO_Singleton<TYPE, ACE_LOCK> *singleton_ = 0; + + return singleton_; +#else + return TAO_Singleton<TYPE, ACE_LOCK>::singleton_; +#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ +} + +template <class TYPE, class ACE_LOCK> TYPE * +TAO_Singleton<TYPE, ACE_LOCK>::instance (void) +{ + ACE_TRACE ("TAO_Singleton<TYPE, ACE_LOCK>::instance"); + + TAO_Singleton<TYPE, ACE_LOCK> *&singleton = + TAO_Singleton<TYPE, ACE_LOCK>::instance_i (); + + // Perform the Double-Check pattern... + if (singleton == 0) + { +#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + if (TAO_Singleton_Manager::starting_up () || + TAO_Singleton_Manager::shutting_down ()) + { + // The program is still starting up, and therefore assumed + // to be single threaded. There's no need to double-check. + // Or, the TAO_Singleton_Manager instance has been destroyed, + // so the preallocated lock is not available. Either way, + // don't register for destruction with the + // TAO_Singleton_Manager: we'll have to leak this instance. +#endif /* ACE_MT_SAFE */ + + ACE_NEW_RETURN (singleton, (TAO_Singleton<TYPE, ACE_LOCK>), 0); +#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + } + else + { + // Obtain a lock from the ACE_Object_Manager. The pointer + // is static, so we only obtain one per TAO_Singleton + // instantiation. + static ACE_LOCK *lock = 0; + if (ACE_Object_Manager::get_singleton_lock (lock) != 0) + // Failed to acquire the lock! + return 0; + + ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *lock, 0); + + if (singleton == 0) + { + ACE_NEW_RETURN (singleton, (TAO_Singleton<TYPE, ACE_LOCK>), 0); + + // Register for destruction with TAO_Singleton_Manager. + TAO_Singleton_Manager::at_exit (singleton); + } + } +#endif /* ACE_MT_SAFE */ + } + + return &singleton->instance_; +} + +template <class TYPE, class ACE_LOCK> void +TAO_Singleton<TYPE, ACE_LOCK>::cleanup (void *) +{ + delete this; + TAO_Singleton<TYPE, ACE_LOCK>::instance_i () = 0; +} + +#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) +// Pointer to the Singleton instance. +template <class TYPE, class ACE_LOCK> TAO_Singleton<TYPE, ACE_LOCK> * +TAO_Singleton<TYPE, ACE_LOCK>::singleton_ = 0; + +template <class TYPE, class ACE_LOCK> TAO_TSS_Singleton<TYPE, ACE_LOCK> * +TAO_TSS_Singleton<TYPE, ACE_LOCK>::singleton_ = 0; +#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */ + + +template <class TYPE, class ACE_LOCK> void +TAO_TSS_Singleton<TYPE, ACE_LOCK>::dump (void) +{ + ACE_TRACE ("TAO_TSS_Singleton<TYPE, ACE_LOCK>::dump"); + +#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), + TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ())); + ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); +#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ +} + +template <class TYPE, class ACE_LOCK> TAO_TSS_Singleton<TYPE, ACE_LOCK> *& +TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance_i (void) +{ +#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) + // Pointer to the Singleton instance. This works around a bug with + // G++ and it's (mis-)handling of templates and statics... + static TAO_TSS_Singleton<TYPE, ACE_LOCK> *singleton_ = 0; + + return singleton_; +#else + return TAO_TSS_Singleton<TYPE, ACE_LOCK>::singleton_; +#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ +} + +template <class TYPE, class ACE_LOCK> TYPE * +TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance (void) +{ + ACE_TRACE ("TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance"); + + TAO_TSS_Singleton<TYPE, ACE_LOCK> *&singleton = + TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance_i (); + + // Perform the Double-Check pattern... + if (singleton == 0) + { +#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + if (TAO_Singleton_Manager::starting_up () || + TAO_Singleton_Manager::shutting_down ()) + { + // The program is still starting up, and therefore assumed + // to be single threaded. There's no need to double-check. + // Or, the TAO_Singleton_Manager instance has been destroyed, + // so the preallocated lock is not available. Either way, + // don't register for destruction with the + // TAO_Singleton_Manager: we'll have to leak this instance. +#endif /* ACE_MT_SAFE */ + + ACE_NEW_RETURN (singleton, (TAO_TSS_Singleton<TYPE, ACE_LOCK>), 0); +#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + } + else + { + // Obtain a lock from the ACE_Object_Manager. The pointer + // is static, so we only obtain one per TAO_Singleton + // instantiation. + static ACE_LOCK *lock = 0; + if (ACE_Object_Manager::get_singleton_lock (lock) != 0) + // Failed to acquire the lock! + return 0; + + ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *lock, 0); + + if (singleton == 0) + { + ACE_NEW_RETURN (singleton, (TAO_TSS_Singleton<TYPE, ACE_LOCK>), + 0); + + // Register for destruction with TAO_Singleton_Manager. + TAO_Singleton_Manager::at_exit (singleton); + } + } +#endif /* ACE_MT_SAFE */ + } + + return ACE_TSS_GET (&singleton->instance_, TYPE); +} + +template <class TYPE, class ACE_LOCK> void +TAO_TSS_Singleton<TYPE, ACE_LOCK>::cleanup (void *) +{ + delete this; + TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance_i () = 0; +} + +#endif /* TAO_SINGLETON_CPP */ diff --git a/TAO/tao/TAO_Singleton.h b/TAO/tao/TAO_Singleton.h new file mode 100644 index 00000000000..ee0ef3d48e3 --- /dev/null +++ b/TAO/tao/TAO_Singleton.h @@ -0,0 +1,124 @@ +// -*- C++ -*- +// +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// TAO_Singleton.h +// +// = DESCRIPTION +// Header file for the TAO-specific Singleton implementation. +// Based entirely on tao/TAO_Singleton.*. +// +// = AUTHOR +// Ossama Othman <ossama@uci.edu> +// +// ============================================================================ + +#ifndef TAO_SINGLETON_H +#define TAO_SINGLETON_H + +#include "ace/pre.h" + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/Singleton.h" + +template <class TYPE, class ACE_LOCK> +class TAO_Singleton : public ACE_Singleton <TYPE, ACE_LOCK> +{ + // = TITLE + // TAO-specific Singleton class + // + // = DESCRIPTION + // TAO_Singletons are used by TAO to register TAO-specific + // singleton instances with the TAO_Object_Manager. This + // ensures that TAO singletons are isolated from ACE's + // Object_Manager, thus allowing TAO to be safely dynamically + // unloaded. + +public: + static TYPE *instance (void); + // Global access point to the Singleton. + + virtual void cleanup (void *param = 0); + // Cleanup method, used by <ace_cleanup_destroyer> to destroy the + // singleton. + + static void dump (void); + // Dump the state of the object. + +protected: + TAO_Singleton (void); + // Default constructor. + +#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) + static TAO_Singleton<TYPE, ACE_LOCK> *singleton_; + // Pointer to the Singleton (ACE_Cleanup) instance. +#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ + + static TAO_Singleton<TYPE, ACE_LOCK> *&instance_i (void); + // Get pointer to the TAO Singleton instance. +}; + +template <class TYPE, class ACE_LOCK> +class TAO_TSS_Singleton : public ACE_TSS_Singleton <TYPE, ACE_LOCK> +{ + // = TITLE + // TAO-specific Singleton class + // + // = DESCRIPTION + // TAO_Singletons are used by TAO to register TAO-specific + // singleton instances with the TAO_Object_Manager. This + // ensures that TAO singletons are isolated from ACE's + // Object_Manager, thus allowing TAO to be safely dynamically + // unloaded. + +public: + static TYPE *instance (void); + // Global access point to the Singleton. + + virtual void cleanup (void *param = 0); + // Cleanup method, used by <ace_cleanup_destroyer> to destroy the + // singleton. + + static void dump (void); + // Dump the state of the object. + +protected: + TAO_TSS_Singleton (void); + // Default constructor. + +#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) + static TAO_TSS_Singleton<TYPE, ACE_LOCK> *singleton_; + // Pointer to the Singleton (ACE_Cleanup) instance. +#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ + + static TAO_TSS_Singleton<TYPE, ACE_LOCK> *&instance_i (void); + // Get pointer to the TAO TSS Singleton instance. +}; + +#if defined (__ACE_INLINE__) +#include "tao/TAO_Singleton.inl" +#endif /* __ACE_INLINE__ */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "tao/TAO_Singleton.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("TAO_Singleton.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + + +#include "ace/post.h" + +#endif /* TAO_SINGLETON_H */ diff --git a/TAO/tao/TAO_Singleton.inl b/TAO/tao/TAO_Singleton.inl new file mode 100644 index 00000000000..d1d32b6998c --- /dev/null +++ b/TAO/tao/TAO_Singleton.inl @@ -0,0 +1,17 @@ +// -*- C++ -*- +// $Id$ + +// Default constructors. +// +// Note: don't explicitly initialize "instance_", because TYPE may not +// have a default constructor. Let the compiler figure it out . . . + +template <class TYPE, class ACE_LOCK> ACE_INLINE +TAO_Singleton<TYPE, ACE_LOCK>::TAO_Singleton (void) +{ +} + +template <class TYPE, class ACE_LOCK> ACE_INLINE +TAO_TSS_Singleton<TYPE, ACE_LOCK>::TAO_TSS_Singleton (void) +{ +} diff --git a/TAO/tao/TAO_Singleton_Manager.cpp b/TAO/tao/TAO_Singleton_Manager.cpp new file mode 100644 index 00000000000..aa1d8d9148e --- /dev/null +++ b/TAO/tao/TAO_Singleton_Manager.cpp @@ -0,0 +1,266 @@ +// $Id$ + +#include "ace/Log_Msg.h" +#include "ace/Synch.h" + +#include "tao/TAO_Singleton_Manager.h" + +#include "tao/Exception.h" +#include "tao/Typecode.h" + +#if !defined (__ACE_INLINE__) +# include "tao/TAO_Singleton_Manager.inl" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID (tao, TAO_Singleton_Manager, "$Id$") + + +extern "C" void +TAO_Singleton_Manager_cleanup_destroyer (void *, void *) +{ + if (TAO_Singleton_Manager::instance_) + (void) TAO_Singleton_Manager::instance ()->fini (); +} + +TAO_Singleton_Manager *TAO_Singleton_Manager::instance_ = 0; + +void *TAO_Singleton_Manager::preallocated_object[ + TAO_Singleton_Manager::TAO_PREALLOCATED_OBJECTS] = { 0 }; + +TAO_Singleton_Manager::TAO_Singleton_Manager (void) + // default_mask_ isn't initialized, because it's defined by <init>. + : thread_hook_ (0), + exit_info_ (), + registered_with_object_manager_ (0) +#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + , internal_lock_ (new ACE_Recursive_Thread_Mutex) +# endif /* ACE_MT_SAFE */ +{ + // Be sure that no further instances are created via instance (). + if (instance_ == 0) + instance_ = this; + + (void) this->init (); +} + +TAO_Singleton_Manager::~TAO_Singleton_Manager (void) +{ + this->dynamically_allocated_ = 0; // Don't delete this again in fini() + (void) this->fini (); +} + +sigset_t * +TAO_Singleton_Manager::default_mask (void) +{ + return TAO_Singleton_Manager::instance ()->default_mask_; +} + +ACE_Thread_Hook * +TAO_Singleton_Manager::thread_hook (void) +{ + return TAO_Singleton_Manager::instance ()->thread_hook_; +} + +ACE_Thread_Hook * +TAO_Singleton_Manager::thread_hook (ACE_Thread_Hook *new_thread_hook) +{ + TAO_Singleton_Manager *tao_om = TAO_Singleton_Manager::instance (); + ACE_Thread_Hook *old_hook = tao_om->thread_hook_; + tao_om->thread_hook_ = new_thread_hook; + return old_hook; +} + +TAO_Singleton_Manager * +TAO_Singleton_Manager::instance (void) +{ + // This function should be called during construction of static + // instances, or before any other threads have been created in the + // process. So, it's not thread safe. + + if (instance_ == 0) + { + TAO_Singleton_Manager *instance_pointer; + + ACE_NEW_RETURN (instance_pointer, + TAO_Singleton_Manager, + 0); + ACE_ASSERT (instance_pointer == instance_); + + instance_pointer->dynamically_allocated_ = 1; + + } + + return instance_; +} + +int +TAO_Singleton_Manager::init (void) +{ + // Register the TAO_Singleton_Manager with the ACE_Object_Manager. + int register_with_object_manager = 1; + + return this->init (register_with_object_manager); +} + +int +TAO_Singleton_Manager::init (int register_with_object_manager) +{ + if (this->starting_up_i ()) + { + // First, indicate that this TAO_Singleton_Manager instance is being + // initialized. + this->object_manager_state_ = OBJ_MAN_INITIALIZING; + + if (this == instance_) + { +# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + // @@ No MT-specific pre-allocated objects. +# endif /* ACE_MT_SAFE */ + } + + ACE_NEW_RETURN (this->default_mask_, sigset_t, -1); + ACE_OS::sigfillset (this->default_mask_); + + if (register_with_object_manager == 1 + && ACE_Object_Manager::instance ()->at_exit ( + this, + (ACE_CLEANUP_FUNC) TAO_Singleton_Manager_cleanup_destroyer, + 0) != 0) + return -1; + + this->registered_with_object_manager_ = + register_with_object_manager; + + // Finally, indicate that the TAO_Singleton_Manager instance has + // been initialized. + this->object_manager_state_ = OBJ_MAN_INITIALIZED; + + return 0; + } + else if (this->registered_with_object_manager_ + != register_with_object_manager) + { + // An attempt was made to register the TAO_Singleton_Manager + // with a manager of a different type from the one it is + // currently registered with. This indicates a problem with the + // caller's logic. + + errno = EINVAL; + return -1; + } + + // Had already initialized. + return 1; +} + +// Clean up a TAO_Singleton_Manager. There can be instances of this object +// other than The Instance. This can happen if a user creates one for some +// reason. All objects clean up their per-object information and managed +// objects, but only The Instance cleans up the static preallocated objects. +int +TAO_Singleton_Manager::fini (void) +{ + if (instance_ == 0 || this->shutting_down_i ()) + // Too late. Or, maybe too early. Either fini () has already + // been called, or init () was never called. + return this->object_manager_state_ == OBJ_MAN_SHUT_DOWN ? 1 : -1; + + // No mutex here. Only the main thread should destroy the singleton + // TAO_Singleton_Manager instance. + + // Indicate that the TAO_Singleton_Manager instance is being shut + // down. This object manager should be the last one to be shut + // down. + this->object_manager_state_ = OBJ_MAN_SHUTTING_DOWN; + + // If another Object_Manager has registered for termination, do it. + if (this->next_) + { + this->next_->fini (); + this->next_ = 0; // Protect against recursive calls. + } + + // Call all registered cleanup hooks, in reverse order of + // registration. + this->exit_info_.call_hooks (); + + // Only clean up preallocated objects when the singleton Instance is being + // destroyed. + if (this == instance_) + { +#if ! defined (ACE_HAS_STATIC_PREALLOCATION) + // Cleanup the dynamically preallocated objects. +# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + // @@ No MT-specific preallocated objects yet. +# endif /* ACE_MT_SAFE */ + // @@ No preallocated objects yet. +#endif /* ! ACE_HAS_STATIC_PREALLOCATION */ + } + + delete this-> default_mask_; + this->default_mask_ = 0; + +#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + delete this->internal_lock_; + this->internal_lock_ = 0; +#endif /* ACE_MT_SAFE */ + + // Indicate that this TAO_Singleton_Manager instance has been shut down. + this->object_manager_state_ = OBJ_MAN_SHUT_DOWN; + + if (this == instance_) + instance_ = 0; + + if (this->dynamically_allocated_) + { + delete this; + } + + // Clean up all ORB owned Exceptions (before TypeCode clean up). + TAO_Exceptions::fini (); + + // Clean up all ORB owned TypeCodes. + TAO_TypeCodes::fini (); + + return 0; +} + +int +TAO_Singleton_Manager::starting_up (void) +{ + return TAO_Singleton_Manager::instance_ + ? instance_->starting_up_i () + : 1; +} + +int +TAO_Singleton_Manager::shutting_down (void) +{ + return TAO_Singleton_Manager::instance_ + ? instance_->shutting_down_i () + : 1; +} + +int +TAO_Singleton_Manager::at_exit_i (void *object, + ACE_CLEANUP_FUNC cleanup_hook, + void *param) +{ + ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, + *instance_->internal_lock_, -1)); + + if (this->shutting_down_i ()) + { + errno = EAGAIN; + return -1; + } + + if (this->exit_info_.find (object)) + { + // The object has already been registered. + errno = EEXIST; + return -1; + } + + return this->exit_info_.at_exit_i (object, cleanup_hook, param); +} diff --git a/TAO/tao/TAO_Singleton_Manager.h b/TAO/tao/TAO_Singleton_Manager.h new file mode 100644 index 00000000000..97faf5dda2d --- /dev/null +++ b/TAO/tao/TAO_Singleton_Manager.h @@ -0,0 +1,188 @@ +// -*- C++ -*- +// +// $Id$ + + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// TAO_Singleton_Manager.h +// +// = DESCRIPTION +// Header file for the TAO-specific Singleton Manager. Based +// entirely on ace/Object_Manager.{h,i,cpp}. +// +// = AUTHOR +// Ossama Othman <ossama@uci.edu> +// +// ============================================================================ + +#ifndef TAO_OBJECT_MANAGER_H +#define TAO_OBJECT_MANAGER_H + +#include "ace/pre.h" + +#include "tao/TAO_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/OS.h" + +// Forward declarations +class ACE_Recursive_Thread_Mutex; + +// Adapter for cleanup, used to register cleanup function with the +// ACE_Object_Manager. +extern "C" +void +TAO_Singleton_Manager_cleanup_destroyer (void *, void *); + +class TAO_Export TAO_Singleton_Manager : public ACE_Object_Manager_Base +{ + // = TITLE + // Manager for TAO library services and singleton cleanup. + // + // = DESCRIPTION + // The <TAO_Singleton_Manager> is basically simplified version of + // the ACE_Object_Manager. It is designed specifically to + // manage singletons created by TAO. For example, Singleton + // instances created by TAO will be automatically registered + // with the Singleton instance of this Singleton Manager. + // + // This class is necessary to ensure that TAO-specific + // Singletons are centrally isolated. The idea is that + // destruction of the instance of the <TAO_Singleton_Manager> + // triggers destruction of all objects/services registered with + // it. + + friend void TAO_Singleton_Manager_cleanup_destroyer (void *, void *); + +public: + virtual int init (void); + // Explicitly initialize. + + int init (int register_with_object_manager); + // Explicitly initialize the TAO_Singleton_Manager, in addition to + // explicitly registering (or not registering) with the + // ACE_Object_Manager. + + virtual int fini (void); + // Explicitly destroy. + + static int starting_up (void); + // Returns 1 before the <TAO_Singleton_Manager> has been + // constructed. See <ACE_Object_Manager::starting_up> for more + // information. + + static int shutting_down (void); + // Returns 1 after the <TAO_Singleton_Manager> has been destroyed. + // See <ACE_Object_Manager::shutting_down> for more information. + + enum Preallocated_Object + { +# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + // @@ No MT-specific preallocated objects (yet). Remove the + // below dummy enum once a preallocated object is added. + TAO_EMPTY_PREALLOCATED_OBJECT, +# else + // Without ACE_MT_SAFE, There are no preallocated objects. Make + // sure that the preallocated_array size is at least one by + // declaring this dummy . . . + TAO_EMPTY_PREALLOCATED_OBJECT, +# endif /* ACE_MT_SAFE */ + + TAO_PREALLOCATED_OBJECTS // This enum value must be last! + }; + // Unique identifiers for preallocated objects. + + static sigset_t *default_mask (void); + // Accesses a default signal set used, for example, in + // <ACE_Sig_Guard> methods. + + static ACE_Thread_Hook *thread_hook (void); + // Returns the current thread hook for the process. + + static ACE_Thread_Hook *thread_hook (ACE_Thread_Hook *new_thread_hook); + // Returns the existing thread hook and assign a <new_thread_hook>. + + static TAO_Singleton_Manager *instance (void); + // Accessor to singleton instance. + + static int at_exit (ACE_Cleanup *object, void *param = 0); + // Register an ACE_Cleanup object for cleanup at process + // termination. The object is deleted via the + // <ace_cleanup_destroyer>. If you need more flexiblity, see the + // <other at_exit> method below. For OS's that do not have + // processes, cleanup takes place at the end of <main>. Returns 0 + // on success. On failure, returns -1 and sets errno to: EAGAIN if + // shutting down, ENOMEM if insufficient virtual memory, or EEXIST + // if the object (or array) had already been registered. + + static int at_exit (void *object, + ACE_CLEANUP_FUNC cleanup_hook, + void *param); + // Register an object (or array) for cleanup at process termination. + // "cleanup_hook" points to a (global, or static member) function + // that is called for the object or array when it to be destroyed. + // It may perform any necessary cleanup specific for that object or + // its class. "param" is passed as the second parameter to the + // "cleanup_hook" function; the first parameter is the object (or + // array) to be destroyed. "cleanup_hook", for example, may delete + // the object (or array). For OS's that do not have processes, this + // function is the same as <at_thread_exit>. Returns 0 on success. + // On failure, returns -1 and sets errno to: EAGAIN if shutting + // down, ENOMEM if insufficient virtual memory, or EEXIST if the + // object (or array) had already been registered. + +private: + // Force allocation on the heap. + TAO_Singleton_Manager (void); + ~TAO_Singleton_Manager (void); + + // Disallow copying by not implementing the following . . . + TAO_Singleton_Manager (const TAO_Singleton_Manager &); + TAO_Singleton_Manager &operator= (const TAO_Singleton_Manager &); + + int at_exit_i (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param); + // Register an object or array for deletion at program termination. + // See description of static version above for return values. + +private: + + static TAO_Singleton_Manager *instance_; + // Singleton instance pointer. + + static void *preallocated_object[TAO_PREALLOCATED_OBJECTS]; + // Table of preallocated objects. + + sigset_t *default_mask_; + // Default signal set used, for example, in ACE_Sig_Guard. + + ACE_Thread_Hook *thread_hook_; + // Thread hook that's used by this process. + + ACE_OS_Exit_Info exit_info_; + // For at_exit support. + + int registered_with_object_manager_; + // Indicates if TAO_Singleton_Manager is registered with the + // ACE_Object_Manager. + +#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) + ACE_Recursive_Thread_Mutex *internal_lock_; + // Lock that is used to guard internal structures. +#endif /* ACE_MT_SAFE */ +}; + +#if defined (__ACE_INLINE__) +# include "tao/TAO_Singleton_Manager.inl" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" + +#endif /* TAO_OBJECT_MANAGER_H */ diff --git a/TAO/tao/TAO_Singleton_Manager.inl b/TAO/tao/TAO_Singleton_Manager.inl new file mode 100644 index 00000000000..f9f0dd141ce --- /dev/null +++ b/TAO/tao/TAO_Singleton_Manager.inl @@ -0,0 +1,26 @@ +// -*- C++ -*- +// +// $Id$ + +ACE_INLINE +int +TAO_Singleton_Manager::at_exit (ACE_Cleanup *object, + void *param) +{ + return TAO_Singleton_Manager::instance ()->at_exit_i ( + object, + (ACE_CLEANUP_FUNC) ace_cleanup_destroyer, + param); +} + +ACE_INLINE +int +TAO_Singleton_Manager::at_exit (void *object, + ACE_CLEANUP_FUNC cleanup_hook, + void *param) +{ + return TAO_Singleton_Manager::instance ()->at_exit_i ( + object, + cleanup_hook, + param); +} diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp index 88b80eed068..44518a63497 100644 --- a/TAO/tao/Typecode.cpp +++ b/TAO/tao/Typecode.cpp @@ -238,19 +238,15 @@ CORBA_TypeCode::CORBA_TypeCode (CORBA::TCKind kind, CORBA_TypeCode::~CORBA_TypeCode (void) { // Delete the original, possibly nonaligned, buffer. - if (this->non_aligned_buffer_ != 0) - { - delete [] this->non_aligned_buffer_; - this->non_aligned_buffer_ = 0; - } + delete [] this->non_aligned_buffer_; + this->non_aligned_buffer_ = 0; + this->buffer_ = 0; - // Free up our private state (if any) - if (this->private_state_) - { - delete this->private_state_; - this->private_state_ = 0; - } + // Free up our private state. + delete this->private_state_; + this->private_state_ = 0; + } diff --git a/TAO/tao/Typecode.h b/TAO/tao/Typecode.h index c487f98818b..282993d0748 100644 --- a/TAO/tao/Typecode.h +++ b/TAO/tao/Typecode.h @@ -580,6 +580,12 @@ public: static void fini (void); // Runtime finalization of all standard typecodes. +private: + + static int initialized_; + // Flag that denotes that the TAO TypeCode constants have been + // initialized. + }; // These operators are too complex to be inline.... diff --git a/TAO/tao/Typecode_Constants.cpp b/TAO/tao/Typecode_Constants.cpp index 0b4bed6e57a..c513bb4aa39 100644 --- a/TAO/tao/Typecode_Constants.cpp +++ b/TAO/tao/Typecode_Constants.cpp @@ -314,13 +314,25 @@ CORBA::TypeCode_ptr TC_ServiceContextList = 0; #endif /* 0 */ CORBA::TypeCode_ptr TC_completion_status = 0; -// initialize all the ORB owned TypeCode constants. This -// routine will be invoked by the ORB_init method. +// Flag that denotes that the TAO TypeCode constants have been +// initialized. +int TAO_TypeCodes::initialized_ = 0; + +// Initialize all the ORB owned TypeCode constants. This routine will +// be invoked by the ORB_init method. void TAO_TypeCodes::init (void) { // Initialize all the standard typecodes owned by the ORB + // Not thread safe. Caller must provide synchronization. + + // Do not execute code after this point more than once. + if (initialized_ != 0) + return; + + initialized_ = 1; + // Null and void CORBA::_tc_null = new CORBA::TypeCode (CORBA::tk_null); @@ -1858,7 +1870,7 @@ TAO_TypeCodes::init (void) void TAO_TypeCodes::fini (void) { - // Initialize all the standard typecodes owned by the ORB + // Release all the standard typecodes owned by the ORB. // Null and void CORBA::release (CORBA::_tc_null); diff --git a/TAO/tao/UIOP_Factory.cpp b/TAO/tao/UIOP_Factory.cpp index 5b0132e4c32..ab3cede11ca 100644 --- a/TAO/tao/UIOP_Factory.cpp +++ b/TAO/tao/UIOP_Factory.cpp @@ -7,7 +7,6 @@ #include "tao/UIOP_Acceptor.h" #include "tao/UIOP_Connector.h" -#include "ace/Dynamic_Service.h" ACE_RCSID(tao, UIOP_Factory, "$Id$") diff --git a/TAO/tao/ValueFactory_Map.cpp b/TAO/tao/ValueFactory_Map.cpp index 347d6bde062..8af029138bc 100644 --- a/TAO/tao/ValueFactory_Map.cpp +++ b/TAO/tao/ValueFactory_Map.cpp @@ -126,7 +126,7 @@ template class ACE_Hash_Map_Iterator_Ex<const char *, CORBA_ValueFactory_ptr, AC template class ACE_Hash_Map_Reverse_Iterator_Ex<const char *, CORBA_ValueFactory_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_SYNCH_RW_MUTEX>; template class ACE_Hash_Map_Manager_Ex<const char *, CORBA_ValueFactory_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_SYNCH_RW_MUTEX>; template class ACE_Hash_Map_Entry<const char *, CORBA_ValueFactory_ptr>; -template class ACE_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX>; +template class TAO_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<const char *, CORBA_ValueFactory_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_SYNCH_RW_MUTEX> @@ -134,7 +134,7 @@ template class ACE_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX>; #pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const char *, CORBA_ValueFactory_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_SYNCH_RW_MUTEX> #pragma instantiate ACE_Hash_Map_Manager_Ex<const char *, CORBA_ValueFactory_ptr, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_SYNCH_RW_MUTEX> #pragma instantiate ACE_Hash_Map_Entry<const char *, CORBA_ValueFactory_ptr> -#pragma instantiate ACE_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX> +#pragma instantiate TAO_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/ValueFactory_Map.h b/TAO/tao/ValueFactory_Map.h index 6c80dfe0be9..903d9b6a3f6 100644 --- a/TAO/tao/ValueFactory_Map.h +++ b/TAO/tao/ValueFactory_Map.h @@ -24,7 +24,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Singleton.h" +#include "tao/TAO_Singleton.h" #include "ace/Synch.h" #include "tao/corbafwd.h" @@ -70,7 +70,7 @@ private: // currently the ValueFactory_Map is a singleton and not per ORB // as in the OMG specs -typedef ACE_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX> +typedef TAO_Singleton<TAO_ValueFactory_Map, ACE_SYNCH_MUTEX> TAO_VALUEFACTORY_MAP; diff --git a/TAO/tao/corbafwd.h b/TAO/tao/corbafwd.h index b784b1c2aec..d47e2919676 100644 --- a/TAO/tao/corbafwd.h +++ b/TAO/tao/corbafwd.h @@ -38,25 +38,7 @@ #include "tao/try_macros.h" #include "tao/varbase.h" - -#if !defined (TAO_HAS_DLL) -// On Windows NT, the default is to build TAO as a DLL library. -# define TAO_HAS_DLL 1 -#endif /* TAO_HAS_DLL */ - -// Here are definition for TAO library. -#if defined (TAO_HAS_DLL) && (TAO_HAS_DLL == 1) -# if defined (TAO_BUILD_DLL) -# define TAO_Export ACE_Proper_Export_Flag -# define TAO_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# else -# define TAO_Export ACE_Proper_Import_Flag -# define TAO_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# endif /* TAO_BUILD_DLL */ -#else /* TAO_HAS_DLL */ -# define TAO_Export -# define TAO_SINGLETON_DECLARATION(T) -#endif /* TAO_HAS_DLL */ +#include "tao/TAO_Export.h" // @@ NW: Disable messing with the alignment for now. // For some reason, PC compilers don't implement "natural" alignment, diff --git a/TAO/tao/default_resource.h b/TAO/tao/default_resource.h index c87548bbcab..df9313a80bb 100644 --- a/TAO/tao/default_resource.h +++ b/TAO/tao/default_resource.h @@ -25,7 +25,6 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Singleton.h" #include "ace/Service_Config.h" class TAO_Object_Adapter; |