summaryrefslogtreecommitdiff
path: root/performance-tests
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-07-26 19:19:16 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-07-26 19:19:16 +0000
commit80abed9f7102d2a6c6722338b91d5219062df9e9 (patch)
tree3a3434ce8bcd5609835f45564bbc247145368ed3 /performance-tests
parent15bc210e1a411ac93b0d2a41e0b898ba16583e05 (diff)
downloadATCD-80abed9f7102d2a6c6722338b91d5219062df9e9.tar.gz
*** empty log message ***
Diffstat (limited to 'performance-tests')
-rw-r--r--performance-tests/Misc/context_switch_time.cpp20
-rw-r--r--performance-tests/Synch-Benchmarks/Benchmark.cpp2
-rw-r--r--performance-tests/Synch-Benchmarks/Options.cpp2
-rw-r--r--performance-tests/Synch-Benchmarks/pipe_thr_test.cpp4
-rw-r--r--performance-tests/Synch-Benchmarks/synch_driver.cpp18
5 files changed, 23 insertions, 23 deletions
diff --git a/performance-tests/Misc/context_switch_time.cpp b/performance-tests/Misc/context_switch_time.cpp
index efb5da67bb3..68b40f0efce 100644
--- a/performance-tests/Misc/context_switch_time.cpp
+++ b/performance-tests/Misc/context_switch_time.cpp
@@ -119,7 +119,7 @@ private:
inline
Low_Priority_Null_Task::Low_Priority_Null_Task() :
- ACE_Task<ACE_MT_SYNCH> (ACE_Service_Config::thr_mgr ()),
+ ACE_Task<ACE_MT_SYNCH> (ACE_Thread_Manager::instance ()),
initialized_ (0), // initialize to locked, then unlock when ready
blocked_semaphore_ (0)
{
@@ -145,7 +145,7 @@ Low_Priority_Null_Task::svc ()
ACE_DEBUG ((LM_DEBUG, "Low_Priority_Null_Task::svc (), entering"));
#endif /* DEBUG */
- ACE_Service_Config::thr_mgr ()->thr_self (thread_id_);
+ ACE_Thread_Manager::instance ()->thr_self (thread_id_);
initialized_.release ();
#if DEBUG > 0
@@ -222,7 +222,7 @@ Suspend_Resume_Test::svc ()
{
#if DEBUG > 0
ACE_hthread_t thread_id;
- ACE_Service_Config::thr_mgr ()->thr_self (thread_id);
+ ACE_Thread_Manager::instance ()->thr_self (thread_id);
ACE_DEBUG ((LM_DEBUG, "Suspend_Resume_Test::svc (), thread ID is %d\n",
thread_id));
@@ -299,7 +299,7 @@ private:
inline
High_Priority_Simple_Task::High_Priority_Simple_Task() :
- ACE_Task<ACE_MT_SYNCH> (ACE_Service_Config::thr_mgr ()),
+ ACE_Task<ACE_MT_SYNCH> (ACE_Thread_Manager::instance ()),
initialized_ (0), // initialize to locked, then unlock when ready
terminate_ (0),
iterations_ (0)
@@ -326,7 +326,7 @@ High_Priority_Simple_Task::svc ()
ACE_DEBUG ((LM_DEBUG, "High_Priority_Simple_Task::svc (), entering"));
#endif /* DEBUG */
- ACE_Service_Config::thr_mgr ()->thr_self (thread_id_);
+ ACE_Thread_Manager::instance ()->thr_self (thread_id_);
initialized_.release ();
#if DEBUG > 0
@@ -421,7 +421,7 @@ Ping_Suspend_Resume_Test::svc ()
ACE_DEBUG ((LM_DEBUG, "Ping_Suspend_Resume_Test::svc (), entering"));
ACE_hthread_t thread_id;
- ACE_Service_Config::thr_mgr ()->thr_self (thread_id);
+ ACE_Thread_Manager::instance ()->thr_self (thread_id);
ACE_DEBUG ((LM_DEBUG, "; thread ID is %u\n", thread_id));
#endif /* DEBUG */
@@ -545,7 +545,7 @@ Yield_Test::svc ()
ACE_DEBUG ((LM_DEBUG, "Yield_Test::svc (), entering"));
ACE_hthread_t thread_id;
- ACE_Service_Config::thr_mgr ()->thr_self (thread_id);
+ ACE_Thread_Manager::instance ()->thr_self (thread_id);
int priority;
ACE_OS::thr_getprio (thread_id, priority);
@@ -688,12 +688,12 @@ main (int argc, char *argv [])
// run suspend/resume test first . . .
Suspend_Resume_Test suspend_resume_test (num_iterations);
// Wait for all tasks to exit.
- ACE_Service_Config::thr_mgr ()->wait ();
+ ACE_Thread_Manager::instance ()->wait ();
// then Ping Suspend/Resume test
Ping_Suspend_Resume_Test ping_suspend_resume_test (num_iterations);
// Wait for all tasks to exit.
- ACE_Service_Config::thr_mgr ()->wait ();
+ ACE_Thread_Manager::instance ()->wait ();
// NOTE: the divisions by 1ul below allow transparent support of
// ACE_U_LongLongs.
@@ -724,7 +724,7 @@ main (int argc, char *argv [])
// then Yield test
Yield_Test yield_test (num_iterations);
// Wait for all tasks to exit.
- ACE_Service_Config::thr_mgr ()->wait ();
+ ACE_Thread_Manager::instance ()->wait ();
ACE_DEBUG ((LM_INFO, "context switch time from yield test is %.3f "
"microseconds\n",
diff --git a/performance-tests/Synch-Benchmarks/Benchmark.cpp b/performance-tests/Synch-Benchmarks/Benchmark.cpp
index d8d4d916b8c..e95cf180bd0 100644
--- a/performance-tests/Synch-Benchmarks/Benchmark.cpp
+++ b/performance-tests/Synch-Benchmarks/Benchmark.cpp
@@ -63,7 +63,7 @@ Benchmark::fini (void)
void *
Benchmark::svc_run (Benchmark *bp)
{
- ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ());
+ ACE_Thread_Control tc (ACE_Thread_Manager::instance ());
return (void *) (bp->svc () == -1 ? -1 : 0);
}
diff --git a/performance-tests/Synch-Benchmarks/Options.cpp b/performance-tests/Synch-Benchmarks/Options.cpp
index 40060c016a3..9abbd4d48f8 100644
--- a/performance-tests/Synch-Benchmarks/Options.cpp
+++ b/performance-tests/Synch-Benchmarks/Options.cpp
@@ -395,7 +395,7 @@ Options::print_results (void)
#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION)
-#if defined (ACE_MT_SAFE)
+#if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
template class ACE_Atomic_Op<ACE_Thread_Mutex, size_t>;
#endif /* ACE_MT_SAFE */
#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */
diff --git a/performance-tests/Synch-Benchmarks/pipe_thr_test.cpp b/performance-tests/Synch-Benchmarks/pipe_thr_test.cpp
index c49fc72bf07..4e75ebfc0dd 100644
--- a/performance-tests/Synch-Benchmarks/pipe_thr_test.cpp
+++ b/performance-tests/Synch-Benchmarks/pipe_thr_test.cpp
@@ -22,7 +22,7 @@ private:
void *
Pipe_Thr_Test::reader (Pipe_Thr_Test *t)
{
- ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ());
+ ACE_Thread_Control tc (ACE_Thread_Manager::instance ());
ACE_HANDLE handle = t->pipe_handles[0];
int ni = t->thr_id ();
@@ -44,7 +44,7 @@ Pipe_Thr_Test::init (int, char **)
if (ACE_OS::pipe (this->pipe_handles) == -1)
ACE_OS::perror ("pipe"), ACE_OS::exit (1);
- if (ACE_Service_Config::thr_mgr ()->spawn
+ if (ACE_Thread_Manager::instance ()->spawn
(ACE_THR_FUNC (Pipe_Thr_Test::reader),
(void *) this, options.t_flags ()) == -1)
ACE_OS::perror ("thr_create"), ACE_OS::exit (1);
diff --git a/performance-tests/Synch-Benchmarks/synch_driver.cpp b/performance-tests/Synch-Benchmarks/synch_driver.cpp
index 738eb5acf6c..f921edb19fe 100644
--- a/performance-tests/Synch-Benchmarks/synch_driver.cpp
+++ b/performance-tests/Synch-Benchmarks/synch_driver.cpp
@@ -29,9 +29,9 @@ Benchmark_Test::Benchmark_Test (void)
: ACE_Service_Config (1), // Do not load default services
n_lwps_ (0),
orig_n_lwps_ (0),
- done_ (ACE_Sig_Handler_Ex (ACE_Service_Config::end_reactor_event_loop))
+ done_ (ACE_Sig_Handler_Ex (ACE_Reactor::end_event_loop))
{
- ACE_Service_Config::reactor ()->register_handler (SIGINT, &this->done_);
+ ACE_Reactor::instance ()->register_handler (SIGINT, &this->done_);
}
void
@@ -41,7 +41,7 @@ Benchmark_Test::run_test (void)
Benchmark::done (0);
// Allow thread(s) to make progress.
- ACE_Service_Config::thr_mgr ()->resume_all ();
+ ACE_Thread_Manager::instance ()->resume_all ();
ACE_Time_Value timeout (options.sleep_time ());
@@ -49,13 +49,13 @@ Benchmark_Test::run_test (void)
options.start_timer ();
// Use Reactor as a timer (which can be interrupted by a signal).
- ACE_Service_Config::run_reactor_event_loop (timeout);
+ ACE_Reactor::run_event_loop (timeout);
options.stop_timer ();
ACE_DEBUG ((LM_DEBUG, "\nstopping timer\n"));
// Stop thread(s) from making any further progress.
- ACE_Service_Config::thr_mgr ()->suspend_all ();
+ ACE_Thread_Manager::instance ()->suspend_all ();
// Tell the threads that we are finished.
Benchmark::done (1);
@@ -77,10 +77,10 @@ Benchmark_Test::run_test (void)
options.print_results ();
// Allow thread(s) to finish up.
- ACE_Service_Config::thr_mgr ()->resume_all ();
+ ACE_Thread_Manager::instance ()->resume_all ();
// Wait for all the threads to exit.
- ACE_Service_Config::thr_mgr ()->wait ();
+ ACE_Thread_Manager::instance ()->wait ();
options.init ();
}
@@ -97,7 +97,7 @@ Benchmark_Test::init (int argc, char **argv)
if (this->open (argv[0]) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "ACE_Service_Config::open failed\n%a", 1), -1);
- ACE_Service_Repository_Iterator sri (*this->ACE_Service_Config::svc_rep ());
+ ACE_Service_Repository_Iterator sri (*ACE_Service_Repository::instance ());
// Iteratively execute each service loaded in from the svc.conf
// file.
@@ -123,7 +123,7 @@ Benchmark_Test::init (int argc, char **argv)
// We should probably use a "barrier" here rather than
// THR_SUSPENDED since many OS platforms lack the ability to
// create suspended threads...
- if (ACE_Service_Config::thr_mgr ()->spawn_n
+ if (ACE_Thread_Manager::instance ()->spawn_n
(options.thr_count (), ACE_THR_FUNC (bp->svc_run),
(void *) bp, options.t_flags () | THR_SUSPENDED) == -1)
ACE_ERROR ((LM_ERROR, "%p\n%a", "couldn't spawn threads", 1));