summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-06-13 04:13:23 +0000
committerkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-06-13 04:13:23 +0000
commit19597977fba8f4ff18c3e4b1291d13625dc006fd (patch)
treea41ef5f6c2460dd9e61c9b4c218eb27763902df2 /examples
parent83f40359de642fa9656be1f34aabfe6167e68c07 (diff)
downloadATCD-19597977fba8f4ff18c3e4b1291d13625dc006fd.tar.gz
ChangeLogTag: Tue Jun 12 23:06:36 2001 Krishnakumar B <kitty@cs.wustl.edu>
Diffstat (limited to 'examples')
-rw-r--r--examples/ASX/Event_Server/Event_Server/Options.cpp18
-rw-r--r--examples/ASX/Message_Queue/buffer_stream.cpp2
-rw-r--r--examples/ASX/UPIPE_Event_Server/Options.cpp12
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp4
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp3
-rw-r--r--examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp3
-rw-r--r--examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i3
-rw-r--r--examples/Shared_Malloc/test_malloc.cpp4
-rw-r--r--examples/Shared_Malloc/test_position_independent_malloc.cpp3
-rw-r--r--examples/Threads/thread_manager.cpp2
-rw-r--r--examples/Threads/thread_specific.cpp3
11 files changed, 31 insertions, 26 deletions
diff --git a/examples/ASX/Event_Server/Event_Server/Options.cpp b/examples/ASX/Event_Server/Event_Server/Options.cpp
index 63b2c1d0e0d..3f180fe0b5d 100644
--- a/examples/ASX/Event_Server/Event_Server/Options.cpp
+++ b/examples/ASX/Event_Server/Event_Server/Options.cpp
@@ -63,7 +63,7 @@ void Options::print_results (void)
"%8d = messages sent\n"
"%8d = messages received\n"
"%8d = signals received\n"
- "%8ds, %dms = wait-cpu (latency) time\n"
+ "%8ds, %dms = wait-cpu (latency) time\n"
"%8ds, %dms = user lock wait sleep time\n"
"%8ds, %dms = all other sleep time\n"
"%8d = voluntary context switches\n"
@@ -161,8 +161,8 @@ Options::parse_args (int argc, char *argv[])
"\t[-H high water mark]\n"
"\t[-i number of test iterations]\n"
"\t[-L low water mark]\n"
- "\t[-M] message size \n"
- "\t[-n] (THR_NEW_LWP)\n"
+ "\t[-M] message size \n"
+ "\t[-n] (THR_NEW_LWP)\n"
"\t[-q max queue size]\n"
"\t[-s supplier port]\n"
"\t[-t number of threads]\n"
@@ -175,12 +175,12 @@ Options::parse_args (int argc, char *argv[])
if (this->verbose ())
ACE_OS::printf ("%8d = initial concurrency hint\n"
- "%8d = total iterations\n"
- "%8d = thread count\n"
- "%8d = low water mark\n"
- "%8d = high water mark\n"
- "%8d = message_size\n"
- "%8d = initial queue length\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = total iterations\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = thread count\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = low water mark\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = high water mark\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = message_size\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = initial queue length\n"
"%8d = THR_BOUND\n"
"%8d = THR_NEW_LWP\n",
ACE_Thread::getconcurrency (),
diff --git a/examples/ASX/Message_Queue/buffer_stream.cpp b/examples/ASX/Message_Queue/buffer_stream.cpp
index 02911c02a46..80681b44fb8 100644
--- a/examples/ASX/Message_Queue/buffer_stream.cpp
+++ b/examples/ASX/Message_Queue/buffer_stream.cpp
@@ -240,7 +240,7 @@ Filter::put (ACE_Message_Block *mb,
// Prepend the line count in front of the buffer.
ACE_OS::sprintf (mb->rd_ptr (),
- "%d: %s",
+ ACE_SIZE_T_FORMAT_SPECIFIER": %s",
this->count_++,
buf);
return this->put_next (mb, tv);
diff --git a/examples/ASX/UPIPE_Event_Server/Options.cpp b/examples/ASX/UPIPE_Event_Server/Options.cpp
index 59fff50a0f9..f497db4fd29 100644
--- a/examples/ASX/UPIPE_Event_Server/Options.cpp
+++ b/examples/ASX/UPIPE_Event_Server/Options.cpp
@@ -172,12 +172,12 @@ Options::parse_args (int argc, char *argv[])
if (this->verbose ())
ACE_OS::printf ("%8d = initial concurrency hint\n"
- "%8d = total iterations\n"
- "%8d = thread count\n"
- "%8d = low water mark\n"
- "%8d = high water mark\n"
- "%8d = message_size\n"
- "%8d = initial queue length\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = total iterations\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = thread count\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = low water mark\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = high water mark\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = message_size\n"
+ ACE_SIZE_T_FORMAT_SPECIFIER " = initial queue length\n"
"%8d = THR_BOUND\n"
"%8d = THR_NEW_LWP\n",
ACE_OS::thr_getconcurrency (),
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
index 793be03cf7c..c1d1ba99187 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp
@@ -273,7 +273,7 @@ Options::oneway_client_test (void *)
cli_stream.close ();
delete [] request;
- return (void *) result;
+ return ACE_reinterpret_cast (void *, result);
}
// Static function entry point to the twoway client service.
@@ -364,7 +364,7 @@ Options::twoway_client_test (void *)
cli_stream.close ();
delete [] request;
- return (void *) result;
+ return ACE_reinterpret_cast (void *, result);
}
ACE_THR_FUNC
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp
index 9871273c7ea..80e0f9961b8 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp
@@ -23,7 +23,8 @@ run_server (ACE_THR_FUNC server,
// Spawn a new thread and run the new connection in that thread of
// control using the <server> function as the entry point.
if (ACE_Thread_Manager::instance ()->spawn (server,
- (void *) handle,
+ ACE_reinterpret_cast(void *,
+ handle),
THR_DETACHED) == -1)
ACE_ERROR ((LM_ERROR,
"(%P|%t) %p\n",
diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp
index fc79d149fe9..34c156d37b6 100644
--- a/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp
+++ b/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp
@@ -129,7 +129,8 @@ run_event_loop (const char rendezvous[])
#if defined (ACE_HAS_THREADS)
if (ACE_Thread_Manager::instance ()->spawn ((ACE_THR_FUNC) server,
- (void *) new_stream.get_handle (),
+ ACE_reinterpret_cast (void *,
+ new_stream.get_handle ()),
THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) %p\n",
diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
index 2a9b8b0f6db..be6ea286a9a 100644
--- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
+++ b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i
@@ -48,7 +48,8 @@ Handle_Timeout::init (int argc, char *argv[])
}
if (ACE_Reactor::instance ()->schedule_timer (this,
- (void *) arg,
+ ACE_reinterpret_cast (void *,
+ arg),
delta,
interval) == -1)
return -1;
diff --git a/examples/Shared_Malloc/test_malloc.cpp b/examples/Shared_Malloc/test_malloc.cpp
index cf1dfaa71d7..8ede38848d1 100644
--- a/examples/Shared_Malloc/test_malloc.cpp
+++ b/examples/Shared_Malloc/test_malloc.cpp
@@ -113,10 +113,10 @@ spawn (void)
char msg_size[20];
ACE_OS::sprintf (iterations,
- "%d",
+ ACE_SIZE_T_FORMAT_SPECIFIER,
Options::instance ()->iteration_count ());
ACE_OS::sprintf (msg_size,
- "%d",
+ ACE_SIZE_T_FORMAT_SPECIFIER,
Options::instance ()->max_msg_size ());
const char *cp = 0;
diff --git a/examples/Shared_Malloc/test_position_independent_malloc.cpp b/examples/Shared_Malloc/test_position_independent_malloc.cpp
index 476d082af2f..3203b700601 100644
--- a/examples/Shared_Malloc/test_position_independent_malloc.cpp
+++ b/examples/Shared_Malloc/test_position_independent_malloc.cpp
@@ -128,7 +128,8 @@ parse_args (int argc, char *argv[])
{
case 'a':
// Override the default base address.
- base_addr = (void *) ACE_OS::atoi (get_opt.optarg);
+ base_addr = ACE_reinterpret_cast (void *,
+ ACE_OS::atoi (get_opt.optarg));
break;
case 'T':
ACE_Trace::start_tracing ();
diff --git a/examples/Threads/thread_manager.cpp b/examples/Threads/thread_manager.cpp
index 1bea4d676a3..704cf88753b 100644
--- a/examples/Threads/thread_manager.cpp
+++ b/examples/Threads/thread_manager.cpp
@@ -63,7 +63,7 @@ main (int argc, char *argv[])
ACE_Thread_Manager *thr_mgr = ACE_Thread_Manager::instance ();
int grp_id = thr_mgr->spawn_n (n_threads, ACE_THR_FUNC (worker),
- (void *) n_iterations,
+ ACE_reinterpret_cast (void *, n_iterations),
THR_NEW_LWP | THR_DETACHED);
// Wait for 1 second and then suspend every thread in the group.
diff --git a/examples/Threads/thread_specific.cpp b/examples/Threads/thread_specific.cpp
index 401e9a27332..bf21d0a9e41 100644
--- a/examples/Threads/thread_specific.cpp
+++ b/examples/Threads/thread_specific.cpp
@@ -200,7 +200,8 @@ main (int argc, char *argv[])
#if defined (ACE_HAS_THREADS)
if (ACE_Thread_Manager::instance ()->spawn_n (threads,
ACE_THR_FUNC (&worker),
- (void *) count,
+ ACE_reinterpret_cast(void *,
+ count),
THR_BOUND | THR_DETACHED) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",