diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-11-27 06:09:30 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-11-27 06:09:30 +0000 |
commit | 202b4d050bf2a57c3bf6473a8c5cf8afd65ed5f7 (patch) | |
tree | 073713b4441888c543375a9fbbb82c210d9a29f6 | |
parent | 60141053a72c0f2f9db1a8075b368ae69c752ab3 (diff) | |
download | ATCD-202b4d050bf2a57c3bf6473a8c5cf8afd65ed5f7.tar.gz |
foo
-rw-r--r-- | netsvcs/clients/Naming/Client/Client_Test.cpp | 1 | ||||
-rw-r--r-- | tests/CPP_Test.cpp | 7 | ||||
-rw-r--r-- | tests/Reactor_Timer_Test.cpp | 8 | ||||
-rw-r--r-- | tests/SV_Shared_Memory_Test.cpp | 2 | ||||
-rw-r--r-- | tests/TSS_Test.cpp | 11 | ||||
-rw-r--r-- | tests/Thread_Manager_Test.cpp | 8 |
6 files changed, 17 insertions, 20 deletions
diff --git a/netsvcs/clients/Naming/Client/Client_Test.cpp b/netsvcs/clients/Naming/Client/Client_Test.cpp index 273df4271aa..221cfef137d 100644 --- a/netsvcs/clients/Naming/Client/Client_Test.cpp +++ b/netsvcs/clients/Naming/Client/Client_Test.cpp @@ -122,6 +122,7 @@ Client_Test::open (void) ACE_Service_Config::reactor (), ACE_Service_Config::thr_mgr ()) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_stdin_handler"), -1); + return 0; } diff --git a/tests/CPP_Test.cpp b/tests/CPP_Test.cpp index c69af637297..f07da15e976 100644 --- a/tests/CPP_Test.cpp +++ b/tests/CPP_Test.cpp @@ -1,6 +1,6 @@ -// ============================================================================ // $Id$ +// ============================================================================ // // = LIBRARY // tests @@ -127,7 +127,8 @@ server (void *) ACE_DEBUG ((LM_DEBUG, "starting server at port %d\n", server_addr.get_port_number ())); - // Keep these objects out here to prevent excessive constructor calls... + // Keep these objects out here to prevent excessive constructor + // calls... ACE_SOCK_Stream new_stream; ACE_INET_Addr cli_addr; ACE_Handle_Set handle_set; @@ -254,11 +255,9 @@ int main (int, char *argv[]) { ACE_START_TEST ("CPP_Test.cpp"); - ACE_DEBUG ((LM_DEBUG, "starting %s test at %u\n", argv[0], ACE_OS::time (0))); spawn (); ACE_END_TEST; return 0; } - diff --git a/tests/Reactor_Timer_Test.cpp b/tests/Reactor_Timer_Test.cpp index e8cd10449eb..945434e473d 100644 --- a/tests/Reactor_Timer_Test.cpp +++ b/tests/Reactor_Timer_Test.cpp @@ -1,6 +1,6 @@ -// ============================================================================ // $Id$ +// ============================================================================ // // = LIBRARY // tests @@ -28,7 +28,7 @@ static int done = 0; static int count = 0; static int odd = 0; -class Reactor_Timer : public ACE_Event_Handler +class Time_Handler : public ACE_Event_Handler { public: virtual int handle_timeout (const ACE_Time_Value &tv, @@ -52,11 +52,11 @@ public: int main (int, char *argv[]) { - ACE_START_TEST ("Reactor_Timer_Test.cpp"); + ACE_START_TEST ("Time_Handler_Test.cpp"); ACE_Reactor reactor; - Reactor_Timer rt[ACE_MAX_TIMERS]; + Time_Handler rt[ACE_MAX_TIMERS]; int t_id[ACE_MAX_TIMERS]; int i; diff --git a/tests/SV_Shared_Memory_Test.cpp b/tests/SV_Shared_Memory_Test.cpp index 262b4af2291..2b132132078 100644 --- a/tests/SV_Shared_Memory_Test.cpp +++ b/tests/SV_Shared_Memory_Test.cpp @@ -74,7 +74,7 @@ main (int, char *argv[]) switch (ACE_OS::fork ()) { case -1: - ACE_OS::perror (argv[0]), ACE_OS::exit (1); + ACE_ERROR ((LM_ERROR, "%p%a", "main", 1)); case 0: ACE_OS::sleep (1); client (); diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp index 46d7eebd55c..c1028bd9ee6 100644 --- a/tests/TSS_Test.cpp +++ b/tests/TSS_Test.cpp @@ -85,7 +85,7 @@ static ACE_Null_Mutex cout_lock; typedef ACE_Guard<ACE_Null_Mutex> GUARD; #endif /* ACE_HAS_THREADS */ -static void +extern "C" void cleanup (void *ptr) { ACE_DEBUG ((LM_DEBUG, "(%t) in cleanup, ptr = %x\n", ptr)); @@ -182,7 +182,7 @@ worker (void *c) return 0; } -static void +extern "C" void handler (int signum) { ACE_DEBUG ((LM_DEBUG, "signal = %S\n", signum)); @@ -202,11 +202,11 @@ main (int, char *argv[]) #if defined (ACE_MT_SAFE) ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); + + // Register a signal handler. ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - - int threads = ACE_MAX_THREADS; - if (ACE_Service_Config::thr_mgr ()->spawn_n (threads, + if (ACE_Service_Config::thr_mgr ()->spawn_n (ACE_MAX_THREADS, ACE_THR_FUNC (&worker), (void *) ITERATIONS, THR_BOUND | THR_DETACHED) == -1) @@ -220,4 +220,3 @@ main (int, char *argv[]) ACE_END_TEST; return 0; } - diff --git a/tests/Thread_Manager_Test.cpp b/tests/Thread_Manager_Test.cpp index 0df6f757d31..e91cfc0c6f6 100644 --- a/tests/Thread_Manager_Test.cpp +++ b/tests/Thread_Manager_Test.cpp @@ -26,7 +26,7 @@ #if defined (ACE_HAS_THREADS) -static void +extern "C" void handler (int signum) { ACE_DEBUG ((LM_DEBUG, "(%t) received signal %d\n", signum)); @@ -68,11 +68,9 @@ main (int argc, char *argv[]) #if defined (ACE_HAS_THREADS) ACE_Service_Config daemon; - daemon.open (argv[0]); - // Register a signal handler - ACE_SignalHandler sh (handler); - ACE_Sig_Action sa (sh, SIGINT); + // Register a signal handler. + ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS; int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; |