diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-11-19 01:04:45 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-11-19 01:04:45 +0000 |
commit | 3f5d92d259b4e2c4f9bc0e7f8c13d162cfeea786 (patch) | |
tree | 901de92cabfbbf37e24a598b61a12377719405ee /tests | |
parent | 16d93002bf5208ce8642a2a095815b184503fbad (diff) | |
download | ATCD-3f5d92d259b4e2c4f9bc0e7f8c13d162cfeea786.tar.gz |
Small changes for NT
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Mutex_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Priority_Buffer_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Reader_Writer_Test.cpp | 8 | ||||
-rw-r--r-- | tests/Thread_Pool_Test.cpp | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/tests/Mutex_Test.cpp b/tests/Mutex_Test.cpp index 6885778aad6..ae39e71a6de 100644 --- a/tests/Mutex_Test.cpp +++ b/tests/Mutex_Test.cpp @@ -20,6 +20,7 @@ #include "ace/Synch.h" #include "ace/Log_Msg.h" +#include "ace/Thread_Manager.h" #include "test_config.h" static void @@ -57,6 +58,7 @@ spawn (void) test (); } #elif defined (ACE_HAS_THREADS) + ACE_Thread_Manager thr_mgr; if (thr_mgr.spawn (ACE_THR_FUNC (test), (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) diff --git a/tests/Priority_Buffer_Test.cpp b/tests/Priority_Buffer_Test.cpp index 857b57d8aff..a4e1e3128cd 100644 --- a/tests/Priority_Buffer_Test.cpp +++ b/tests/Priority_Buffer_Test.cpp @@ -40,7 +40,7 @@ static const long max_queue = LONG_MAX; static void * consumer (ACE_Message_Queue<ACE_MT_SYNCH> *msg_queue) { - int cur_priority = 27; + u_long cur_priority = 27; int local_count = 0; // Keep looping, reading a message out of the queue, until we diff --git a/tests/Reader_Writer_Test.cpp b/tests/Reader_Writer_Test.cpp index cfc420bbbbf..a5a52430103 100644 --- a/tests/Reader_Writer_Test.cpp +++ b/tests/Reader_Writer_Test.cpp @@ -98,7 +98,7 @@ reader (void *) ACE_DEBUG ((LM_DEBUG, "(%t) reader starting\n")); - for (int iterations = 1; iterations <= n_iterations; iterations++) + for (size_t iterations = 1; iterations <= n_iterations; iterations++) { ACE_Read_Guard<ACE_RW_Mutex> g(rw_mutex); int n = ++current_readers; @@ -109,7 +109,7 @@ reader (void *) int data = shared_data; - for (int loop = 1; loop <= n_loops; loop++) + for (size_t loop = 1; loop <= n_loops; loop++) { ACE_Thread::yield(); if (shared_data != data) @@ -137,7 +137,7 @@ writer (void *) ACE_DEBUG ((LM_DEBUG, "(%t) writer starting\n")); - for (int iterations = 1; iterations <= n_iterations; iterations++) + for (size_t iterations = 1; iterations <= n_iterations; iterations++) { ACE_Write_Guard<ACE_RW_Mutex> g(rw_mutex); @@ -153,7 +153,7 @@ writer (void *) int self = (int) ACE_Thread::self (); shared_data = self; - for (int loop = 1; loop <= n_loops; loop++) + for (size_t loop = 1; loop <= n_loops; loop++) { ACE_Thread::yield(); if (shared_data != self) diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp index 437c7d8daea..f603c6fff57 100644 --- a/tests/Thread_Pool_Test.cpp +++ b/tests/Thread_Pool_Test.cpp @@ -138,7 +138,7 @@ produce (Thread_Pool &thread_pool) "(%t) press chars and enter to put a new message into task queue...")); n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); #else // Automatically generate messages. - static int count = 0; + static size_t count = 0; ACE_OS::sprintf (mb->rd_ptr (), "%d\n", count); |