diff options
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 14 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 14 | ||||
-rw-r--r-- | ace/OS.cpp | 75 | ||||
-rw-r--r-- | ace/Object_Manager.cpp | 15 | ||||
-rw-r--r-- | ace/Object_Manager.h | 27 | ||||
-rw-r--r-- | ace/Parse_Node.cpp | 7 | ||||
-rw-r--r-- | ace/Parse_Node.h | 7 |
8 files changed, 135 insertions, 38 deletions
diff --git a/ChangeLog b/ChangeLog index 7bae6a52ce5..c500485345f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Mon Jul 24 21:22:03 2000 Andrew G. Gilpin <agg1@cs.wustl.edu> + + * ace/Remote_Tokens.cpp: + * ace/Signal.{cpp,h}: + * ace/Priority_Reactor.cpp: + * ace/Object_Manager.{cpp,h}: + * ace/OS.cpp: + * ace/Parse_Node.{cpp,h}: + + The script $ACE_ROOT/bin/split-cpp makes some assumptions about the + source code that it is working with. These changes allow split-cpp + to be used with ACE. These fixes are all mostly code formatting changes. + The functionality should not be changed in any case. + Mon Jul 24 20:21:47 2000 Andrew G. Gilpin <agg1@cs.wustl.edu> * include/makeinclude/wrapper_macros.GNU diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 7bae6a52ce5..c500485345f 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,17 @@ +Mon Jul 24 21:22:03 2000 Andrew G. Gilpin <agg1@cs.wustl.edu> + + * ace/Remote_Tokens.cpp: + * ace/Signal.{cpp,h}: + * ace/Priority_Reactor.cpp: + * ace/Object_Manager.{cpp,h}: + * ace/OS.cpp: + * ace/Parse_Node.{cpp,h}: + + The script $ACE_ROOT/bin/split-cpp makes some assumptions about the + source code that it is working with. These changes allow split-cpp + to be used with ACE. These fixes are all mostly code formatting changes. + The functionality should not be changed in any case. + Mon Jul 24 20:21:47 2000 Andrew G. Gilpin <agg1@cs.wustl.edu> * include/makeinclude/wrapper_macros.GNU diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 7bae6a52ce5..c500485345f 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,17 @@ +Mon Jul 24 21:22:03 2000 Andrew G. Gilpin <agg1@cs.wustl.edu> + + * ace/Remote_Tokens.cpp: + * ace/Signal.{cpp,h}: + * ace/Priority_Reactor.cpp: + * ace/Object_Manager.{cpp,h}: + * ace/OS.cpp: + * ace/Parse_Node.{cpp,h}: + + The script $ACE_ROOT/bin/split-cpp makes some assumptions about the + source code that it is working with. These changes allow split-cpp + to be used with ACE. These fixes are all mostly code formatting changes. + The functionality should not be changed in any case. + Mon Jul 24 20:21:47 2000 Andrew G. Gilpin <agg1@cs.wustl.edu> * include/makeinclude/wrapper_macros.GNU diff --git a/ace/OS.cpp b/ace/OS.cpp index 624b8a87fea..e20f99abb76 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -68,14 +68,20 @@ protected: ACE_OS_Thread_Mutex_Guard (const ACE_OS_Thread_Mutex_Guard &); }; -inline +#if defined (ACE_IS_SPLITTING) +# define ACE_SPECIAL_INLINE +#else +# define ACE_SPECIAL_INLINE inline +#endif + +ACE_SPECIAL_INLINE int ACE_OS_Thread_Mutex_Guard::acquire (void) { return owner_ = ACE_OS::thread_mutex_lock (&lock_); } -inline +ACE_SPECIAL_INLINE int ACE_OS_Thread_Mutex_Guard::release (void) { @@ -88,7 +94,7 @@ ACE_OS_Thread_Mutex_Guard::release (void) } } -inline +ACE_SPECIAL_INLINE ACE_OS_Thread_Mutex_Guard::ACE_OS_Thread_Mutex_Guard (ACE_thread_mutex_t &m) : lock_ (m) { @@ -136,14 +142,14 @@ protected: const ACE_OS_Recursive_Thread_Mutex_Guard &); }; -inline +ACE_SPECIAL_INLINE int ACE_OS_Recursive_Thread_Mutex_Guard::acquire (void) { return owner_ = ACE_OS::recursive_mutex_lock (&lock_); } -inline +ACE_SPECIAL_INLINE int ACE_OS_Recursive_Thread_Mutex_Guard::release (void) { @@ -156,7 +162,7 @@ ACE_OS_Recursive_Thread_Mutex_Guard::release (void) } } -inline +ACE_SPECIAL_INLINE ACE_OS_Recursive_Thread_Mutex_Guard::ACE_OS_Recursive_Thread_Mutex_Guard ( ACE_recursive_thread_mutex_t &m) : lock_ (m), @@ -1505,7 +1511,7 @@ ACE_TRACE ("ACE_TSS_Ref::operator=="); } // Check for inequality. -inline +ACE_SPECIAL_INLINE int ACE_TSS_Ref::operator!= (const ACE_TSS_Ref &tss_ref) const { @@ -1539,17 +1545,17 @@ ACE_TRACE ("ACE_TSS_Info::ACE_TSS_Info"); } # if defined (ACE_HAS_NONSCALAR_THREAD_KEY_T) - static inline int operator== (const ACE_thread_key_t &lhs, - const ACE_thread_key_t &rhs) - { - return ! ACE_OS::memcmp (&lhs, &rhs, sizeof (ACE_thread_key_t)); - } +static inline int operator== (const ACE_thread_key_t &lhs, + const ACE_thread_key_t &rhs) +{ + return ! ACE_OS::memcmp (&lhs, &rhs, sizeof (ACE_thread_key_t)); +} - static inline int operator!= (const ACE_thread_key_t &lhs, - const ACE_thread_key_t &rhs) - { - return ! (lhs == rhs); - } +static inline int operator!= (const ACE_thread_key_t &lhs, + const ACE_thread_key_t &rhs) +{ + return ! (lhs == rhs); +} # endif /* ACE_HAS_NONSCALAR_THREAD_KEY_T */ // Check for equality. @@ -1593,7 +1599,7 @@ ACE_TSS_Keys::ACE_TSS_Keys (void) } } -inline +ACE_SPECIAL_INLINE void ACE_TSS_Keys::find (const u_int key, u_int &word, u_int &bit) { @@ -2074,7 +2080,6 @@ ACE_OS_thread_key_t ACE_TSS_Emulation::native_tss_key_; /* static */ # if defined (ACE_HAS_THR_C_FUNC) extern "C" -# endif /* ACE_HAS_THR_C_FUNC */ void ACE_TSS_Emulation_cleanup (void *ptr) { @@ -2082,6 +2087,15 @@ ACE_TSS_Emulation_cleanup (void *ptr) // Really this must be used for ACE_TSS_Emulation code to make the TSS // cleanup } +#else +void +ACE_TSS_Emulation_cleanup (void *ptr) +{ + ACE_UNUSED_ARG (ptr); + // Really this must be used for ACE_TSS_Emulation code to make the TSS + // cleanup +} +# endif /* ACE_HAS_THR_C_FUNC */ void ** ACE_TSS_Emulation::tss_base (void* ts_storage[], u_int *ts_created) @@ -2604,10 +2618,24 @@ ace_cleanup_destroyer (ACE_Cleanup *object, void *param) #if defined (ACE_PSOS) extern "C" void ace_thread_adapter (unsigned long args) +{ + ACE_TRACE ("ace_thread_adapter"); + +#if defined (ACE_HAS_TSS_EMULATION) + // As early as we can in the execution of the new thread, allocate + // its local TS storage. Allocate it on the stack, to save dynamic + // allocation/dealloction. + void *ts_storage[ACE_TSS_Emulation::ACE_TSS_THREAD_KEYS_MAX]; + ACE_TSS_Emulation::tss_open (ts_storage); +#endif /* ACE_HAS_TSS_EMULATION */ + + ACE_Thread_Adapter *thread_args = (ACE_Thread_Adapter *) args; + + // Invoke the user-supplied function with the args. + thread_args->invoke (); +} #else /* ! defined (ACE_PSOS) */ -extern "C" void * -ace_thread_adapter (void *args) -#endif /* ACE_PSOS */ +extern "C" void * ace_thread_adapter (void *args) { ACE_TRACE ("ace_thread_adapter"); @@ -2624,10 +2652,9 @@ ace_thread_adapter (void *args) // Invoke the user-supplied function with the args. void *status = thread_args->invoke (); -#if ! defined (ACE_PSOS) return status; -#endif /* ACE_PSOS */ } +#endif /* ACE_PSOS */ ACE_Thread_Adapter::ACE_Thread_Adapter (ACE_THR_FUNC user_func, diff --git a/ace/Object_Manager.cpp b/ace/Object_Manager.cpp index 88a6cb502aa..f3bec50b9ff 100644 --- a/ace/Object_Manager.cpp +++ b/ace/Object_Manager.cpp @@ -112,9 +112,9 @@ private: // We can't use the ACE_SVC_FACTORY_DECLARE macro here because this // needs to be in the ACE_Export context rather than the // ACE_Svc_Export context. -extern "C" ACE_Export -ACE_Service_Object * -_make_ACE_Service_Manager (ACE_Service_Object_Exterminator *); +//extern "C" ACE_Export +//ACE_Service_Object * +//_make_ACE_Service_Manager (ACE_Service_Object_Exterminator *); ACE_Object_Manager_Preallocations::ACE_Object_Manager_Preallocations (void) { @@ -767,12 +767,13 @@ static ACE_Object_Manager_Manager ACE_Object_Manager_Manager_instance; #if defined (ACE_HAS_THREADS) +// hack to get around errors while compiling using split-cpp +#if !defined (ACE_IS_SPLITTING) // This is global so that it doesn't have to be declared in the header // file. That would cause nasty circular include problems. -typedef ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex> - ACE_Static_Object_Lock_Type; -static ACE_Static_Object_Lock_Type * - ACE_Static_Object_Lock_lock = 0; +typedef ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex> ACE_Static_Object_Lock_Type; +static ACE_Static_Object_Lock_Type *ACE_Static_Object_Lock_lock = 0; +#endif /* ! ACE_IS_SPLITTING */ // ACE_SHOULD_MALLOC_STATIC_OBJECT_LOCK isn't (currently) used by ACE. // But, applications may find it useful for avoiding recursive calls diff --git a/ace/Object_Manager.h b/ace/Object_Manager.h index 91457dd2e46..101fbaf0927 100644 --- a/ace/Object_Manager.h +++ b/ace/Object_Manager.h @@ -432,5 +432,32 @@ public: #include "ace/Managed_Object.h" +#if !defined (ACE_LACKS_ACE_SVCCONF) +// We can't use the ACE_SVC_FACTORY_DECLARE macro here because this +// needs to be in the ACE_Export context rather than the +// ACE_Svc_Export context. +class ACE_Service_Object; +extern "C" ACE_Export +ACE_Service_Object * +_make_ACE_Service_Manager (ACE_Service_Object_Exterminator *); +#endif /* ! ACE_LACKS_ACE_SVCCONF */ + +// hack to get around errors while compiling using split-cpp +#if defined (ACE_HAS_THREADS) + +# if defined (ACE_IS_SPLITTING) +typedef ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex> ACE_Static_Object_Lock_Type; + +# if defined (__GNUC__) +// With g++, suppress the warning that this is unused. +static ACE_Static_Object_Lock_Type *ACE_Static_Object_Lock_lock __attribute__ ((unused)) = 0; +# else +static ACE_Static_Object_Lock_Type *ACE_Static_Object_Lock_lock = 0; +# endif /* __GNUC__ */ + +# endif /* ACE_IS_SPLITTING */ + +#endif /* ACE_HAS_THREADS */ + #include "ace/post.h" #endif /* ACE_OBJECT_MANAGER_H */ diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp index 4e7b0d194bd..1bb269ca593 100644 --- a/ace/Parse_Node.cpp +++ b/ace/Parse_Node.cpp @@ -14,13 +14,6 @@ ACE_RCSID(ace, Parse_Node, "$Id$") -// Keeps track of the number of errors encountered so far. -extern int ace_yyerrno; - -// Global variable used to communicate between the parser and the main -// program. -extern ACE_Service_Config *ace_this_svc; - ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Node) void diff --git a/ace/Parse_Node.h b/ace/Parse_Node.h index 87e80ef0063..c3f98b13320 100644 --- a/ace/Parse_Node.h +++ b/ace/Parse_Node.h @@ -297,5 +297,12 @@ private: #include "ace/Parse_Node.i" #endif /* __ACE_INLINE__ */ +// Keeps track of the number of errors encountered so far. +extern int ace_yyerrno; + +// Global variable used to communicate between the parser and the main +// program. +extern ACE_Service_Config *ace_this_svc; + #include "ace/post.h" #endif /* ACE_PARSE_NODE_H */ |