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 /ACE/examples | |
parent | de13b795434877ad71f77a74180c2a01141083b2 (diff) | |
download | ATCD-7acfc9e6f746a4b57f5e62847218a1552ea6be52.tar.gz |
repaired include strategy for ace/Synch.h (prerequisite to solving template instantiation issues on Win32)
Diffstat (limited to 'ACE/examples')
-rw-r--r-- | ACE/examples/APG/Logging/LogManager.h | 7 | ||||
-rw-r--r-- | ACE/examples/APG/Logging/Use_LogManager.cpp | 3 | ||||
-rw-r--r-- | ACE/examples/APG/ThreadSafety/ClientContext.h | 4 | ||||
-rw-r--r-- | ACE/examples/APG/Threads/Message_Receiver.h | 2 | ||||
-rw-r--r-- | ACE/examples/APG/Timers/PTimerDispatcher.h | 5 | ||||
-rw-r--r-- | ACE/examples/APG/Timers/TimerDispatcher.h | 5 | ||||
-rw-r--r-- | ACE/examples/APG/Timers/Upcall.h | 6 | ||||
-rw-r--r-- | ACE/examples/C++NPv2/TP_Logging_Server.cpp | 2 | ||||
-rw-r--r-- | ACE/examples/C++NPv2/TP_Logging_Server.h | 5 | ||||
-rw-r--r-- | ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.h | 14 |
10 files changed, 31 insertions, 22 deletions
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; |