diff options
author | Erik Sohns <eriksohns@fastmail.net> | 2015-12-03 03:37:48 +0100 |
---|---|---|
committer | Erik Sohns <eriksohns@fastmail.net> | 2015-12-03 03:37:48 +0100 |
commit | 7acfc9e6f746a4b57f5e62847218a1552ea6be52 (patch) | |
tree | 1490e051ca30400db4d2e37d34531bbf10f376ea | |
parent | de13b795434877ad71f77a74180c2a01141083b2 (diff) | |
download | ATCD-7acfc9e6f746a4b57f5e62847218a1552ea6be52.tar.gz |
repaired include strategy for ace/Synch.h (prerequisite to solving template instantiation issues on Win32)
45 files changed, 176 insertions, 138 deletions
diff --git a/ACE/ace/Synch.h b/ACE/ace/Synch.h index 6a6bf794258..5843c28fa8d 100644 --- a/ACE/ace/Synch.h +++ b/ACE/ace/Synch.h @@ -20,6 +20,10 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +// *NOTE*: never never never ever #include this file in a header +// --> #include "ace/Synch_Traits.h" instead and #include "ace/Synch.h" +// in the .cpp. This prevents multiple implicit template +// instantiations (linker errors on MSVC) #if !defined (DO_NOT_INCLUDE_SYNCH_H) /* All the classes have been moved out into their own headers as part of diff --git a/ACE/apps/JAWS3/http/HTTP_Service_Handler.h b/ACE/apps/JAWS3/http/HTTP_Service_Handler.h index c8df6d3eba1..cab6cff8e64 100644 --- a/ACE/apps/JAWS3/http/HTTP_Service_Handler.h +++ b/ACE/apps/JAWS3/http/HTTP_Service_Handler.h @@ -2,10 +2,10 @@ #ifndef JAWS_HTTP_SERVICE_HANDLER_H #define JAWS_HTTP_SERVICE_HANDLER_H -#include "ace/Synch.h" #include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" #include "ace/SOCK_Acceptor.h" +#include "ace/Svc_Handler.h" +#include "ace/Synch_Traits.h" #include "jaws3/Protocol_Handler.h" diff --git a/ACE/apps/JAWS3/jaws3/Cached_Allocator_T.h b/ACE/apps/JAWS3/jaws3/Cached_Allocator_T.h index 67082e2bad6..30f39013db8 100644 --- a/ACE/apps/JAWS3/jaws3/Cached_Allocator_T.h +++ b/ACE/apps/JAWS3/jaws3/Cached_Allocator_T.h @@ -3,9 +3,9 @@ #define JAWS_CACHED_ALLOCATOR_T_H #include "ace/ACE.h" -#include "ace/Synch.h" -#include "ace/Malloc.h" #include "ace/Free_List.h" +#include "ace/Malloc.h" +#include "ace/Synch_Traits.h" #define JAWS_DEFAULT_ALLOCATOR_CHUNKS 10 #define JAWS_CACHED_ALLOCATOR(T) \ diff --git a/ACE/apps/JAWS3/jaws3/Config_File.cpp b/ACE/apps/JAWS3/jaws3/Config_File.cpp index ff2fa889489..9bff39efe2a 100644 --- a/ACE/apps/JAWS3/jaws3/Config_File.cpp +++ b/ACE/apps/JAWS3/jaws3/Config_File.cpp @@ -1,8 +1,9 @@ -#include "ace/OS_NS_stdlib.h" -#include "ace/OS_NS_string.h" #include "ace/FILE_Connector.h" #include "ace/Message_Block.h" +#include "ace/OS_NS_stdlib.h" +#include "ace/OS_NS_string.h" #include "ace/Singleton.h" +#include "ace/Synch.h" #include "ace/Unbounded_Queue.h" #ifndef JAWS_BUILD_DLL diff --git a/ACE/apps/JAWS3/jaws3/Datagram.h b/ACE/apps/JAWS3/jaws3/Datagram.h index 244c1a35f79..dda46d5a418 100644 --- a/ACE/apps/JAWS3/jaws3/Datagram.h +++ b/ACE/apps/JAWS3/jaws3/Datagram.h @@ -3,9 +3,9 @@ #define JAWS_DATAGRAM_H #include "ace/Addr.h" -#include "ace/Synch.h" #include "ace/Singleton.h" #include "ace/SOCK_Dgram.h" +#include "ace/Synch_Traits.h" #include "jaws3/Export.h" #include "jaws3/Event_Completer.h" diff --git a/ACE/apps/JAWS3/jaws3/Options.h b/ACE/apps/JAWS3/jaws3/Options.h index 3f9d847475b..f419ecd4813 100644 --- a/ACE/apps/JAWS3/jaws3/Options.h +++ b/ACE/apps/JAWS3/jaws3/Options.h @@ -3,7 +3,7 @@ #define JAWS_OPTIONS_H #include "ace/Singleton.h" -#include "ace/Synch.h" +#include "ace/Synch_Traits.h" #include "jaws3/Export.h" #include "jaws3/Config_File.h" diff --git a/ACE/apps/JAWS3/jaws3/Signal_Task.h b/ACE/apps/JAWS3/jaws3/Signal_Task.h index 242db3f9f8a..5cb83a14c06 100644 --- a/ACE/apps/JAWS3/jaws3/Signal_Task.h +++ b/ACE/apps/JAWS3/jaws3/Signal_Task.h @@ -2,9 +2,9 @@ #ifndef JAWS_SIGNAL_TASK_H #define JAWS_SIGNAL_TASK_H -#include "ace/Synch.h" #include "ace/Signal.h" #include "ace/Singleton.h" +#include "ace/Synch_Traits.h" #include "jaws3/Export.h" diff --git a/ACE/apps/JAWS3/jaws3/Symbol_Table.cpp b/ACE/apps/JAWS3/jaws3/Symbol_Table.cpp index 7c187498c3d..936d5eaf554 100644 --- a/ACE/apps/JAWS3/jaws3/Symbol_Table.cpp +++ b/ACE/apps/JAWS3/jaws3/Symbol_Table.cpp @@ -2,6 +2,8 @@ #define JAWS_BUILD_DLL #endif +#include "ace/Synch.h" + #include "jaws3/Symbol_Table.h" JAWS_Symbol_Table::JAWS_Symbol_Table (size_t size) diff --git a/ACE/apps/JAWS3/jaws3/Symbol_Table.h b/ACE/apps/JAWS3/jaws3/Symbol_Table.h index 346509e57f3..0b1ff507926 100644 --- a/ACE/apps/JAWS3/jaws3/Symbol_Table.h +++ b/ACE/apps/JAWS3/jaws3/Symbol_Table.h @@ -3,7 +3,7 @@ #define JAWS_SYMBOL_TABLE_H #include "ace/Hash_Map_Manager.h" -#include "ace/Synch.h" +#include "ace/Synch_Traits.h" #include "jaws3/Export.h" diff --git a/ACE/apps/JAWS3/small/SS_Service_Handler.h b/ACE/apps/JAWS3/small/SS_Service_Handler.h index a7e49ba2d8d..f7068f54626 100644 --- a/ACE/apps/JAWS3/small/SS_Service_Handler.h +++ b/ACE/apps/JAWS3/small/SS_Service_Handler.h @@ -2,11 +2,11 @@ #ifndef TERA_SS_SERVICE_HANDLER_H #define TERA_SS_SERVICE_HANDLER_H -#include "ace/Synch.h" #include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" #include "ace/SOCK_Acceptor.h" #include "ace/svc_export.h" +#include "ace/Svc_Handler.h" +#include "ace/Synch_Traits.h" #include "jaws3/Protocol_Handler.h" diff --git a/ACE/examples/APG/Logging/LogManager.h b/ACE/examples/APG/Logging/LogManager.h index 523abff55d8..d1689d7d3aa 100644 --- a/ACE/examples/APG/Logging/LogManager.h +++ b/ACE/examples/APG/Logging/LogManager.h @@ -1,8 +1,9 @@ #include "ace/streams.h" -#include "ace/Synch.h" -#include "ace/Singleton.h" + #include "ace/Log_Msg.h" #include "ace/Log_Msg_Callback.h" +#include "ace/Singleton.h" +#include "ace/Synch_Traits.h" #ifndef LOG_MANAGER_H #define LOG_MANAGER_H @@ -92,7 +93,7 @@ LogManager::redirectToCallback (ACE_Log_Msg_Callback * callback) // Listing 2 // Listing 3 code/ch03 -typedef ACE_Singleton<LogManager, ACE_Null_Mutex> +typedef ACE_Singleton<LogManager, ACE_SYNCH_NULL_MUTEX> LogManagerSingleton; #define LOG_MANAGER LogManagerSingleton::instance() // Listing 3 diff --git a/ACE/examples/APG/Logging/Use_LogManager.cpp b/ACE/examples/APG/Logging/Use_LogManager.cpp index d7b7c3607d9..afc23cc1f6d 100644 --- a/ACE/examples/APG/Logging/Use_LogManager.cpp +++ b/ACE/examples/APG/Logging/Use_LogManager.cpp @@ -1,3 +1,6 @@ + +#include "ace/Synch.h" + #include "LogManager.h" // Listing 1 code/ch03 diff --git a/ACE/examples/APG/ThreadSafety/ClientContext.h b/ACE/examples/APG/ThreadSafety/ClientContext.h index 168d4824bc2..f013ffe963a 100644 --- a/ACE/examples/APG/ThreadSafety/ClientContext.h +++ b/ACE/examples/APG/ThreadSafety/ClientContext.h @@ -7,9 +7,9 @@ #define __CLIENTCONTEXT_H_ #include "ace/Hash_Map_Manager.h" -#include "ace/Synch.h" +#include "ace/Synch_Traits.h" -typedef ACE_Hash_Map_Manager<const char *, void *, ACE_Null_Mutex> +typedef ACE_Hash_Map_Manager<const char *, void *, ACE_SYNCH_NULL_MUTEX> Map; // Listing 1 code/ch14 diff --git a/ACE/examples/APG/Threads/Message_Receiver.h b/ACE/examples/APG/Threads/Message_Receiver.h index 92f1ab61256..4697f54f026 100644 --- a/ACE/examples/APG/Threads/Message_Receiver.h +++ b/ACE/examples/APG/Threads/Message_Receiver.h @@ -10,7 +10,7 @@ #include "ace/Message_Block.h" #include "ace/SOCK_Stream.h" #include "ace/Svc_Handler.h" -#include "ace/Synch.h" +#include "ace/Synch_Traits.h" #include "ace/Task.h" // Listing 1 code/ch12 diff --git a/ACE/examples/APG/Timers/PTimerDispatcher.h b/ACE/examples/APG/Timers/PTimerDispatcher.h index 43047c67a8a..1954d3fd65d 100644 --- a/ACE/examples/APG/Timers/PTimerDispatcher.h +++ b/ACE/examples/APG/Timers/PTimerDispatcher.h @@ -2,8 +2,9 @@ #if !defined(PTIMER_DISPATCHER_H) #define PTIMER_DISPATCHER_H +#include "ace/Event.h" #include "ace/Singleton.h" -#include "ace/Synch.h" // needed for ACE_Event +#include "ace/Synch_Traits.h" #include "Upcall.h" class PCB; @@ -31,7 +32,7 @@ private: ACE_Event timer_; }; -typedef ACE_Singleton<PTimer_Dispatcher, ACE_Null_Mutex> PTimer; +typedef ACE_Singleton<PTimer_Dispatcher, ACE_SYNCH_NULL_MUTEX> PTimer; #endif /*TIMER_DISPATCHER_H*/ diff --git a/ACE/examples/APG/Timers/TimerDispatcher.h b/ACE/examples/APG/Timers/TimerDispatcher.h index 06ce42a8d8a..e587ab6fb05 100644 --- a/ACE/examples/APG/Timers/TimerDispatcher.h +++ b/ACE/examples/APG/Timers/TimerDispatcher.h @@ -2,9 +2,10 @@ #if !defined(TIMER_DISPATCHER_H) #define TIMER_DISPATCHER_H +#include "ace/Event.h" #include "ace/Event_Handler.h" #include "ace/Singleton.h" -#include "ace/Synch.h" // needed for ACE_Event +#include "ace/Synch_Traits.h" #include "ace/Timer_Queue.h" // Listing 1 code/ch20 @@ -31,7 +32,7 @@ private: ACE_Event timer_; }; -typedef ACE_Singleton<Timer_Dispatcher, ACE_Null_Mutex> Timer; +typedef ACE_Singleton<Timer_Dispatcher, ACE_SYNCH_NULL_MUTEX> Timer; // Listing 1 #endif /*TIMER_DISPATCHER_H*/ diff --git a/ACE/examples/APG/Timers/Upcall.h b/ACE/examples/APG/Timers/Upcall.h index 5b2c1c7593e..07e2e7c4afb 100644 --- a/ACE/examples/APG/Timers/Upcall.h +++ b/ACE/examples/APG/Timers/Upcall.h @@ -2,21 +2,21 @@ #if !defined(UPCALL_H) #define UPCALL_H +#include "ace/Synch_Traits.h" #include "ace/Timer_Queue_T.h" #include "ace/Timer_Heap_T.h" -#include "ace/Synch.h" #include "PCB.h" // Listing 1 code/ch20 class UpcallHandler; -typedef ACE_Timer_Queue_T<PCB*, UpcallHandler, ACE_Null_Mutex> +typedef ACE_Timer_Queue_T<PCB*, UpcallHandler, ACE_SYNCH_NULL_MUTEX> PTimerQueue; // Create a special heap-based timer queue that allows you to // control exactly how timer evetns are handled. -typedef ACE_Timer_Heap_T<PCB*, UpcallHandler, ACE_Null_Mutex> +typedef ACE_Timer_Heap_T<PCB*, UpcallHandler, ACE_SYNCH_NULL_MUTEX> PTimerHeap; // Listing 1 diff --git a/ACE/examples/C++NPv2/TP_Logging_Server.cpp b/ACE/examples/C++NPv2/TP_Logging_Server.cpp index 10bb93f0586..832110af219 100644 --- a/ACE/examples/C++NPv2/TP_Logging_Server.cpp +++ b/ACE/examples/C++NPv2/TP_Logging_Server.cpp @@ -5,6 +5,8 @@ #include "ace/OS_Memory.h" #include "ace/Guard_T.h" #include "ace/Message_Block.h" +#include "ace/Synch.h" + #include "TP_Logging_Server.h" int TP_Logging_Handler::handle_input (ACE_HANDLE) { diff --git a/ACE/examples/C++NPv2/TP_Logging_Server.h b/ACE/examples/C++NPv2/TP_Logging_Server.h index 0f0ca357b76..a4b1ac67f3a 100644 --- a/ACE/examples/C++NPv2/TP_Logging_Server.h +++ b/ACE/examples/C++NPv2/TP_Logging_Server.h @@ -7,8 +7,9 @@ #include "ace/Auto_Ptr.h" #include "ace/Singleton.h" -#include "ace/Synch.h" +#include "ace/Synch_Traits.h" #include "ace/Task.h" + #include "Logging_Acceptor.h" #include "Logging_Event_Handler.h" #include "Reactor_Logging_Server_T.h" @@ -29,7 +30,7 @@ public: virtual int svc (void); }; -typedef ACE_Unmanaged_Singleton<TP_Logging_Task, ACE_Null_Mutex> +typedef ACE_Unmanaged_Singleton<TP_Logging_Task, ACE_SYNCH_NULL_MUTEX> TP_LOGGING_TASK; /*******************************************************/ diff --git a/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.h b/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.h index 97446bf213c..b6071552713 100644 --- a/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.h +++ b/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.h @@ -16,18 +16,18 @@ #ifndef _THREAD_TIMER_QUEUE_TEST_H_ #define _THREAD_TIMER_QUEUE_TEST_H_ -#include "ace/Task.h" - #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Null_Mutex.h" +#include "ace/Event_Handler_Handle_Timeout_Upcall.h" +#include "ace/Synch_Traits.h" +#include "ace/Task.h" +#include "ace/Time_Value.h" #include "ace/Timer_Heap_T.h" #include "ace/Timer_Queue_Adapters.h" #include "ace/svc_export.h" -#include "ace/Condition_Recursive_Thread_Mutex.h" -#include "ace/Event_Handler_Handle_Timeout_Upcall.h" + #include "Driver.h" // These typedefs ensure that we use the minimal amount of locking @@ -36,11 +36,11 @@ typedef ACE_Event_Handler_Handle_Timeout_Upcall Upcall; typedef ACE_Timer_Heap_T<ACE_Event_Handler *, Upcall, - ACE_Null_Mutex> + ACE_SYNCH_NULL_MUTEX> Timer_Heap; typedef ACE_Timer_Heap_Iterator_T<ACE_Event_Handler *, Upcall, - ACE_Null_Mutex> + ACE_SYNCH_NULL_MUTEX> Timer_Heap_Iterator; typedef ACE_Thread_Timer_Queue_Adapter<Timer_Heap> Thread_Timer_Queue; diff --git a/ACE/protocols/ace/HTBP/HTBP_Addr.h b/ACE/protocols/ace/HTBP/HTBP_Addr.h index 2cb7febf4dc..0f6a1ba492a 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Addr.h +++ b/ACE/protocols/ace/HTBP/HTBP_Addr.h @@ -19,7 +19,6 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/INET_Addr.h" -#include "ace/Synch.h" #include "ace/SString.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ACE/protocols/ace/HTBP/HTBP_Channel.cpp b/ACE/protocols/ace/HTBP/HTBP_Channel.cpp index 48d897875b0..93b2b67da6d 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Channel.cpp +++ b/ACE/protocols/ace/HTBP/HTBP_Channel.cpp @@ -13,13 +13,14 @@ #include "HTBP_Channel.inl" #endif -#include "HTBP_Session.h" -#include "HTBP_Filter_Factory.h" - #include "ace/Message_Block.h" -#include "ace/Reactor.h" #include "ace/os_include/netinet/os_tcp.h" #include "ace/OS_NS_time.h" +#include "ace/Reactor.h" +#include "ace/Synch.h" + +#include "HTBP_Session.h" +#include "HTBP_Filter_Factory.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ACE/protocols/ace/HTBP/HTBP_Channel.h b/ACE/protocols/ace/HTBP/HTBP_Channel.h index 87f2dd7785a..30f895b32d8 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Channel.h +++ b/ACE/protocols/ace/HTBP/HTBP_Channel.h @@ -12,6 +12,7 @@ #define ACE_HTBP_CHANNEL_H #include /**/ "ace/pre.h" +#include "ace/INET_Addr.h" #include "ace/SOCK_Stream.h" #include "ace/Message_Block.h" diff --git a/ACE/protocols/ace/HTBP/HTBP_Filter.cpp b/ACE/protocols/ace/HTBP/HTBP_Filter.cpp index dd32c94e668..4337dd04eb5 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Filter.cpp +++ b/ACE/protocols/ace/HTBP/HTBP_Filter.cpp @@ -1,13 +1,13 @@ -#include "ace/Log_Msg.h" - -#include "HTBP_Session.h" #include "HTBP_Filter.h" #if !defined (__ACE_INLINE__) #include "HTBP_Filter.inl" #endif +#include "ace/Log_Msg.h" +#include "ace/Synch.h" +#include "HTBP_Session.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp b/ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp index 82cf2d324ad..16d90ee08de 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp +++ b/ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp @@ -1,13 +1,15 @@ -// ACE_HTBP_Filter.cpp -#include "ace/Log_Msg.h" -#include "ace/OS_NS_stdio.h" -#include "HTBP_Session.h" #include "HTBP_Inside_Squid_Filter.h" #if !defined (__ACE_INLINE__) #include "HTBP_Inside_Squid_Filter.inl" #endif +#include "ace/Log_Msg.h" +#include "ace/OS_NS_stdio.h" +#include "ace/Synch.h" + +#include "HTBP_Session.h" + ACE_BEGIN_VERSIONED_NAMESPACE_DECL ssize_t diff --git a/ACE/protocols/ace/HTBP/HTBP_Notifier.cpp b/ACE/protocols/ace/HTBP/HTBP_Notifier.cpp index 568dd8b4b25..f9096ce13e9 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Notifier.cpp +++ b/ACE/protocols/ace/HTBP/HTBP_Notifier.cpp @@ -8,9 +8,12 @@ */ //============================================================================= #include "HTBP_Notifier.h" + +#include "ace/Reactor.h" +#include "ace/Synch.h" + #include "HTBP_Channel.h" #include "HTBP_Session.h" -#include "ace/Reactor.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ACE/protocols/ace/HTBP/HTBP_Outside_Squid_Filter.cpp b/ACE/protocols/ace/HTBP/HTBP_Outside_Squid_Filter.cpp index 61d50294456..e024f6fa75b 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Outside_Squid_Filter.cpp +++ b/ACE/protocols/ace/HTBP/HTBP_Outside_Squid_Filter.cpp @@ -1,12 +1,14 @@ -#include "ace/Log_Msg.h" - -#include "HTBP_Session.h" #include "HTBP_Outside_Squid_Filter.h" #if !defined (__ACE_INLINE__) #include "HTBP_Outside_Squid_Filter.inl" #endif +#include "ace/Log_Msg.h" +#include "ace/Synch.h" + +#include "HTBP_Session.h" + ACE_BEGIN_VERSIONED_NAMESPACE_DECL ssize_t diff --git a/ACE/protocols/ace/HTBP/HTBP_Session.cpp b/ACE/protocols/ace/HTBP/HTBP_Session.cpp index 8bda293fe52..9ae6025601a 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Session.cpp +++ b/ACE/protocols/ace/HTBP/HTBP_Session.cpp @@ -1,17 +1,18 @@ -// SOCK_Stream.cpp -#include "ace/Log_Msg.h" - +#include "ace/Synch.h" #include "HTBP_Session.h" -#include "ace/SOCK_Connector.h" -#include "ace/Event_Handler.h" -#include "ace/os_include/netinet/os_tcp.h" -#include "HTBP_Filter.h" -#include "HTBP_ID_Requestor.h" #if !defined (__ACE_INLINE__) #include "HTBP_Session.inl" #endif +#include "ace/Event_Handler.h" +#include "ace/Log_Msg.h" +#include "ace/os_include/netinet/os_tcp.h" +#include "ace/SOCK_Connector.h" + +#include "HTBP_Filter.h" +#include "HTBP_ID_Requestor.h" + ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE::HTBP::Session::Session_Map ACE::HTBP::Session::session_map_; diff --git a/ACE/protocols/ace/HTBP/HTBP_Session.h b/ACE/protocols/ace/HTBP/HTBP_Session.h index 7098bf0b8fa..aecdfe22e1e 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Session.h +++ b/ACE/protocols/ace/HTBP/HTBP_Session.h @@ -12,10 +12,10 @@ #define ACE_HTBP_SESSION_H #include /**/ "ace/pre.h" -#include "ace/SOCK_IO.h" #include "ace/Hash_Map_Manager.h" -#include "ace/Synch.h" +#include "ace/Synch_Traits.h" #include "ace/Message_Queue.h" +#include "ace/SOCK_IO.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once diff --git a/ACE/protocols/ace/HTBP/HTBP_Stream.cpp b/ACE/protocols/ace/HTBP/HTBP_Stream.cpp index 77e7a3415b0..f14c8e003f6 100644 --- a/ACE/protocols/ace/HTBP/HTBP_Stream.cpp +++ b/ACE/protocols/ace/HTBP/HTBP_Stream.cpp @@ -9,10 +9,11 @@ //============================================================================= #include "HTBP_Stream.h" -#include "HTBP_Session.h" -#include "HTBP_Filter_Factory.h" - #include "ace/Message_Block.h" +#include "ace/Synch.h" + +#include "HTBP_Filter_Factory.h" +#include "HTBP_Session.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/ACE/protocols/ace/TMCast/LinkListener.hpp b/ACE/protocols/ace/TMCast/LinkListener.hpp index 76944d9d4c9..7e4de5ba688 100644 --- a/ACE/protocols/ace/TMCast/LinkListener.hpp +++ b/ACE/protocols/ace/TMCast/LinkListener.hpp @@ -1,12 +1,11 @@ // author : Boris Kolpackov <boris@dre.vanderbilt.edu> // OS primitives -#include <ace/OS_NS_string.h> -#include <ace/OS_NS_stdlib.h> -#include <ace/Synch.h> -#include <ace/SOCK_Dgram_Mcast.h> -#include <ace/Refcounted_Auto_Ptr.h> - +#include "ace/OS_NS_string.h" +#include "ace/OS_NS_stdlib.h" +#include "ace/Refcounted_Auto_Ptr.h" +#include "ace/SOCK_Dgram_Mcast.h" +#include "ace/Synch_Traits.h" #include "Messaging.hpp" #include "Protocol.hpp" @@ -150,7 +149,7 @@ namespace ACE_TMCast private: // FUZZ: disable check_for_ACE_Guard - typedef ACE_Guard<ACE_Thread_Mutex> AutoLock; + typedef ACE_Guard<ACE_SYNCH_MUTEX> AutoLock; // FUZZ: enable check_for_ACE_Guard ACE_hthread_t thread_; diff --git a/ACE/protocols/ace/TMCast/Messaging.hpp b/ACE/protocols/ace/TMCast/Messaging.hpp index 883f52273e5..f4046f0c68b 100644 --- a/ACE/protocols/ace/TMCast/Messaging.hpp +++ b/ACE/protocols/ace/TMCast/Messaging.hpp @@ -3,8 +3,8 @@ #ifndef TMCAST_MESSAGING_HPP #define TMCAST_MESSAGING_HPP -#include <ace/Synch.h> -#include <ace/Bound_Ptr.h> +#include "ace/Bound_Ptr.h" +#include "ace/Synch_Traits.h" #include "MTQueue.hpp" @@ -22,7 +22,7 @@ namespace ACE_TMCast MessagePtr; typedef - MTQueue<MessagePtr, ACE_Thread_Mutex, ACE_Condition<ACE_Thread_Mutex> > + MTQueue<MessagePtr, ACE_SYNCH_MUTEX, ACE_SYNCH_CONDITION > MessageQueue; struct MessageQueueAutoLock diff --git a/ACE/protocols/ace/TMCast/TransactionController.hpp b/ACE/protocols/ace/TMCast/TransactionController.hpp index 43ff7a9ee8c..57c601749ba 100644 --- a/ACE/protocols/ace/TMCast/TransactionController.hpp +++ b/ACE/protocols/ace/TMCast/TransactionController.hpp @@ -1,9 +1,9 @@ // author : Boris Kolpackov <boris@dre.vanderbilt.edu> +#include "ace/Bound_Ptr.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_stdlib.h" -#include "ace/Synch.h" -#include "ace/Bound_Ptr.h" +#include "ace/Synch_Traits.h" #include "Protocol.hpp" #include "Messaging.hpp" @@ -366,7 +366,7 @@ namespace ACE_TMCast private: // FUZZ: disable check_for_ACE_Guard - typedef ACE_Guard<ACE_Thread_Mutex> AutoLock; + typedef ACE_Guard<ACE_SYNCH_MUTEX> AutoLock; // FUZZ: enable check_for_ACE_Guard // bool trace_; diff --git a/ACE/protocols/tests/HTBP/Reactor_Tests/client.cpp b/ACE/protocols/tests/HTBP/Reactor_Tests/client.cpp index 4716ef081c4..1bb12a01271 100644 --- a/ACE/protocols/tests/HTBP/Reactor_Tests/client.cpp +++ b/ACE/protocols/tests/HTBP/Reactor_Tests/client.cpp @@ -2,9 +2,11 @@ * client for a reactor based connection establishment test using HTBP */ -#include "ace/Log_Msg.h" #include "ace/Get_Opt.h" +#include "ace/Log_Msg.h" +#include "ace/OS.h" #include "ace/OS_NS_sys_socket.h" +#include "ace/Synch.h" #include "ace/HTBP/HTBP_Session.h" #include "ace/HTBP/HTBP_Stream.h" diff --git a/ACE/protocols/tests/HTBP/Reactor_Tests/server.cpp b/ACE/protocols/tests/HTBP/Reactor_Tests/server.cpp index d2bc3bb661a..a24011b9fa4 100644 --- a/ACE/protocols/tests/HTBP/Reactor_Tests/server.cpp +++ b/ACE/protocols/tests/HTBP/Reactor_Tests/server.cpp @@ -2,21 +2,21 @@ * server for a reactor based connection establishment test using HTBP */ -#include "ace/Log_Msg.h" - -#include "ace/HTBP/HTBP_Session.h" -#include "ace/HTBP/HTBP_Stream.h" -#include "ace/HTBP/HTBP_Addr.h" - -#include "ace/SOCK_Acceptor.h" -#include "ace/SOCK_Stream.h" -#include "ace/Event_Handler.h" -#include "ace/Reactor.h" #include "ace/Get_Opt.h" +#include "ace/Event_Handler.h" +#include "ace/Log_Msg.h" #include "ace/OS_NS_stdio.h" #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_sys_socket.h" #include "ace/os_include/os_netdb.h" +#include "ace/Reactor.h" +#include "ace/SOCK_Acceptor.h" +#include "ace/SOCK_Stream.h" +#include "ace/Synch.h" + +#include "ace/HTBP/HTBP_Session.h" +#include "ace/HTBP/HTBP_Stream.h" +#include "ace/HTBP/HTBP_Addr.h" unsigned port = 8088; const ACE_TCHAR *notifier_file = 0; diff --git a/ACE/protocols/tests/HTBP/Reactor_Tests/test_config.h b/ACE/protocols/tests/HTBP/Reactor_Tests/test_config.h index 3567e4c897f..b46468ecb4f 100644 --- a/ACE/protocols/tests/HTBP/Reactor_Tests/test_config.h +++ b/ACE/protocols/tests/HTBP/Reactor_Tests/test_config.h @@ -31,10 +31,11 @@ // This first #undef protects against command-line definitions. #undef ACE_NDEBUG #include "ace/streams.h" -#include "ace/Singleton.h" -#include "ace/Synch.h" -#include "ace/Log_Msg.h" + #include "ace/ACE.h" +#include "ace/Log_Msg.h" +#include "ace/Singleton.h" +#include "ace/Synch_Traits.h" // The second #undef protects against being reset in a config.h file. #undef ACE_NDEBUG @@ -303,7 +304,7 @@ randomize (int array[], size_t size) } } -typedef ACE_Singleton<ACE_Test_Output, ACE_Null_Mutex> ace_file_stream; +typedef ACE_Singleton<ACE_Test_Output, ACE_NULL_MUTEX> ace_file_stream; #if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) template ACE_Singleton<ACE_Test_Output, ACE_Null_Mutex> * diff --git a/ACE/protocols/tests/HTBP/Send_Large_Msg/client.cpp b/ACE/protocols/tests/HTBP/Send_Large_Msg/client.cpp index cfe26926333..1b94d1fe166 100644 --- a/ACE/protocols/tests/HTBP/Send_Large_Msg/client.cpp +++ b/ACE/protocols/tests/HTBP/Send_Large_Msg/client.cpp @@ -1,13 +1,14 @@ +#include "ace/Get_Opt.h" +#include "ace/Log_Msg.h" +#include "ace/OS_NS_sys_socket.h" +#include "ace/Synch.h" + #include "ace/HTBP/HTBP_Session.h" #include "ace/HTBP/HTBP_Stream.h" #include "ace/HTBP/HTBP_Addr.h" #include "ace/HTBP/HTBP_ID_Requestor.h" #include "ace/HTBP/HTBP_Environment.h" -#include "ace/Log_Msg.h" -#include "ace/Get_Opt.h" -#include "ace/OS_NS_sys_socket.h" - const ssize_t Send_Size = 4*1024; const size_t Loops = 10; const size_t Total_Size = Send_Size * Loops; diff --git a/ACE/protocols/tests/HTBP/Send_Large_Msg/server.cpp b/ACE/protocols/tests/HTBP/Send_Large_Msg/server.cpp index 2e43f9bfba4..7ece62a7e7c 100644 --- a/ACE/protocols/tests/HTBP/Send_Large_Msg/server.cpp +++ b/ACE/protocols/tests/HTBP/Send_Large_Msg/server.cpp @@ -1,16 +1,17 @@ -#include "ace/Log_Msg.h" #include "ace/Get_Opt.h" +#include "ace/Log_Msg.h" +#include "ace/OS.h" +#include "ace/OS_NS_stdio.h" +#include "ace/OS_NS_sys_socket.h" +#include "ace/os_include/os_netdb.h" +#include "ace/SOCK_Acceptor.h" +#include "ace/SOCK_Stream.h" +#include "ace/Synch.h" #include "ace/HTBP/HTBP_Session.h" #include "ace/HTBP/HTBP_Stream.h" #include "ace/HTBP/HTBP_Addr.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/SOCK_Stream.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_sys_socket.h" -#include "ace/os_include/os_netdb.h" - const size_t Send_Size = 4*1024; const size_t Loops = 10; const size_t Total_Size = Send_Size * Loops; diff --git a/ACE/protocols/tests/HTBP/Send_Recv_Tests/client.cpp b/ACE/protocols/tests/HTBP/Send_Recv_Tests/client.cpp index 23a8d837836..5f02b2e0c91 100644 --- a/ACE/protocols/tests/HTBP/Send_Recv_Tests/client.cpp +++ b/ACE/protocols/tests/HTBP/Send_Recv_Tests/client.cpp @@ -16,19 +16,20 @@ */ //============================================================================= - -#include "ace/HTBP/HTBP_Stream.h" -#include "ace/HTBP/HTBP_Session.h" -#include "ace/HTBP/HTBP_ID_Requestor.h" -#include "ace/HTBP/HTBP_Environment.h" - +#include "ace/Get_Opt.h" +#include "ace/OS.h" +#include "ace/OS_NS_sys_socket.h" +#include "ace/Synch.h" #include "ace/Thread.h" #include "ace/Thread_Manager.h" #include "ace/SOCK_Connector.h" #include "ace/SOCK_Acceptor.h" #include "ace/SOCK_Stream.h" -#include "ace/Get_Opt.h" -#include "ace/OS_NS_sys_socket.h" + +#include "ace/HTBP/HTBP_Stream.h" +#include "ace/HTBP/HTBP_Session.h" +#include "ace/HTBP/HTBP_ID_Requestor.h" +#include "ace/HTBP/HTBP_Environment.h" // Change to non-zero if test fails static int Test_Result = 0; diff --git a/ACE/protocols/tests/HTBP/Send_Recv_Tests/server.cpp b/ACE/protocols/tests/HTBP/Send_Recv_Tests/server.cpp index 05e2bf4c069..7e7a95e8596 100644 --- a/ACE/protocols/tests/HTBP/Send_Recv_Tests/server.cpp +++ b/ACE/protocols/tests/HTBP/Send_Recv_Tests/server.cpp @@ -16,22 +16,23 @@ */ //============================================================================= +#include "ace/Get_Opt.h" +#include "ace/OS.h" +#include "ace/OS_NS_stdio.h" +#include "ace/OS_NS_sys_socket.h" +#include "ace/os_include/os_netdb.h" +#include "ace/SOCK_Connector.h" +#include "ace/SOCK_Acceptor.h" +#include "ace/SOCK_Stream.h" +#include "ace/Synch.h" +#include "ace/Thread.h" +#include "ace/Thread_Manager.h" #include "ace/HTBP/HTBP_Stream.h" #include "ace/HTBP/HTBP_Session.h" #include "ace/HTBP/HTBP_ID_Requestor.h" #include "ace/HTBP/HTBP_Environment.h" -#include "ace/Thread.h" -#include "ace/Thread_Manager.h" -#include "ace/SOCK_Connector.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/SOCK_Stream.h" -#include "ace/Get_Opt.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_sys_socket.h" -#include "ace/os_include/os_netdb.h" - // Change to non-zero if test fails static int Test_Result = 0; diff --git a/ACE/protocols/tests/HTBP/ping/client.cpp b/ACE/protocols/tests/HTBP/ping/client.cpp index 6ae5ff57fd2..cde6ee3a0cd 100644 --- a/ACE/protocols/tests/HTBP/ping/client.cpp +++ b/ACE/protocols/tests/HTBP/ping/client.cpp @@ -5,8 +5,10 @@ #include "ace/ACE.h" #include "ace/Log_Msg.h" #include "ace/Get_Opt.h" +#include "ace/OS.h" #include "ace/OS_NS_sys_socket.h" #include "ace/os_include/os_netdb.h" +#include "ace/Synch.h" #include "ace/HTBP/HTBP_Session.h" #include "ace/HTBP/HTBP_Stream.h" diff --git a/ACE/protocols/tests/HTBP/ping/server.cpp b/ACE/protocols/tests/HTBP/ping/server.cpp index e0a52fba7eb..f4752a202ca 100644 --- a/ACE/protocols/tests/HTBP/ping/server.cpp +++ b/ACE/protocols/tests/HTBP/ping/server.cpp @@ -2,19 +2,20 @@ * server for a basic connection establishment test using HTBP */ +#include "ace/Get_Opt.h" #include "ace/Log_Msg.h" +#include "ace/OS.h" +#include "ace/OS_NS_stdio.h" +#include "ace/OS_NS_sys_socket.h" +#include "ace/os_include/os_netdb.h" +#include "ace/SOCK_Acceptor.h" +#include "ace/SOCK_Stream.h" +#include "ace/Synch.h" #include "ace/HTBP/HTBP_Session.h" #include "ace/HTBP/HTBP_Stream.h" #include "ace/HTBP/HTBP_Addr.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/SOCK_Stream.h" -#include "ace/Get_Opt.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_sys_socket.h" -#include "ace/os_include/os_netdb.h" - unsigned port = 8088; const ACE_TCHAR *notifier_file = 0; int diff --git a/ACE/tests/Recursive_Condition_Bug_Test.cpp b/ACE/tests/Recursive_Condition_Bug_Test.cpp index 1513b583c5e..c2b98b3c92b 100644 --- a/ACE/tests/Recursive_Condition_Bug_Test.cpp +++ b/ACE/tests/Recursive_Condition_Bug_Test.cpp @@ -14,14 +14,14 @@ */ //============================================================================= - -#include "test_config.h" +#include "ace/Activation_Queue.h" #include "ace/OS_NS_sys_time.h" +#include "ace/Synch.h" #include "ace/Task_T.h" -#include "ace/Activation_Queue.h" #include "ace/Timer_Heap.h" #include "ace/Timer_Queue_Adapters.h" -#include "ace/Condition_Recursive_Thread_Mutex.h" + +#include "test_config.h" // *NOTE*: explicit template instantiation required here... template class ACE_Condition<ACE_Recursive_Thread_Mutex>; diff --git a/ACE/tests/Recursive_Condition_Test.cpp b/ACE/tests/Recursive_Condition_Test.cpp index cfda711b41e..221b29cf07c 100644 --- a/ACE/tests/Recursive_Condition_Test.cpp +++ b/ACE/tests/Recursive_Condition_Test.cpp @@ -11,21 +11,23 @@ */ //============================================================================= - -#include "test_config.h" -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_sys_time.h" #include "ace/Event_Handler.h" #include "ace/Log_Msg.h" +#include "ace/OS_NS_sys_time.h" +#include "ace/OS_NS_unistd.h" +#include "ace/Synch.h" #include "ace/Thread_Manager.h" #include "ace/Timer_Heap.h" #include "ace/Timer_Queue_Adapters.h" - +#include "test_config.h" #if defined (ACE_HAS_THREADS) typedef ACE_Thread_Timer_Queue_Adapter<ACE_Timer_Heap> Thread_Timer_Queue; +// +//// *NOTE*: explicit template instantiation required here... +//template class ACE_Condition<ACE_Recursive_Thread_Mutex>; class Test_Handler : public ACE_Event_Handler { @@ -60,7 +62,8 @@ private: // These are for the basic functionality tests. ACE_SYNCH_RECURSIVE_MUTEX mutex_; -ACE_Condition<ACE_SYNCH_RECURSIVE_MUTEX> condition_ (mutex_); +//ACE_Condition<ACE_SYNCH_RECURSIVE_MUTEX> condition_ (mutex_); +ACE_SYNCH_RECURSIVE_CONDITION condition_ (mutex_); // Test driver sets this to non-zero before spawning and to zero for // waiter. int protected_int = 0; diff --git a/ACE/tests/Refcounted_Auto_Ptr_Test.h b/ACE/tests/Refcounted_Auto_Ptr_Test.h index bc723826f68..1b59494f791 100644 --- a/ACE/tests/Refcounted_Auto_Ptr_Test.h +++ b/ACE/tests/Refcounted_Auto_Ptr_Test.h @@ -15,7 +15,7 @@ #define ACE_TESTS_REFCOUNTED_AUTO_PTR_TEST_H #include "ace/Atomic_Op.h" -#include "ace/Synch.h" +#include "ace/Synch_Traits.h" struct Printer { |