summaryrefslogtreecommitdiff
path: root/ACE/examples/ASX
diff options
context:
space:
mode:
authorAbdullah Sowayan <sowayan@users.noreply.github.com>2007-07-20 03:27:14 +0000
committerAbdullah Sowayan <sowayan@users.noreply.github.com>2007-07-20 03:27:14 +0000
commitc787659dd3606b324935b2035c214ec7a9f8acd9 (patch)
tree9a9b0af5cdb16c5498b1b73eb66f48660d7985c1 /ACE/examples/ASX
parent0106f913211a8112436fe7b1c7c477ffcffd0967 (diff)
downloadATCD-c787659dd3606b324935b2035c214ec7a9f8acd9.tar.gz
Fri Jul 20 03:22:02 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com>
Diffstat (limited to 'ACE/examples/ASX')
-rw-r--r--ACE/examples/ASX/CCM_App/CCM_App.cpp3
-rw-r--r--ACE/examples/ASX/Event_Server/Event_Server/Options.cpp204
-rw-r--r--ACE/examples/ASX/Message_Queue/buffer_stream.cpp31
-rw-r--r--ACE/examples/ASX/UPIPE_Event_Server/Options.cpp242
-rw-r--r--ACE/examples/ASX/UPIPE_Event_Server/event_server.cpp2
5 files changed, 246 insertions, 236 deletions
diff --git a/ACE/examples/ASX/CCM_App/CCM_App.cpp b/ACE/examples/ASX/CCM_App/CCM_App.cpp
index ac72730edb7..540dd545d90 100644
--- a/ACE/examples/ASX/CCM_App/CCM_App.cpp
+++ b/ACE/examples/ASX/CCM_App/CCM_App.cpp
@@ -16,8 +16,11 @@ typedef ACE_Module<ACE_SYNCH> MT_Module;
class ACE_Svc_Export Test_Task : public MT_Task
{
public:
+ //FUZZ: disable check_for_lack_ACE_OS
virtual int open (void *);
virtual int close (u_long);
+ //FUZZ: enable check_for_lack_ACE_OS
+
virtual int init (int, ACE_TCHAR *[]);
virtual int fini (void);
virtual int suspend (void);
diff --git a/ACE/examples/ASX/Event_Server/Event_Server/Options.cpp b/ACE/examples/ASX/Event_Server/Event_Server/Options.cpp
index 6ef846f2f31..3304c86ac6b 100644
--- a/ACE/examples/ASX/Event_Server/Event_Server/Options.cpp
+++ b/ACE/examples/ASX/Event_Server/Event_Server/Options.cpp
@@ -58,124 +58,126 @@ void Options::print_results (void)
ACE_OS::printf ("final concurrency hint = %d\n", ACE_Thread::getconcurrency ());
ACE_OS::printf ("%8d = lwpid\n"
- "%8d = lwp count\n"
- "%8d = minor page faults\n"
- "%8d = major page faults\n"
- "%8d = input blocks\n"
- "%8d = output blocks\n"
- "%8d = messages sent\n"
- "%8d = messages received\n"
- "%8d = signals received\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"
- "%8d = involuntary context switches\n"
- "%8d = system calls\n"
- "%8d = chars read/written\n",
- (int) rusage.pr_lwpid,
- (int) rusage.pr_count,
- (int) rusage.pr_minf,
- (int) rusage.pr_majf,
- (int) rusage.pr_inblk,
- (int) rusage.pr_oublk,
- (int) rusage.pr_msnd,
- (int) rusage.pr_mrcv,
- (int) rusage.pr_sigs,
- (int) rusage.pr_wtime.tv_sec, (int) rusage.pr_wtime.tv_nsec / 1000000,
- (int) rusage.pr_ltime.tv_sec, (int) rusage.pr_ltime.tv_nsec / 1000000,
- (int) rusage.pr_slptime.tv_sec, (int) rusage.pr_slptime.tv_nsec / 1000000,
- (int) rusage.pr_vctx,
- (int) rusage.pr_ictx,
- (int) rusage.pr_sysc,
- (int) rusage.pr_ioch);
+ "%8d = lwp count\n"
+ "%8d = minor page faults\n"
+ "%8d = major page faults\n"
+ "%8d = input blocks\n"
+ "%8d = output blocks\n"
+ "%8d = messages sent\n"
+ "%8d = messages received\n"
+ "%8d = signals received\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"
+ "%8d = involuntary context switches\n"
+ "%8d = system calls\n"
+ "%8d = chars read/written\n",
+ (int) rusage.pr_lwpid,
+ (int) rusage.pr_count,
+ (int) rusage.pr_minf,
+ (int) rusage.pr_majf,
+ (int) rusage.pr_inblk,
+ (int) rusage.pr_oublk,
+ (int) rusage.pr_msnd,
+ (int) rusage.pr_mrcv,
+ (int) rusage.pr_sigs,
+ (int) rusage.pr_wtime.tv_sec, (int) rusage.pr_wtime.tv_nsec / 1000000,
+ (int) rusage.pr_ltime.tv_sec, (int) rusage.pr_ltime.tv_nsec / 1000000,
+ (int) rusage.pr_slptime.tv_sec, (int) rusage.pr_slptime.tv_nsec / 1000000,
+ (int) rusage.pr_vctx,
+ (int) rusage.pr_ictx,
+ (int) rusage.pr_sysc,
+ (int) rusage.pr_ioch);
#else
/* Someone needs to write the corresponding dump for rusage... */
#endif /* ACE_HAS_PRUSAGE_T */
}
ACE_OS::printf ("---------------------\n"
- "real time = %.3f\n"
- "user time = %.3f\n"
- "system time = %.3f\n"
- "---------------------\n",
- et.real_time, et.user_time, et.system_time);
+ "real time = %.3f\n"
+ "user time = %.3f\n"
+ "system time = %.3f\n"
+ "---------------------\n",
+ et.real_time, et.user_time, et.system_time);
#endif /* ACE_WIN32 */
}
void
Options::parse_args (int argc, ACE_TCHAR *argv[])
{
+ //FUZZ: disable check_for_lack_ACE_OS
ACE_LOG_MSG->open (argv[0]);
ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("c:bdH:i:L:l:M:ns:t:T:v"));
int c;
while ((c = get_opt ()) != EOF)
+ //FUZZ: enable check_for_lack_ACE_OS
switch (c)
{
case 'b':
- this->t_flags (THR_BOUND);
- break;
+ this->t_flags (THR_BOUND);
+ break;
case 'c':
- this->consumer_port (ACE_OS::atoi (get_opt.opt_arg ()));
- break;
+ this->consumer_port (ACE_OS::atoi (get_opt.opt_arg ()));
+ break;
case 'd':
- this->debugging_ = 1;
- break;
+ this->debugging_ = 1;
+ break;
case 'H':
- this->high_water_mark (ACE_OS::atoi (get_opt.opt_arg ()));
- break;
+ this->high_water_mark (ACE_OS::atoi (get_opt.opt_arg ()));
+ break;
case 'i':
- this->iterations (ACE_OS::atoi (get_opt.opt_arg ()));
- break;
+ this->iterations (ACE_OS::atoi (get_opt.opt_arg ()));
+ break;
case 'L':
- this->low_water_mark (ACE_OS::atoi (get_opt.opt_arg ()));
- break;
+ this->low_water_mark (ACE_OS::atoi (get_opt.opt_arg ()));
+ break;
case 'l':
- this->initial_queue_length (ACE_OS::atoi (get_opt.opt_arg ()));
- break;
+ this->initial_queue_length (ACE_OS::atoi (get_opt.opt_arg ()));
+ break;
case 'M':
- this->message_size (ACE_OS::atoi (get_opt.opt_arg ()));
- break;
+ this->message_size (ACE_OS::atoi (get_opt.opt_arg ()));
+ break;
case 'n':
- this->t_flags (THR_NEW_LWP);
- break;
+ this->t_flags (THR_NEW_LWP);
+ break;
case 's':
- this->supplier_port (ACE_OS::atoi (get_opt.opt_arg ()));
- break;
+ this->supplier_port (ACE_OS::atoi (get_opt.opt_arg ()));
+ break;
case 'T':
-#if defined (ACE_HAS_TRACE)
- if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_TEXT ("ON")) == 0)
- ACE_Trace::start_tracing ();
- else if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_TEXT ("OFF")) == 0)
- ACE_Trace::stop_tracing ();
-#endif /* ACE_HAS_TRACE */
- break;
+ #if defined (ACE_HAS_TRACE)
+ if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_TEXT ("ON")) == 0)
+ ACE_Trace::start_tracing ();
+ else if (ACE_OS::strcasecmp (get_opt.opt_arg (), ACE_TEXT ("OFF")) == 0)
+ ACE_Trace::stop_tracing ();
+ #endif /* ACE_HAS_TRACE */
+ break;
case 't':
- this->thr_count (ACE_OS::atoi (get_opt.opt_arg ()));
- break;
+ this->thr_count (ACE_OS::atoi (get_opt.opt_arg ()));
+ break;
case 'v':
- this->verbosity_ = 1;
- break;
+ this->verbosity_ = 1;
+ break;
default:
- ::fprintf (stderr, "%s\n"
- "\t[-b] (THR_BOUND)\n"
- "\t[-c consumer port]\n"
- "\t[-d] (enable debugging)\n"
- "\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[-q max queue size]\n"
- "\t[-s supplier port]\n"
- "\t[-t number of threads]\n"
- "\t[-v] (verbose) \n",
- ACE_TEXT_ALWAYS_CHAR (argv[0]));
- ::exit (1);
- /* NOTREACHED */
- break;
+ ACE_OS::fprintf (stderr, "%s\n"
+ "\t[-b] (THR_BOUND)\n"
+ "\t[-c consumer port]\n"
+ "\t[-d] (enable debugging)\n"
+ "\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[-q max queue size]\n"
+ "\t[-s supplier port]\n"
+ "\t[-t number of threads]\n"
+ "\t[-v] (verbose) \n",
+ ACE_TEXT_ALWAYS_CHAR (argv[0]));
+ ACE_OS::exit (1);
+ /* NOTREACHED */
+ break;
}
// This is a major hack to get the size_t format spec to be a narrow
@@ -186,21 +188,21 @@ Options::parse_args (int argc, ACE_TCHAR *argv[])
#define ACE_LIB_TEXT(A) A
if (this->verbose ())
ACE_OS::printf ("%8d = initial concurrency hint\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 (),
- this->iterations (),
- this->thr_count (),
- this->low_water_mark (),
- this->high_water_mark (),
- this->message_size (),
- this->initial_queue_length (),
- (this->t_flags () & THR_BOUND) != 0,
- (this->t_flags () & THR_NEW_LWP) != 0);
+ 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 (),
+ this->iterations (),
+ this->thr_count (),
+ this->low_water_mark (),
+ this->high_water_mark (),
+ this->message_size (),
+ this->initial_queue_length (),
+ (this->t_flags () & THR_BOUND) != 0,
+ (this->t_flags () & THR_NEW_LWP) != 0);
}
diff --git a/ACE/examples/ASX/Message_Queue/buffer_stream.cpp b/ACE/examples/ASX/Message_Queue/buffer_stream.cpp
index 1cac4975dd4..12f2a0303a1 100644
--- a/ACE/examples/ASX/Message_Queue/buffer_stream.cpp
+++ b/ACE/examples/ASX/Message_Queue/buffer_stream.cpp
@@ -32,9 +32,12 @@ class Common_Task : public MT_Task
{
public:
Common_Task (void) {}
+
+ //FUZZ: disable check_for_lack_ACE_OS
// ACE_Task hooks
virtual int open (void * = 0);
virtual int close (u_long = 0);
+ //FUZZ: enable check_for_lack_ACE_OS
};
// Define the Producer interface.
@@ -145,22 +148,22 @@ Producer::svc (void)
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%t) %p\n"),
ACE_TEXT ("put_next")));
- break;
+ break;
}
// Send the message to the other thread.
else
- {
- mb->wr_ptr (n);
- // NUL-terminate the string (since we use strlen() on it
- // later).
+ {
+ mb->wr_ptr (n);
+ // NUL-terminate the string (since we use strlen() on it
+ // later).
mb->rd_ptr ()[n] = '\0';
- if (this->put_next (mb) == -1)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%t) %p\n"),
- ACE_TEXT ("put_next")));
- }
+ if (this->put_next (mb) == -1)
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%t) %p\n"),
+ ACE_TEXT ("put_next")));
+ }
}
return 0;
@@ -210,14 +213,14 @@ Consumer::svc (void)
mb->release ();
if (length == 0)
- break;
+ break;
}
if (result == -1 && errno == EWOULDBLOCK)
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%t) %p\n%a"),
- ACE_TEXT ("timed out waiting for message"),
- 1));
+ ACE_TEXT ("(%t) %p\n%a"),
+ ACE_TEXT ("timed out waiting for message"),
+ 1));
return 0;
}
diff --git a/ACE/examples/ASX/UPIPE_Event_Server/Options.cpp b/ACE/examples/ASX/UPIPE_Event_Server/Options.cpp
index ca2cbbca887..c445d1174aa 100644
--- a/ACE/examples/ASX/UPIPE_Event_Server/Options.cpp
+++ b/ACE/examples/ASX/UPIPE_Event_Server/Options.cpp
@@ -15,19 +15,19 @@ ACE_RCSID(UPIPE_Event_Server, Options, "$Id$")
#if defined (ACE_HAS_THREADS)
Options::Options (void)
- : thr_count_ (4),
- t_flags_ (THR_DETACHED),
- high_water_mark_ (8 * 1024),
- low_water_mark_ (1024),
- message_size_ (128),
- initial_queue_length_ (0),
- iterations_ (100000),
- debugging_ (0),
- verbosity_ (0),
- consumer_port_ (ACE_TEXT ("-p 10000")),
- supplier_port_ (ACE_TEXT ("-p 10001")),
- consumer_file_ (ACE_TEXT ("-f/tmp/conupipe")),
- supplier_file_ (ACE_TEXT ("-f/tmp/supupipe"))
+ : thr_count_ (4),
+ t_flags_ (THR_DETACHED),
+ high_water_mark_ (8 * 1024),
+ low_water_mark_ (1024),
+ message_size_ (128),
+ initial_queue_length_ (0),
+ iterations_ (100000),
+ debugging_ (0),
+ verbosity_ (0),
+ consumer_port_ (ACE_TEXT ("-p 10000")),
+ supplier_port_ (ACE_TEXT ("-p 10001")),
+ consumer_file_ (ACE_TEXT ("-f/tmp/conupipe")),
+ supplier_file_ (ACE_TEXT ("-f/tmp/supupipe"))
{
}
@@ -48,46 +48,46 @@ void Options::print_results (void)
{
ACE_OS::printf ("final concurrency hint = %d\n", ACE_OS::thr_getconcurrency ());
ACE_OS::printf ("%8d = lwpid\n"
- "%8d = lwp count\n"
- "%8d = minor page faults\n"
- "%8d = major page faults\n"
- "%8d = input blocks\n"
- "%8d = output blocks\n"
- "%8d = messages sent\n"
- "%8d = messages received\n"
- "%8d = signals received\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"
- "%8d = involuntary context switches\n"
- "%8d = system calls\n"
- "%8d = chars read/written\n",
- (int) rusage.pr_lwpid,
- (int) rusage.pr_count,
- (int) rusage.pr_minf,
- (int) rusage.pr_majf,
- (int) rusage.pr_inblk,
- (int) rusage.pr_oublk,
- (int) rusage.pr_msnd,
- (int) rusage.pr_mrcv,
- (int) rusage.pr_sigs,
- (int) rusage.pr_wtime.tv_sec, (int) rusage.pr_wtime.tv_nsec / 1000000,
- (int) rusage.pr_ltime.tv_sec, (int) rusage.pr_ltime.tv_nsec / 1000000,
- (int) rusage.pr_slptime.tv_sec, (int) rusage.pr_slptime.tv_nsec / 1000000,
- (int) rusage.pr_vctx,
- (int) rusage.pr_ictx,
- (int) rusage.pr_sysc,
- (int) rusage.pr_ioch);
+ "%8d = lwp count\n"
+ "%8d = minor page faults\n"
+ "%8d = major page faults\n"
+ "%8d = input blocks\n"
+ "%8d = output blocks\n"
+ "%8d = messages sent\n"
+ "%8d = messages received\n"
+ "%8d = signals received\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"
+ "%8d = involuntary context switches\n"
+ "%8d = system calls\n"
+ "%8d = chars read/written\n",
+ (int) rusage.pr_lwpid,
+ (int) rusage.pr_count,
+ (int) rusage.pr_minf,
+ (int) rusage.pr_majf,
+ (int) rusage.pr_inblk,
+ (int) rusage.pr_oublk,
+ (int) rusage.pr_msnd,
+ (int) rusage.pr_mrcv,
+ (int) rusage.pr_sigs,
+ (int) rusage.pr_wtime.tv_sec, (int) rusage.pr_wtime.tv_nsec / 1000000,
+ (int) rusage.pr_ltime.tv_sec, (int) rusage.pr_ltime.tv_nsec / 1000000,
+ (int) rusage.pr_slptime.tv_sec, (int) rusage.pr_slptime.tv_nsec / 1000000,
+ (int) rusage.pr_vctx,
+ (int) rusage.pr_ictx,
+ (int) rusage.pr_sysc,
+ (int) rusage.pr_ioch);
}
#endif /* ACE_HAS_PRUSAGE_T */
ACE_OS::printf ("---------------------\n"
- "real time = %.3f\n"
- "user time = %.3f\n"
- "system time = %.3f\n"
- "---------------------\n",
- et.real_time, et.user_time, et.system_time);
+ "real time = %.3f\n"
+ "user time = %.3f\n"
+ "system time = %.3f\n"
+ "---------------------\n",
+ et.real_time, et.user_time, et.system_time);
}
// Manages the options.
@@ -98,82 +98,84 @@ Options::parse_args (int argc, ACE_TCHAR *argv[])
{
ACE_LOG_MSG->open (argv[0]);
+ //FUZZ: disable check_for_lack_ACE_OS
ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("C:c:bdH:i:L:l:M:nS:s:t:T:v"));
int c;
while ((c = getopt ()) != -1)
+ //FUZZ: enable check_for_lack_ACE_OS
switch (c)
{
case 'b':
- this->t_flags (THR_BOUND);
- break;
+ this->t_flags (THR_BOUND);
+ break;
case 'C':
- this->consumer_file (getopt.opt_arg ());
- break;
+ this->consumer_file (getopt.opt_arg ());
+ break;
case 'c':
- this->consumer_port (getopt.opt_arg ());
- break;
+ this->consumer_port (getopt.opt_arg ());
+ break;
case 'd':
- this->debugging_ = 1;
- break;
+ this->debugging_ = 1;
+ break;
case 'H':
- this->high_water_mark (ACE_OS::atoi (getopt.opt_arg ()));
- break;
+ this->high_water_mark (ACE_OS::atoi (getopt.opt_arg ()));
+ break;
case 'i':
- this->iterations (ACE_OS::atoi (getopt.opt_arg ()));
- break;
+ this->iterations (ACE_OS::atoi (getopt.opt_arg ()));
+ break;
case 'L':
- this->low_water_mark (ACE_OS::atoi (getopt.opt_arg ()));
- break;
+ this->low_water_mark (ACE_OS::atoi (getopt.opt_arg ()));
+ break;
case 'l':
- this->initial_queue_length (ACE_OS::atoi (getopt.opt_arg ()));
- break;
+ this->initial_queue_length (ACE_OS::atoi (getopt.opt_arg ()));
+ break;
case 'M':
- this->message_size (ACE_OS::atoi (getopt.opt_arg ()));
- break;
+ this->message_size (ACE_OS::atoi (getopt.opt_arg ()));
+ break;
case 'n':
- this->t_flags (THR_NEW_LWP);
- break;
+ this->t_flags (THR_NEW_LWP);
+ break;
case 'S':
- this->supplier_file (getopt.opt_arg ());
- break;
+ this->supplier_file (getopt.opt_arg ());
+ break;
case 's':
- this->supplier_port (getopt.opt_arg ());
- break;
+ this->supplier_port (getopt.opt_arg ());
+ break;
case 'T':
-#if defined (ACE_HAS_TRACE)
- if (ACE_OS::strcasecmp (getopt.opt_arg (), ACE_TEXT ("ON")) == 0)
- ACE_Trace::start_tracing ();
- else if (ACE_OS::strcasecmp (getopt.opt_arg (), ACE_TEXT ("OFF")) == 0)
- ACE_Trace::stop_tracing ();
-#endif /* ACE_HAS_TRACE */
- break;
+ #if defined (ACE_HAS_TRACE)
+ if (ACE_OS::strcasecmp (getopt.opt_arg (), ACE_TEXT ("ON")) == 0)
+ ACE_Trace::start_tracing ();
+ else if (ACE_OS::strcasecmp (getopt.opt_arg (), ACE_TEXT ("OFF")) == 0)
+ ACE_Trace::stop_tracing ();
+ #endif /* ACE_HAS_TRACE */
+ break;
case 't':
- this->thr_count (ACE_OS::atoi (getopt.opt_arg ()));
- break;
+ this->thr_count (ACE_OS::atoi (getopt.opt_arg ()));
+ break;
case 'v':
- this->verbosity_ = 1;
- break;
+ this->verbosity_ = 1;
+ break;
default:
- ::fprintf (stderr, "%s\n"
- "\t[-b] (THR_BOUND)\n"
- "\t[-C consumer file]\n"
- "\t[-c consumer port]\n"
- "\t[-d] (enable debugging)\n"
- "\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[-q max queue size]\n"
- "\t[-S supplier file]\n"
- "\t[-s supplier port]\n"
- "\t[-t number of threads]\n"
- "\t[-v] (verbose) \n",
- ACE_TEXT_ALWAYS_CHAR (argv[0]));
- ::exit (1);
- /* NOTREACHED */
- break;
+ ACE_OS::fprintf (stderr, "%s\n"
+ "\t[-b] (THR_BOUND)\n"
+ "\t[-C consumer file]\n"
+ "\t[-c consumer port]\n"
+ "\t[-d] (enable debugging)\n"
+ "\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[-q max queue size]\n"
+ "\t[-S supplier file]\n"
+ "\t[-s supplier port]\n"
+ "\t[-t number of threads]\n"
+ "\t[-v] (verbose) \n",
+ ACE_TEXT_ALWAYS_CHAR (argv[0]));
+ ACE_OS::exit (1);
+ /* NOTREACHED */
+ break;
}
// HACK! This needs to be done to avoid the mismatch from ACE_LIB_TEXT
@@ -185,23 +187,23 @@ Options::parse_args (int argc, ACE_TCHAR *argv[])
# define ACE_LIB_TEXT(X) X
if (this->verbose ())
ACE_OS::printf ("%8d = initial concurrency hint\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 (),
- this->iterations (),
- this->thr_count (),
- this->low_water_mark (),
- this->high_water_mark (),
- this->message_size (),
- this->initial_queue_length (),
- (this->t_flags () & THR_BOUND) != 0,
- (this->t_flags () & THR_NEW_LWP) != 0);
+ 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 (),
+ this->iterations (),
+ this->thr_count (),
+ this->low_water_mark (),
+ this->high_water_mark (),
+ this->message_size (),
+ this->initial_queue_length (),
+ (this->t_flags () & THR_BOUND) != 0,
+ (this->t_flags () & THR_NEW_LWP) != 0);
}
#endif /* ACE_HAS_THREADS */
diff --git a/ACE/examples/ASX/UPIPE_Event_Server/event_server.cpp b/ACE/examples/ASX/UPIPE_Event_Server/event_server.cpp
index f4dcd8fad69..91ae382fac1 100644
--- a/ACE/examples/ASX/UPIPE_Event_Server/event_server.cpp
+++ b/ACE/examples/ASX/UPIPE_Event_Server/event_server.cpp
@@ -149,7 +149,7 @@ supplier (void *dummy)
while (n < iter)
{
mb_p = new ACE_Message_Block (msiz);
- strcpy (mb_p->rd_ptr (), (char *) dummy);
+ ACE_OS::strcpy (mb_p->rd_ptr (), (char *) dummy);
mb_p->length (msiz);
if (verb)
cout << "supplier sending 1 message_block" << endl;