diff options
author | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-04-14 01:57:01 +0000 |
---|---|---|
committer | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-04-14 01:57:01 +0000 |
commit | e046635886f6379508be489160de64c350d26901 (patch) | |
tree | 0217464681cd669c4a71c2208d7f2a80816c594f /ACE | |
parent | 2d2a3dc0b219af5a6afc991a6ced28edbe82d420 (diff) | |
download | ATCD-e046635886f6379508be489160de64c350d26901.tar.gz |
ChangeLogTag: Mon Apr 14 01:56:06 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
Diffstat (limited to 'ACE')
-rw-r--r-- | ACE/ChangeLog | 16 | ||||
-rw-r--r-- | ACE/ace/Service_Config.cpp | 13 | ||||
-rw-r--r-- | ACE/ace/Service_Config.h | 45 | ||||
-rw-r--r-- | ACE/ace/Service_Config.inl | 12 | ||||
-rw-r--r-- | ACE/tests/Bug_2980_Regression_Test.cpp | 8 |
5 files changed, 55 insertions, 39 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 69bd714ee0c..02ed8590607 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,19 @@ +Mon Apr 14 01:56:06 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com> + + * ace/Service_Config.h: + * ace/Service_Config.inl: + * ace/Service_Config.cpp: + + Moved ACE_Threading_Helper ctor and dtor implementaion + inline. This makes them available to code that indirectly + references the threadkey_ member (like, in examples/). This + should resolve link-time problems with borland compilers. + + * tests/Bug_2980_Regression_Test.cpp (unloadDll): + + Fixing warnings about missing extern "C" qualifier in call to + pthread_create. + Sun Apr 13 07:27:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> * ace/OS_NS_Thread.cpp (_vx_call_entry): diff --git a/ACE/ace/Service_Config.cpp b/ACE/ace/Service_Config.cpp index 37d8dcf4ffa..dfc6c416b50 100644 --- a/ACE/ace/Service_Config.cpp +++ b/ACE/ace/Service_Config.cpp @@ -52,19 +52,6 @@ ACE_Threading_Helper<ACE_Null_Mutex>::ACE_Threading_Helper () { } - -template <> -ACE_Threading_Helper<ACE_Thread_Mutex>::~ACE_Threading_Helper () -{ - ACE_OS::thr_key_detach (this->key_, 0); - ACE_OS::thr_keyfree (this->key_); -} - -template <> -ACE_Threading_Helper<ACE_Null_Mutex>::~ACE_Threading_Helper () -{ -} - template <> void ACE_Threading_Helper<ACE_Thread_Mutex>::set (void* p) { diff --git a/ACE/ace/Service_Config.h b/ACE/ace/Service_Config.h index 3268950a5ba..b816a75c159 100644 --- a/ACE/ace/Service_Config.h +++ b/ACE/ace/Service_Config.h @@ -200,11 +200,19 @@ private: class ACE_Export ACE_Service_Config { - // The Instance, or the global (default) configuration context. - // The monostate would forward the calls to that instance. The TSS - // will point here + /// The Instance, or the global (default) configuration context. + /// The monostate would forward the calls to that instance. The TSS + /// will point here ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> instance_; + + /// A helper instance to manage thread-specific key creation. + /// Dependent on the syncronization mutex ACE uses, the corresponding + /// partial template instantiation will perform the right services + /// that have to do with managing thread-specific storage. Note that, + /// for single-threaded builds they would do (next to) nothing. + ACE_Threading_Helper<ACE_SYNCH_MUTEX> threadkey_; + public: // = Initialization and termination methods. @@ -230,7 +238,7 @@ public: /// memory. virtual ~ACE_Service_Config (void); -protected: +private: /** * Performs an open without parsing command-line arguments. @@ -257,15 +265,6 @@ protected: */ virtual int parse_args_i (int argc, ACE_TCHAR *argv[]); - /** - * A helper instance to manage thread-specific key creation. - * Dependent on the syncronization mutex ACE uses, the corresponding - * partial template instantiation will perform the right services - * that have to do with managing thread-specific storage. Note that, - * for single-threaded builds they would do (next to) nothing. - */ - ACE_Threading_Helper<ACE_SYNCH_MUTEX> threadkey_; - /// = Static interfaces public: @@ -549,13 +548,21 @@ protected: u_int flags, ACE_Service_Object_Exterminator gobbler); -protected: - /// @deprecated /// Process service configuration requests that were provided on the /// command-line. Returns the number of errors that occurred. static int process_commandline_directives (void); + /// Become a daemon. + static int start_daemon (void); + + // @deprecated + // Add the default statically-linked services to the + // ACE_Service_Repository. + static int load_static_svcs (void); + +protected: + #if (ACE_USES_CLASSIC_SVC_CONF == 1) /// @deprecated /// This is the implementation function that process_directives() @@ -564,14 +571,8 @@ protected: static int process_directives_i (ACE_Svc_Conf_Param *param); #endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ - /// Become a daemon. - static int start_daemon (void); - - // @deprecated - // Add the default statically-linked services to the - // ACE_Service_Repository. - static int load_static_svcs (void); + // = Process-wide state. private: diff --git a/ACE/ace/Service_Config.inl b/ACE/ace/Service_Config.inl index 79d285f2037..62798c4cd16 100644 --- a/ACE/ace/Service_Config.inl +++ b/ACE/ace/Service_Config.inl @@ -9,6 +9,18 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL // This is the primary entry point into the ACE_Service_Config (the // constructor just handles simple initializations). +template <> ACE_INLINE +ACE_Threading_Helper<ACE_Thread_Mutex>::~ACE_Threading_Helper () +{ + ACE_OS::thr_key_detach (this->key_, 0); + ACE_OS::thr_keyfree (this->key_); +} + +template <> ACE_INLINE +ACE_Threading_Helper<ACE_Null_Mutex>::~ACE_Threading_Helper () +{ +} + ACE_INLINE int ACE_Service_Config::open (const ACE_TCHAR program_name[], const ACE_TCHAR *logger_key, diff --git a/ACE/tests/Bug_2980_Regression_Test.cpp b/ACE/tests/Bug_2980_Regression_Test.cpp index 06c6b291e57..eb918b27a87 100644 --- a/ACE/tests/Bug_2980_Regression_Test.cpp +++ b/ACE/tests/Bug_2980_Regression_Test.cpp @@ -92,8 +92,7 @@ void* loadDll(void*) return 0; } - - +extern "C" void* unloadDll(void*) { PRINTF ("unloadDll - entered\n"); @@ -107,6 +106,9 @@ void* unloadDll(void*) return 0; } + + + void * loadunloadDll(void *pp) { loadDll(pp); @@ -121,8 +123,6 @@ void * loadunloadDll(void *pp) return 0; } - - int main(int, char **) { PRINTF ("main called\n"); |