summaryrefslogtreecommitdiff
path: root/ACE/examples
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@users.noreply.github.com>2016-10-31 16:30:31 +0100
committerGitHub <noreply@github.com>2016-10-31 16:30:31 +0100
commit8390b59170b1b66bdda62f2c0bd544fb8baf8b6b (patch)
tree592d4c3e0feb26a13c6285ae208f272d4a660e60 /ACE/examples
parentbd5aaab0e6022781ff8fdb383ea75ae3ecc3b17d (diff)
downloadATCD-8390b59170b1b66bdda62f2c0bd544fb8baf8b6b.tar.gz
Revert "some (bundled) minor changes (take 2)"revert-176-master
Diffstat (limited to 'ACE/examples')
-rw-r--r--ACE/examples/APG/Logging/LogManager.h7
-rw-r--r--ACE/examples/APG/Logging/Use_LogManager.cpp3
-rw-r--r--ACE/examples/APG/ThreadSafety/ClientContext.h4
-rw-r--r--ACE/examples/APG/Threads/Message_Receiver.h2
-rw-r--r--ACE/examples/APG/Timers/PTimerDispatcher.h5
-rw-r--r--ACE/examples/APG/Timers/TimerDispatcher.h5
-rw-r--r--ACE/examples/APG/Timers/Upcall.h6
-rw-r--r--ACE/examples/C++NPv2/TP_Logging_Server.cpp2
-rw-r--r--ACE/examples/C++NPv2/TP_Logging_Server.h5
-rw-r--r--ACE/examples/Timer_Queue/Thread_Timer_Queue_Custom_Handler_Test.h1
-rw-r--r--ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp2
-rw-r--r--ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.h14
12 files changed, 25 insertions, 31 deletions
diff --git a/ACE/examples/APG/Logging/LogManager.h b/ACE/examples/APG/Logging/LogManager.h
index d1689d7d3aa..523abff55d8 100644
--- a/ACE/examples/APG/Logging/LogManager.h
+++ b/ACE/examples/APG/Logging/LogManager.h
@@ -1,9 +1,8 @@
#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
@@ -93,7 +92,7 @@ LogManager::redirectToCallback (ACE_Log_Msg_Callback * callback)
// Listing 2
// Listing 3 code/ch03
-typedef ACE_Singleton<LogManager, ACE_SYNCH_NULL_MUTEX>
+typedef ACE_Singleton<LogManager, ACE_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 afc23cc1f6d..d7b7c3607d9 100644
--- a/ACE/examples/APG/Logging/Use_LogManager.cpp
+++ b/ACE/examples/APG/Logging/Use_LogManager.cpp
@@ -1,6 +1,3 @@
-
-#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 f013ffe963a..168d4824bc2 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_Traits.h"
+#include "ace/Synch.h"
-typedef ACE_Hash_Map_Manager<const char *, void *, ACE_SYNCH_NULL_MUTEX>
+typedef ACE_Hash_Map_Manager<const char *, void *, ACE_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 4697f54f026..92f1ab61256 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_Traits.h"
+#include "ace/Synch.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 1954d3fd65d..43047c67a8a 100644
--- a/ACE/examples/APG/Timers/PTimerDispatcher.h
+++ b/ACE/examples/APG/Timers/PTimerDispatcher.h
@@ -2,9 +2,8 @@
#if !defined(PTIMER_DISPATCHER_H)
#define PTIMER_DISPATCHER_H
-#include "ace/Event.h"
#include "ace/Singleton.h"
-#include "ace/Synch_Traits.h"
+#include "ace/Synch.h" // needed for ACE_Event
#include "Upcall.h"
class PCB;
@@ -32,7 +31,7 @@ private:
ACE_Event timer_;
};
-typedef ACE_Singleton<PTimer_Dispatcher, ACE_SYNCH_NULL_MUTEX> PTimer;
+typedef ACE_Singleton<PTimer_Dispatcher, ACE_Null_Mutex> PTimer;
#endif /*TIMER_DISPATCHER_H*/
diff --git a/ACE/examples/APG/Timers/TimerDispatcher.h b/ACE/examples/APG/Timers/TimerDispatcher.h
index e587ab6fb05..06ce42a8d8a 100644
--- a/ACE/examples/APG/Timers/TimerDispatcher.h
+++ b/ACE/examples/APG/Timers/TimerDispatcher.h
@@ -2,10 +2,9 @@
#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_Traits.h"
+#include "ace/Synch.h" // needed for ACE_Event
#include "ace/Timer_Queue.h"
// Listing 1 code/ch20
@@ -32,7 +31,7 @@ private:
ACE_Event timer_;
};
-typedef ACE_Singleton<Timer_Dispatcher, ACE_SYNCH_NULL_MUTEX> Timer;
+typedef ACE_Singleton<Timer_Dispatcher, ACE_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 07e2e7c4afb..5b2c1c7593e 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_SYNCH_NULL_MUTEX>
+typedef ACE_Timer_Queue_T<PCB*, UpcallHandler, ACE_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_SYNCH_NULL_MUTEX>
+typedef ACE_Timer_Heap_T<PCB*, UpcallHandler, ACE_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 832110af219..10bb93f0586 100644
--- a/ACE/examples/C++NPv2/TP_Logging_Server.cpp
+++ b/ACE/examples/C++NPv2/TP_Logging_Server.cpp
@@ -5,8 +5,6 @@
#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 a4b1ac67f3a..0f0ca357b76 100644
--- a/ACE/examples/C++NPv2/TP_Logging_Server.h
+++ b/ACE/examples/C++NPv2/TP_Logging_Server.h
@@ -7,9 +7,8 @@
#include "ace/Auto_Ptr.h"
#include "ace/Singleton.h"
-#include "ace/Synch_Traits.h"
+#include "ace/Synch.h"
#include "ace/Task.h"
-
#include "Logging_Acceptor.h"
#include "Logging_Event_Handler.h"
#include "Reactor_Logging_Server_T.h"
@@ -30,7 +29,7 @@ public:
virtual int svc (void);
};
-typedef ACE_Unmanaged_Singleton<TP_Logging_Task, ACE_SYNCH_NULL_MUTEX>
+typedef ACE_Unmanaged_Singleton<TP_Logging_Task, ACE_Null_Mutex>
TP_LOGGING_TASK;
/*******************************************************/
diff --git a/ACE/examples/Timer_Queue/Thread_Timer_Queue_Custom_Handler_Test.h b/ACE/examples/Timer_Queue/Thread_Timer_Queue_Custom_Handler_Test.h
index a412ac358cf..5ccb0e01bff 100644
--- a/ACE/examples/Timer_Queue/Thread_Timer_Queue_Custom_Handler_Test.h
+++ b/ACE/examples/Timer_Queue/Thread_Timer_Queue_Custom_Handler_Test.h
@@ -26,6 +26,7 @@
#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 "Driver.h"
#include "Custom_Handler.h"
diff --git a/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp b/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp
index 2a251ffc218..03471912ad9 100644
--- a/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp
+++ b/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.cpp
@@ -22,6 +22,8 @@
#include "ace/Condition_T.h"
#include "ace/Thread_Mutex.h"
+
+
// Administrivia methods...
Handler::Handler(const ACE_Time_Value &expiration_time)
: expires_ (expiration_time),
diff --git a/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.h b/ACE/examples/Timer_Queue/Thread_Timer_Queue_Test.h
index b6071552713..97446bf213c 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/Event_Handler_Handle_Timeout_Upcall.h"
-#include "ace/Synch_Traits.h"
-#include "ace/Task.h"
-#include "ace/Time_Value.h"
+#include "ace/Null_Mutex.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_SYNCH_NULL_MUTEX>
+ ACE_Null_Mutex>
Timer_Heap;
typedef ACE_Timer_Heap_Iterator_T<ACE_Event_Handler *,
Upcall,
- ACE_SYNCH_NULL_MUTEX>
+ ACE_Null_Mutex>
Timer_Heap_Iterator;
typedef ACE_Thread_Timer_Queue_Adapter<Timer_Heap>
Thread_Timer_Queue;