summaryrefslogtreecommitdiff
path: root/ACE/tests/Message_Queue_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/tests/Message_Queue_Test.cpp')
-rw-r--r--ACE/tests/Message_Queue_Test.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/ACE/tests/Message_Queue_Test.cpp b/ACE/tests/Message_Queue_Test.cpp
index 391d73f284a..0e3768ab837 100644
--- a/ACE/tests/Message_Queue_Test.cpp
+++ b/ACE/tests/Message_Queue_Test.cpp
@@ -41,9 +41,9 @@
const ACE_TCHAR usage[] = ACE_TEXT ("usage: Message_Queue_Test <number of messages>\n");
-typedef ACE_Message_Queue<ACE_NULL_SYNCH> QUEUE;
-typedef ACE_Message_Queue_Iterator<ACE_NULL_SYNCH> ITERATOR;
-typedef ACE_Message_Queue_Reverse_Iterator<ACE_NULL_SYNCH> REVERSE_ITERATOR;
+using QUEUE = ACE_Message_Queue<ACE_NULL_SYNCH>;
+using ITERATOR = ACE_Message_Queue_Iterator<ACE_NULL_SYNCH>;
+using REVERSE_ITERATOR = ACE_Message_Queue_Reverse_Iterator<ACE_NULL_SYNCH>;
#if defined (ACE_HAS_WINCE)
static const int MESSAGE_FACTOR = 10000;
@@ -60,7 +60,7 @@ static int max_messages = MAX_MESSAGES;
static ACE_High_Res_Timer *timer = 0;
#if defined (ACE_HAS_THREADS)
-typedef ACE_Message_Queue<ACE_MT_SYNCH> SYNCH_QUEUE;
+using SYNCH_QUEUE = ACE_Message_Queue<ACE_MT_SYNCH>;
struct Queue_Wrapper
{
@@ -77,7 +77,7 @@ struct Queue_Wrapper
ACE_Message_Block **send_block_;
// Pointer to messages blocks for sender to send to reciever.
- Queue_Wrapper (void)
+ Queue_Wrapper ()
: q_ (0), send_block_ (0)
{
}
@@ -91,7 +91,7 @@ class Counting_Test_Producer : public ACE_Task<ACE_MT_SYNCH>
public:
Counting_Test_Producer (ACE_Message_Queue<ACE_MT_SYNCH> *queue)
: ACE_Task<ACE_MT_SYNCH> (0, queue), sequence_ (0), produced_ (0) {}
- virtual int svc (void);
+ int svc () override;
ACE_Atomic_Op<ACE_Thread_Mutex, long> sequence_;
ACE_Atomic_Op<ACE_Thread_Mutex, long> produced_;
@@ -102,13 +102,13 @@ class Counting_Test_Consumer : public ACE_Task<ACE_MT_SYNCH>
public:
Counting_Test_Consumer (ACE_Message_Queue<ACE_MT_SYNCH> *queue)
: ACE_Task<ACE_MT_SYNCH> (0, queue), consumed_ (0) {}
- virtual int svc (void);
+ int svc () override;
ACE_Atomic_Op<ACE_Thread_Mutex, long> consumed_;
};
int
-Counting_Test_Producer::svc (void)
+Counting_Test_Producer::svc ()
{
// Going to produce a lot of blocks. Since we don't necessarily want them
// all consumed, there's no arrangement with the consumer to be sure that
@@ -200,7 +200,7 @@ Counting_Test_Producer::svc (void)
}
int
-Counting_Test_Consumer::svc (void)
+Counting_Test_Consumer::svc ()
{
// Consume lots of blocks and release them. To mimic a thread with work
// to do, put a small random delay between dequeuing the blocks. Consume
@@ -252,7 +252,7 @@ Counting_Test_Consumer::svc (void)
}
static int
-counting_test (void)
+counting_test ()
{
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Starting counting test\n")));
@@ -314,7 +314,7 @@ counting_test (void)
#endif /* ACE_HAS_THREADS */
static int
-iterator_test (void)
+iterator_test ()
{
const int ITERATIONS = 5;
ACE_TCHAR buffer[ITERATIONS][BUFSIZ];
@@ -407,7 +407,7 @@ iterator_test (void)
#if defined (ACE_HAS_THREADS)
static int
-chained_block_test (void)
+chained_block_test ()
{
QUEUE q;
@@ -768,7 +768,7 @@ performance_test (int queue_type = 0)
// Ensure that the timedout dequeue_head() sets errno code properly.
static int
-timeout_test (void)
+timeout_test ()
{
SYNCH_QUEUE mq;
int status = 0;
@@ -814,7 +814,7 @@ timeout_test (void)
// thorough check...
static int
-prio_test (void)
+prio_test ()
{
const char S1[] = "first";
const char S2[] = "second";
@@ -848,7 +848,7 @@ prio_test (void)
}
static int
-close_test (void)
+close_test ()
{
int status = 0;