summaryrefslogtreecommitdiff
path: root/tests/TSS_Test.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1996-11-27 06:09:30 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1996-11-27 06:09:30 +0000
commitd395a38d42932c86ebef82468f58c03b3529363e (patch)
tree073713b4441888c543375a9fbbb82c210d9a29f6 /tests/TSS_Test.cpp
parentc08f68e92f2454a46ec91db97d776ad6304328bb (diff)
downloadATCD-d395a38d42932c86ebef82468f58c03b3529363e.tar.gz
foo
Diffstat (limited to 'tests/TSS_Test.cpp')
-rw-r--r--tests/TSS_Test.cpp11
1 files changed, 5 insertions, 6 deletions
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;
}
-