diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-25 21:44:04 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-25 21:44:04 +0000 |
commit | 2fa1b9cb3c0cd8a4a1b9fc03d03764af6ddd7477 (patch) | |
tree | a6171ec90033bb7ccc80d44601a09c52c513b6da /tests | |
parent | 8a0f78acda236012a4e982887f18af2d23cec5e8 (diff) | |
download | ATCD-2fa1b9cb3c0cd8a4a1b9fc03d03764af6ddd7477.tar.gz |
*** empty log message ***
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Barrier_Test.cpp | 12 | ||||
-rw-r--r-- | tests/Buffer_Stream_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Conn_Test.cpp | 12 | ||||
-rw-r--r-- | tests/IOStream_Test.cpp | 10 | ||||
-rw-r--r-- | tests/Message_Block_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Mutex_Test.cpp | 8 | ||||
-rw-r--r-- | tests/Priority_Buffer_Test.cpp | 6 | ||||
-rw-r--r-- | tests/Priority_Task_Test.cpp | 4 | ||||
-rw-r--r-- | tests/Process_Strategy_Test.cpp | 28 | ||||
-rw-r--r-- | tests/Reactor_Exceptions_Test.cpp | 14 | ||||
-rw-r--r-- | tests/Reactor_Notify_Test.cpp | 14 | ||||
-rw-r--r-- | tests/Reactors_Test.cpp | 14 | ||||
-rw-r--r-- | tests/Reader_Writer_Test.cpp | 10 | ||||
-rw-r--r-- | tests/Recursive_Mutex_Test.cpp | 6 | ||||
-rw-r--r-- | tests/SOCK_Test.cpp | 10 | ||||
-rw-r--r-- | tests/Service_Config_Test.cpp | 2 | ||||
-rw-r--r-- | tests/TSS_Test.cpp | 10 | ||||
-rw-r--r-- | tests/Task_Test.cpp | 4 | ||||
-rw-r--r-- | tests/Thread_Manager_Test.cpp | 6 | ||||
-rw-r--r-- | tests/Thread_Pool_Test.cpp | 2 | ||||
-rw-r--r-- | tests/Tokens_Test.cpp | 4 |
21 files changed, 90 insertions, 90 deletions
diff --git a/tests/Barrier_Test.cpp b/tests/Barrier_Test.cpp index be44b998f84..bcf95de12db 100644 --- a/tests/Barrier_Test.cpp +++ b/tests/Barrier_Test.cpp @@ -26,12 +26,12 @@ #if defined (ACE_HAS_THREADS) struct Tester_Args - // = TITLE - // These arguments are passed into each test thread. +// = TITLE +// These arguments are passed into each test thread. { Tester_Args (ACE_Barrier &tb, int i) : tester_barrier_ (tb), - n_iterations_ (i) {} + n_iterations_ (i) {} ACE_Barrier &tester_barrier_; // Reference to the tester barrier. This controls each miteration of @@ -47,7 +47,7 @@ struct Tester_Args static void * tester (Tester_Args *args) { - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); // Insert thread into thread_manager + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); // Insert thread into thread_manager ACE_NEW_THREAD; for (int iterations = 1; @@ -78,13 +78,13 @@ main (int, char *[]) Tester_Args args (tester_barrier, n_iterations); - if (ACE_Service_Config::thr_mgr ()->spawn_n + if (ACE_Thread_Manager::instance ()->spawn_n (n_threads, ACE_THR_FUNC (tester), (void *) &args, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); #endif /* ACE_HAS_THREADS */ diff --git a/tests/Buffer_Stream_Test.cpp b/tests/Buffer_Stream_Test.cpp index 3fa17c72ea1..254c3e38bf7 100644 --- a/tests/Buffer_Stream_Test.cpp +++ b/tests/Buffer_Stream_Test.cpp @@ -222,7 +222,7 @@ main (int, char *[]) // Barrier synchronization: wait for the threads to exit, then exit // ourselves. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); #endif /* ACE_HAS_THREADS */ diff --git a/tests/Conn_Test.cpp b/tests/Conn_Test.cpp index fb59d32659b..e073aba4b57 100644 --- a/tests/Conn_Test.cpp +++ b/tests/Conn_Test.cpp @@ -354,7 +354,7 @@ client (void *arg) { #if (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) // Insert thread into thr_mgr - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control thread_control (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; #endif /* (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) */ @@ -390,7 +390,7 @@ server (void *arg) { #if (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) // Insert thread into thr_mgr - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control thread_control (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; #endif /* (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) */ @@ -467,23 +467,23 @@ main (int, char *[]) /* NOTREACHED */ } #elif defined (ACE_HAS_THREADS) - if (ACE_Service_Config::thr_mgr ()->spawn + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), (void *) &acceptor, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed")); - if (ACE_Service_Config::thr_mgr ()->spawn + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed")); // Wait for the threads to exit. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, - "(%P|%t) only one thread may be run in a process on this platform\n%a", 1)); + "(%P|%t) only one thread may be run in a process on this platform\n%a", 1)); #endif /* ACE_HAS_THREADS */ } diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp index 899c1fecf6e..a3f6f71279b 100644 --- a/tests/IOStream_Test.cpp +++ b/tests/IOStream_Test.cpp @@ -155,7 +155,7 @@ client (void *arg = 0) ACE_UNUSED_ARG (arg); #if defined (ACE_HAS_THREADS) - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control thread_control (ACE_Thread_Manager::instance ()); #endif /* ACE_HAS_THREADS */ ACE_SOCK_IOStream server; @@ -247,9 +247,9 @@ server (void *arg = 0) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "get_local_addr"), 0); #if defined (ACE_HAS_THREADS) - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control thread_control (ACE_Thread_Manager::instance ()); - if (ACE_Service_Config::thr_mgr ()->spawn (ACE_THR_FUNC (client), + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -335,7 +335,7 @@ spawn (void) if (acceptor.open ((const ACE_INET_Addr &) ACE_Addr::sap_any) == -1) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "open"), -1); #if defined (ACE_HAS_THREADS) - else if (ACE_Service_Config::thr_mgr ()->spawn (ACE_THR_FUNC (server), + else if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), &acceptor, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -343,7 +343,7 @@ spawn (void) -1); // Wait for the client and server thread to exit. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #elif !defined (ACE_LACKS_EXEC) switch (ACE_OS::fork ("child")) diff --git a/tests/Message_Block_Test.cpp b/tests/Message_Block_Test.cpp index 196ba610a7c..c393a72cf65 100644 --- a/tests/Message_Block_Test.cpp +++ b/tests/Message_Block_Test.cpp @@ -293,7 +293,7 @@ main (int, char *[]) ACE_DEBUG ((LM_DEBUG, "(%t) waiting for worker tasks to finish...\n")); - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); ptime.stop (); ptime.elapsed_time (alloc_struct[i].et_); diff --git a/tests/Mutex_Test.cpp b/tests/Mutex_Test.cpp index dc8332df51b..0c7880cbf83 100644 --- a/tests/Mutex_Test.cpp +++ b/tests/Mutex_Test.cpp @@ -28,7 +28,7 @@ test (void *args) { ACE_Process_Mutex *pm = (ACE_Process_Mutex *) args; #if (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; #endif /* (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) */ @@ -83,18 +83,18 @@ spawn (void) #elif defined (ACE_HAS_THREADS) ACE_Process_Mutex pm (ACE_WIDE_STRING (name)); - if (ACE_Service_Config::thr_mgr ()->spawn (ACE_THR_FUNC (test), + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (test), (void *) &pm, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, "%p\n%a", "thread create failed")); - if (ACE_Service_Config::thr_mgr ()->spawn (ACE_THR_FUNC (test), + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (test), (void *) &pm, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, "%p\n%a", "thread create failed")); // Wait for the threads to exit. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, diff --git a/tests/Priority_Buffer_Test.cpp b/tests/Priority_Buffer_Test.cpp index 7fe6d7cd33a..50bf7cb1e2e 100644 --- a/tests/Priority_Buffer_Test.cpp +++ b/tests/Priority_Buffer_Test.cpp @@ -89,7 +89,7 @@ producer (void *args) ACE_Message_Queue<ACE_MT_SYNCH> *msg_queue = (ACE_Message_Queue<ACE_MT_SYNCH> *) args; // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control thread_control (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; ACE_Message_Block *mb = 0; @@ -143,13 +143,13 @@ main (int, char *[]) // Message queue. ACE_Message_Queue<ACE_MT_SYNCH> msg_queue (max_queue); - if (ACE_Service_Config::thr_mgr ()->spawn (ACE_THR_FUNC (producer), + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (producer), (void *) &msg_queue, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); // Wait for producer and consumer threads to exit. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); #endif /* ACE_HAS_THREADS */ diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp index e7d6f4fb2b0..8361cda9f4b 100644 --- a/tests/Priority_Task_Test.cpp +++ b/tests/Priority_Task_Test.cpp @@ -37,7 +37,7 @@ private: }; Priority_Task::Priority_Task (void) - : ACE_Task<ACE_MT_SYNCH> (ACE_Service_Config::thr_mgr ()), +: ACE_Task<ACE_MT_SYNCH> (ACE_Thread_Manager::instance ()), priority_ (0) { } @@ -133,7 +133,7 @@ main (int, char *[]) ACE_MAX_ITERATIONS)); // Wait for all tasks to exit. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); diff --git a/tests/Process_Strategy_Test.cpp b/tests/Process_Strategy_Test.cpp index 706cb8de5c3..b1719ddbcbd 100644 --- a/tests/Process_Strategy_Test.cpp +++ b/tests/Process_Strategy_Test.cpp @@ -228,7 +228,7 @@ Options::parse_args (int argc, char *argv[]) #if !defined (ACE_LACKS_EXEC) ACE_NEW_RETURN (this->concurrency_strategy_, ACE_Process_Strategy<Counting_Service> - (1, this, ACE_Service_Config::reactor ()), + (1, this, ACE_Reactor::instance()), -1); break; #else @@ -238,7 +238,7 @@ Options::parse_args (int argc, char *argv[]) #if defined (ACE_HAS_THREADS) ACE_NEW_RETURN (this->concurrency_strategy_, ACE_Thread_Strategy<Counting_Service> - (ACE_Service_Config::thr_mgr (), + (ACE_Thread_Manager::instance (), THR_NEW_LWP, 1), -1); break; @@ -249,17 +249,17 @@ Options::parse_args (int argc, char *argv[]) // Settle for the purely Reactive strategy. ACE_NEW_RETURN (this->concurrency_strategy_, ACE_Reactive_Strategy<Counting_Service> - (ACE_Service_Config::reactor ()), + (ACE_Reactor::instance()), -1); break; } #if !defined (ACE_WIN32) && !defined (VXWORKS) // Register to handle <SIGCHLD> when a child exits. - if (ACE_Service_Config::reactor ()->register_handler (SIGCHLD, this) == -1) + if (ACE_Reactor::instance()->register_handler (SIGCHLD, this) == -1) return -1; #endif /* !defined (ACE_WIN32) && !defined (VXWORKS) */ - if (ACE_Service_Config::reactor ()->register_handler (SIGINT, this) == -1) + if (ACE_Reactor::instance()->register_handler (SIGINT, this) == -1) return -1; return 0; } @@ -293,7 +293,7 @@ Options::handle_signal (int signum, siginfo_t *, ucontext_t *) break; case SIGINT: - ACE_Service_Config::end_reactor_event_loop (); + ACE_Reactor::end_event_loop(); break; } @@ -453,7 +453,7 @@ client (void *arg) { #if (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) // Insert thread into thr_mgr - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control thread_control (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; #endif /* (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) */ @@ -540,7 +540,7 @@ server (void *) { #if (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) // Insert thread into thr_mgr - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control thread_control (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; #endif /* (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) */ @@ -548,8 +548,8 @@ server (void *) // Run the main event loop, but only wait for up to 3 seconds (this // is used to shutdown the server. - ACE_Service_Config::reactor ()->owner (ACE_Thread::self ()); - ACE_Service_Config::run_reactor_event_loop (timeout); + ACE_Reactor::instance()->owner (ACE_Thread::self ()); + ACE_Reactor::run_event_loop(timeout); // Remove the filename. ACE_OS::unlink (OPTIONS::instance ()->filename ()); @@ -573,7 +573,7 @@ main (int argc, char *argv[]) // Bind acceptor to any port and then find out what the port was. if (acceptor.open ((const ACE_INET_Addr &) ACE_Addr::sap_any, - ACE_Service_Config::reactor (), + ACE_Reactor::instance(), 0, 0, OPTIONS::instance ()->concurrency_strategy ()) == -1 @@ -606,20 +606,20 @@ main (int argc, char *argv[]) /* NOTREACHED */ } #elif defined (ACE_HAS_THREADS) - if (ACE_Service_Config::thr_mgr ()->spawn + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), (void *) 0, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed")); - if (ACE_Service_Config::thr_mgr ()->spawn + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed")); // Wait for the threads to exit. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, "(%P|%t) only one thread may be run in a process on this platform\n%a", 1)); diff --git a/tests/Reactor_Exceptions_Test.cpp b/tests/Reactor_Exceptions_Test.cpp index bf15fe7fab9..768de96b7d0 100644 --- a/tests/Reactor_Exceptions_Test.cpp +++ b/tests/Reactor_Exceptions_Test.cpp @@ -95,12 +95,12 @@ static int worker (void) { ACE_NEW_THREAD; - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); - ACE_Service_Config::reactor ()->owner (ACE_OS::thr_self()); + ACE_Reactor::instance()->owner (ACE_OS::thr_self()); for (;;) - if (ACE_Service_Config::reactor ()->handle_events () == -1) + if (ACE_Reactor::instance()->handle_events () == -1) ACE_ERROR_RETURN ((LM_ERROR, "(%t) error return\n"), -1); return 0; @@ -118,9 +118,9 @@ main (int argc, char *argv[]) u_short port = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT; ACE_DEBUG ((LM_DEBUG, "Starting tracing\n")); ACE_LOG_MSG->start_tracing (); - // ACE_Service_Config::reactor (new My_Reactor); - ACE_Service_Config::reactor (&reactor); - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); + // ACE_Reactor::instance(new My_Reactor); + ACE_Reactor::instance (&reactor); + ACE_Thread_Manager *thr_mgr = ACE_Thread_Manager::instance (); ACE_INET_Addr local_addr (port); ACE_INET_Addr remote_addr (port, @@ -128,7 +128,7 @@ main (int argc, char *argv[]) MemoryEx ex (local_addr); - if (ACE_Service_Config::reactor ()->register_handler + if (ACE_Reactor::instance()->register_handler (&ex, ACE_Event_Handler::READ_MASK) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n%a", "register_handler", 1), -1); diff --git a/tests/Reactor_Notify_Test.cpp b/tests/Reactor_Notify_Test.cpp index 9519015ca38..e43b503741a 100644 --- a/tests/Reactor_Notify_Test.cpp +++ b/tests/Reactor_Notify_Test.cpp @@ -75,7 +75,7 @@ Supplier_Task::open (void *) else if (this->activate (THR_BOUND)) // Make this an Active Object. ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "activate failed"), -1); - else if (ACE_Service_Config::reactor ()->register_handler + else if (ACE_Reactor::instance()->register_handler (this->pipe_.write_handle (), this, ACE_Event_Handler::WRITE_MASK) == -1) ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "register_handler failed"), -1); else @@ -87,7 +87,7 @@ Supplier_Task::close (u_long) { ACE_DEBUG ((LM_DEBUG, "(%t) Supplier_Task::close\n")); - if (ACE_Service_Config::reactor ()->remove_handler + if (ACE_Reactor::instance()->remove_handler (this->pipe_.write_handle (), ACE_Event_Handler::WRITE_MASK) == -1) ACE_ERROR ((LM_ERROR, "(%t) %p\n", "remove_handler failed")); return 0; @@ -109,13 +109,13 @@ Supplier_Task::svc (void) // Allow an unlimited number of iterations per // <ACE_Reactor::notify>. - ACE_Service_Config::reactor ()->max_notify_iterations (-1); + ACE_Reactor::instance()->max_notify_iterations (-1); for (i = 0; i < ACE_MAX_ITERATIONS; i++) { ACE_DEBUG ((LM_DEBUG, "(%t) notifying reactor\n")); // Notify the Reactor. - if (ACE_Service_Config::reactor ()->notify (this) == -1) + if (ACE_Reactor::instance()->notify (this) == -1) ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "notify"), -1); // Wait for our <handle_exception> method to release the @@ -127,13 +127,13 @@ Supplier_Task::svc (void) ACE_DEBUG ((LM_DEBUG, "(%t) **** starting limited notifications test\n")); // Only allow 1 iteration per <ACE_Reactor::notify> - ACE_Service_Config::reactor ()->max_notify_iterations (1); + ACE_Reactor::instance()->max_notify_iterations (1); for (i = 0; i < ACE_MAX_ITERATIONS; i++) { ACE_DEBUG ((LM_DEBUG, "(%t) notifying reactor\n")); // Notify the Reactor. - if (ACE_Service_Config::reactor ()->notify (this) == -1) + if (ACE_Reactor::instance()->notify (this) == -1) ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "notify"), -1); // Wait for our <handle_exception> method to release the @@ -188,7 +188,7 @@ main (int, char *[]) for (int iteration = 1; !shutdown; iteration++) { // Use a timeout to inform the Reactor when to shutdown. - switch (ACE_Service_Config::reactor ()->handle_events (timeout)) + switch (ACE_Reactor::instance()->handle_events (timeout)) { case -1: ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "reactor"), -1); diff --git a/tests/Reactors_Test.cpp b/tests/Reactors_Test.cpp index a37f533d283..021777446b1 100644 --- a/tests/Reactors_Test.cpp +++ b/tests/Reactors_Test.cpp @@ -145,7 +145,7 @@ worker (void *args) { ACE_NEW_THREAD; - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); ACE_Reactor *reactor = (ACE_Reactor *) args; @@ -193,24 +193,24 @@ main (int, char *[]) for (int i = 0; i < MAX_TASKS; i++) { - tt1[i].open (ACE_Service_Config::reactor ()); + tt1[i].open (ACE_Reactor::instance()); tt2[i].open (reactor); } - if (ACE_Service_Config::thr_mgr ()->spawn - (ACE_THR_FUNC (worker), (void *) ACE_Service_Config::reactor (), + if (ACE_Thread_Manager::instance ()->spawn + (ACE_THR_FUNC (worker), (void *) ACE_Reactor::instance(), THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), -1); - else if (ACE_Service_Config::thr_mgr ()->spawn + else if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (worker), (void *) reactor, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), -1); - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); reactor->close (); // Note that the destructor of ACE_Service_Config daemon will close - // down the ACE_Service_Config::reactor(). + // down the ACE_Reactor::instance(). #else ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); #endif /* ACE_HAS_THREADS */ diff --git a/tests/Reader_Writer_Test.cpp b/tests/Reader_Writer_Test.cpp index 4469cb31c81..dab76084aad 100644 --- a/tests/Reader_Writer_Test.cpp +++ b/tests/Reader_Writer_Test.cpp @@ -88,7 +88,7 @@ parse_args (int argc, char *argv[]) static void * reader (void *) { - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; ACE_DEBUG ((LM_DEBUG, " (%t) reader starting\n")); @@ -128,7 +128,7 @@ reader (void *) static void * writer (void *) { - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; ACE_DEBUG ((LM_DEBUG, " (%t) writer starting\n")); @@ -184,18 +184,18 @@ int main (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, " (%t) main thread starting\n")); - if (ACE_Service_Config::thr_mgr ()->spawn_n (n_readers, + if (ACE_Thread_Manager::instance ()->spawn_n (n_readers, ACE_THR_FUNC (reader), 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); - else if (ACE_Service_Config::thr_mgr ()->spawn_n (n_writers, + else if (ACE_Thread_Manager::instance ()->spawn_n (n_writers, ACE_THR_FUNC (writer), 0, THR_NEW_LWP) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); ACE_DEBUG ((LM_DEBUG, " (%t) exiting main thread\n")); #else diff --git a/tests/Recursive_Mutex_Test.cpp b/tests/Recursive_Mutex_Test.cpp index 14975dc3c99..71647d8dc26 100644 --- a/tests/Recursive_Mutex_Test.cpp +++ b/tests/Recursive_Mutex_Test.cpp @@ -53,7 +53,7 @@ recursive_worker (size_t nesting_level, static void * worker (void *arg) { - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; ACE_Recursive_Thread_Mutex *rm = (ACE_Recursive_Thread_Mutex *) arg; @@ -70,10 +70,10 @@ main (int, char *[]) #if defined (ACE_HAS_THREADS) ACE_Recursive_Thread_Mutex rm; - ACE_Service_Config::thr_mgr ()->spawn_n (n_threads, + ACE_Thread_Manager::instance ()->spawn_n (n_threads, ACE_THR_FUNC (worker), (void *) &rm); - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, "ACE doesn't support support process mutexes on this platform (yet)\n")); diff --git a/tests/SOCK_Test.cpp b/tests/SOCK_Test.cpp index 1d6ace4aac5..17262fc995d 100644 --- a/tests/SOCK_Test.cpp +++ b/tests/SOCK_Test.cpp @@ -33,7 +33,7 @@ client (void *arg) { #if (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) // Insert thread into thr_mgr - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control thread_control (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; #endif /* (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) */ @@ -97,7 +97,7 @@ server (void *arg) { #if (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) // Insert thread into thr_mgr - ACE_Thread_Control thread_control (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control thread_control (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; #endif /* (defined (ACE_WIN32) || defined (VXWORKS)) && defined (ACE_HAS_THREADS) */ @@ -233,16 +233,16 @@ spawn (void) ACE_OS::wait (); } #elif defined (ACE_HAS_THREADS) - if (ACE_Service_Config::thr_mgr ()->spawn + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (server), (void *) &peer_acceptor, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed")); - if (ACE_Service_Config::thr_mgr ()->spawn + if (ACE_Thread_Manager::instance ()->spawn (ACE_THR_FUNC (client), (void *) &server_addr, THR_NEW_LWP | THR_DETACHED) == -1) ACE_ERROR ((LM_ERROR, "(%P|%t) %p\n%a", "thread create failed")); // Wait for the threads to exit. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, "(%P|%t) only one thread may be run in a process on this platform\n%a", 1)); #endif /* ACE_HAS_THREADS */ diff --git a/tests/Service_Config_Test.cpp b/tests/Service_Config_Test.cpp index f86f1bbdf03..fd70532998a 100644 --- a/tests/Service_Config_Test.cpp +++ b/tests/Service_Config_Test.cpp @@ -30,7 +30,7 @@ run_test (int argc, char *argv[]) ACE_Time_Value tv (argc > 1 ? atoi (argv[1]) : 2); - ACE_ASSERT (daemon.run_reactor_event_loop (tv) == 0); + ACE_ASSERT (ACE_Reactor::run_event_loop (tv) == 0); } int diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp index 674abed94bc..8e540ee58ee 100644 --- a/tests/TSS_Test.cpp +++ b/tests/TSS_Test.cpp @@ -61,7 +61,7 @@ cleanup (void *ptr) static void * worker (void *c) { - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; int count = int (c); @@ -150,7 +150,7 @@ extern "C" void handler (int signum) { ACE_DEBUG ((LM_DEBUG, "signal = %S\n", signum)); - ACE_Service_Config::thr_mgr ()->exit (0); + ACE_Thread_Manager::instance ()->exit (0); } #if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) @@ -165,19 +165,19 @@ main (int, char *[]) ACE_START_TEST ("TSS_Test"); #if defined (ACE_HAS_THREADS) - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); // Register a signal handler. ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); ACE_UNUSED_ARG (sa); - if (ACE_Service_Config::thr_mgr ()->spawn_n (ACE_MAX_THREADS, + if (ACE_Thread_Manager::instance ()->spawn_n (ACE_MAX_THREADS, ACE_THR_FUNC (&worker), (void *) ITERATIONS, THR_BOUND | THR_DETACHED) == -1) ACE_OS::perror ("ACE_Thread_Manager::spawn_n"); - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, "threads are not supported on this platform\n")); diff --git a/tests/Task_Test.cpp b/tests/Task_Test.cpp index 27c4d1bd98e..19cf2b40038 100644 --- a/tests/Task_Test.cpp +++ b/tests/Task_Test.cpp @@ -94,12 +94,12 @@ main (int, char *[]) int n_threads = ACE_MAX_THREADS; int n_iterations = ACE_MAX_ITERATIONS; - Barrier_Task barrier_task (ACE_Service_Config::thr_mgr (), + Barrier_Task barrier_task (ACE_Thread_Manager::instance (), n_threads, n_iterations); // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); #else ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); #endif /* ACE_HAS_THREADS */ diff --git a/tests/Thread_Manager_Test.cpp b/tests/Thread_Manager_Test.cpp index ff7993c675b..58211f14039 100644 --- a/tests/Thread_Manager_Test.cpp +++ b/tests/Thread_Manager_Test.cpp @@ -35,14 +35,14 @@ handler (int signum) static void * worker (int iterations) { - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; for (int i = 0; i < iterations; i++) { if ((i % 1000) == 0) { - if (ACE_Service_Config::thr_mgr ()->testcancel (ACE_Thread::self ()) != 0) + if (ACE_Thread_Manager::instance ()->testcancel (ACE_Thread::self ()) != 0) { ACE_DEBUG ((LM_DEBUG, "(%t) has been cancelled before iteration %d!\n", @@ -76,7 +76,7 @@ main (int, char *[]) int n_threads = DEFAULT_THREADS; int n_iterations = DEFAULT_ITERATIONS; - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); + 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, diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp index 4ef1b9391bd..36c81d09d23 100644 --- a/tests/Thread_Pool_Test.cpp +++ b/tests/Thread_Pool_Test.cpp @@ -225,7 +225,7 @@ main (int, char *[]) ACE_DEBUG ((LM_DEBUG, "(%t) waiting for worker tasks to finish...\n")); - ACE_Service_Config::thr_mgr ()->wait (); + ACE_Thread_Manager::instance ()->wait (); ACE_ASSERT (thread_pool.msg_queue ()->is_empty ()); ACE_DEBUG ((LM_DEBUG, "(%t) destroying worker tasks and exiting...\n")); diff --git a/tests/Tokens_Test.cpp b/tests/Tokens_Test.cpp index 4ef25f69d06..691be54a620 100644 --- a/tests/Tokens_Test.cpp +++ b/tests/Tokens_Test.cpp @@ -55,7 +55,7 @@ public: static void * run_thread (void *vp) { - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + ACE_Thread_Control tc (ACE_Thread_Manager::instance ()); ACE_NEW_THREAD; Test_Params *tp = (Test_Params *) vp; ACE_Token_Collection collection (1, tp->collection_name_); @@ -145,7 +145,7 @@ run_test (ACE_Token_Proxy *A, tp3.token2_ = R; // Spawn off three threads. - ACE_Thread_Manager *mgr = ACE_Service_Config::thr_mgr (); + ACE_Thread_Manager *mgr = ACE_Thread_Manager::instance (); if (mgr->spawn (ACE_THR_FUNC (run_thread), (void *) &tp1, THR_BOUND | THR_SUSPENDED) == -1) |