diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-18 02:45:57 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-18 02:45:57 +0000 |
commit | 7839d92b84f1354e59578261c2a1dfee4e8ceda9 (patch) | |
tree | 7c12fc1762bcf98e687970fa3303ca198436784d /ace | |
parent | 2a1b43a0ee1a80473f492094994abf954f0d5f0a (diff) | |
download | ATCD-7839d92b84f1354e59578261c2a1dfee4e8ceda9.tar.gz |
ChangeLogTag: Fri Mar 17 20:43:20 2000 Sangwoo Jin <swjinjin@sei.co.kr>
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Makefile | 4 | ||||
-rw-r--r-- | ace/Object_Manager.cpp | 54 | ||||
-rw-r--r-- | ace/Object_Manager.h | 2 | ||||
-rw-r--r-- | ace/Reactor.cpp | 10 |
4 files changed, 60 insertions, 10 deletions
diff --git a/ace/Makefile b/ace/Makefile index 53c87b67d57..b97bb608c35 100644 --- a/ace/Makefile +++ b/ace/Makefile @@ -338,7 +338,9 @@ endif # IPC ifneq (,$(findstring Svcconf,$(ACE_COMPONENTS))) FILES += $(SVCCONF_FILES) -endif # Svcconf +else # ! Svcconf + CCFLAGS += -DACE_LACKS_ACE_SVCCONF +endif # ! Svcconf ifneq (,$(findstring Streams,$(ACE_COMPONENTS))) FILES += $(STREAMS_FILES) diff --git a/ace/Object_Manager.cpp b/ace/Object_Manager.cpp index f5facf04e63..085dd9d521b 100644 --- a/ace/Object_Manager.cpp +++ b/ace/Object_Manager.cpp @@ -6,11 +6,19 @@ #if !defined (ACE_LACKS_ACE_TOKEN) # include "ace/Token_Manager.h" #endif /* ! ACE_LACKS_ACE_TOKEN */ -#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER) -# include "ace/Naming_Context.h" -#endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */ -#include "ace/Service_Manager.h" -#include "ace/Service_Config.h" +#if defined (ACE_LACKS_ACE_SVCCONF) +# if !defined (ACE_HAS_WINCE) +# include "ace/Proactor.h" +# endif /* !ACE_HAS_WINCE */ +# include "ace/Reactor.h" +# include "ace/Thread_Manager.h" +#else /* ! ACE_LACKS_ACE_SVCCONF */ +# if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_OTHER) +# include "ace/Naming_Context.h" +# endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */ +# include "ace/Service_Manager.h" +# include "ace/Service_Config.h" +#endif /* ! ACE_LACKS_ACE_SVCCONF */ #include "ace/Signal.h" #include "ace/Log_Msg.h" #include "ace/Containers.h" @@ -85,6 +93,8 @@ void *ACE_Object_Manager::preallocated_array[ preallocated_array[ID] = 0; #endif /* ACE_HAS_STATIC_PREALLOCATION */ +#if !defined (ACE_LACKS_ACE_SVCCONF) + class ACE_Object_Manager_Preallocations { // = TITLE @@ -120,6 +130,7 @@ ACE_Object_Manager_Preallocations::ACE_Object_Manager_Preallocations (void) ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, 0) + #endif /* ! ACE_HAS_WINCE && ! ACE_LACKS_ACE_OTHER */ ACE_STATIC_SVC_DEFINE (ACE_Service_Manager_initializer, @@ -154,6 +165,8 @@ ACE_Object_Manager_Preallocations::~ACE_Object_Manager_Preallocations (void) { } +#endif /* ! ACE_LACKS_ACE_SVCCONF */ + int ACE_Object_Manager::starting_up (void) { @@ -188,10 +201,12 @@ ACE_Object_Manager::init (void) // and register with it for chained fini (). ACE_OS_Object_Manager::instance ()->next_ = this; +# if !defined (ACE_LACKS_ACE_SVCCONF) // Construct the ACE_Service_Config's signal handler. ACE_NEW_RETURN (ace_service_config_sig_handler_, ACE_Sig_Adapter (&ACE_Service_Config::handle_signal), -1); ACE_Service_Config::signal_handler (ace_service_config_sig_handler_); +# endif /* ! ACE_LACKS_ACE_SVCCONF */ // Allocate the preallocated (hard-coded) object instances. ACE_PREALLOCATE_OBJECT (ACE_SYNCH_RW_MUTEX, ACE_FILECACHE_LOCK) @@ -231,9 +246,12 @@ ACE_Object_Manager::init (void) ACE_TSS_Emulation::tss_open (ts_storage_); # endif /* ACE_HAS_TSS_EMULATION */ +# if !defined (ACE_LACKS_ACE_SVCCONF) ACE_NEW_RETURN (preallocations_, ACE_Object_Manager_Preallocations, -1); +# endif /* ! ACE_LACKS_ACE_SVCCONF */ + // Open the main thread's ACE_Log_Msg. (void) ACE_LOG_MSG; } @@ -253,8 +271,10 @@ ACE_Object_Manager::ACE_Object_Manager (void) // With ACE_HAS_TSS_EMULATION, ts_storage_ is initialized by the call to // ACE_OS::tss_open () in the function body. : exit_info_ () +#if !defined (ACE_LACKS_ACE_SVCCONF) , preallocations_ (0) , ace_service_config_sig_handler_ (0) +#endif /* ! ACE_LACKS_ACE_SVCCONF */ #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) , internal_lock_ (new ACE_Recursive_Thread_Mutex) , singleton_null_lock_ (0) @@ -579,15 +599,35 @@ ACE_Object_Manager::fini (void) if (this == instance_) { +#if !defined (ACE_LACKS_ACE_SVCCONF) delete preallocations_; preallocations_ = 0; +#endif /* ! ACE_LACKS_ACE_SVCCONF */ ACE_Trace::stop_tracing (); +#if defined (ACE_LACKS_ACE_SVCCONF) + + ACE_Reactor::close_singleton (); + +# if (((defined (ACE_HAS_WINNT)) && (ACE_HAS_WINNT == 1)) || (defined (ACE_HAS_AIO_CALLS))) + ACE_Proactor::close_singleton (); +# endif /* !ACE_HAS_WINCE */ + +# if ! defined (ACE_THREAD_MANAGER_LACKS_STATICS) + ACE_Thread_Manager::close_singleton (); +# endif /* ! ACE_THREAD_MANAGER_LACKS_STATICS */ + +#else /* ! ACE_LACKS_ACE_SVCCONF */ + // Close and possibly delete all service instances in the Service // Repository. ACE_Service_Config::fini_svcs (); +#endif /* ! ACE_LACKS_ACE_SVCCONF */ + + + // Close the main thread's TSS, including its Log_Msg instance. ACE_OS::cleanup_tss (1 /* main thread */); @@ -595,9 +635,11 @@ ACE_Object_Manager::fini (void) // Note: Do not access Log Msg after this since it is gone // +#if !defined (ACE_LACKS_ACE_SVCCONF) // Unlink all services in the Service Repository and close/delete // all ACE library services and singletons. ACE_Service_Config::close (); +#endif /* ! ACE_LACKS_ACE_SVCCONF */ // Close the ACE_Allocator. ACE_Allocator::close_singleton (); @@ -644,8 +686,10 @@ ACE_Object_Manager::fini (void) #endif /* ACE_HAS_THREADS */ } +#if !defined (ACE_LACKS_ACE_SVCCONF) delete ace_service_config_sig_handler_; ace_service_config_sig_handler_ = 0; +#endif /* ! ACE_LACKS_ACE_SVCCONF */ #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) delete internal_lock_; diff --git a/ace/Object_Manager.h b/ace/Object_Manager.h index fd0daf30c9a..56db2053c62 100644 --- a/ace/Object_Manager.h +++ b/ace/Object_Manager.h @@ -303,11 +303,13 @@ private: ACE_OS_Exit_Info exit_info_; // For at_exit support. +#if !defined (ACE_LACKS_ACE_SVCCONF) ACE_Object_Manager_Preallocations *preallocations_; // Preallocated objects collection. ACE_Sig_Adapter *ace_service_config_sig_handler_; // ACE_Service_Config signal handler. +#endif /* ! ACE_LACKS_ACE_SVCCONF */ int at_exit_i (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param); // Register an object or array for deletion at program termination. diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp index 61f4be62e7d..91e81eb933c 100644 --- a/ace/Reactor.cpp +++ b/ace/Reactor.cpp @@ -5,10 +5,12 @@ #include "ace/Reactor_Impl.h" #include "ace/Handle_Set.h" #if !defined (ACE_HAS_WINCE) -# include "ace/Service_Config.h" +# if !defined (ACE_LACKS_ACE_SVCCONF) +# include "ace/Service_Config.h" +# endif /* !ACE_LACKS_ACE_SVCCONF */ # include "ace/WFMO_Reactor.h" # include "ace/Msg_WFMO_Reactor.h" -#endif /* !ACE_HAS_WINCE */ +#endif /* ! ACE_HAS_WINCE */ #include "ace/Select_Reactor.h" #include "ace/TP_Reactor.h" #include "ace/Object_Manager.h" @@ -128,13 +130,13 @@ ACE_Reactor::close_singleton (void) int ACE_Reactor::check_reconfiguration (void *) { -#if !defined (ACE_HAS_WINCE) +#if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_SVCCONF) if (ACE_Service_Config::reconfig_occurred ()) { ACE_Service_Config::reconfigure (); return 1; } -#endif /* ACE_HAS_WINCE */ +#endif /* ! ACE_HAS_WINCE || ! ACE_LACKS_ACE_SVCCONF */ return 0; } |