summaryrefslogtreecommitdiff
path: root/tests/Barrier_Test.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-08-18 17:57:22 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-08-18 17:57:22 +0000
commit4dcd827f0de32bf19b3c50256a014d38228ec3aa (patch)
treee2746daccc2e79ecad8a3f638db32dfc1ff1cae8 /tests/Barrier_Test.cpp
parent2e15544f7bc5fc0420f36744710f511b71e28373 (diff)
downloadATCD-4dcd827f0de32bf19b3c50256a014d38228ec3aa.tar.gz
use ACE_Thread_Manager::instance ()->wait () on VxWorks, because
it doesn't support thr_join ()
Diffstat (limited to 'tests/Barrier_Test.cpp')
-rw-r--r--tests/Barrier_Test.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/Barrier_Test.cpp b/tests/Barrier_Test.cpp
index 0aa3d4d6c53..3177cc62b47 100644
--- a/tests/Barrier_Test.cpp
+++ b/tests/Barrier_Test.cpp
@@ -48,6 +48,10 @@ tester (Tester_Args *args)
{
ACE_NEW_THREAD;
+#if defined (VXWORKS)
+ ACE_Thread_Control tc (ACE_Thread_Manager::instance ());
+#endif /* VXWORKS */
+
for (int iterations = 1;
iterations <= args->n_iterations_;
iterations++)
@@ -99,6 +103,11 @@ main (int, char *[])
thread_handles) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1);
+#if defined (VXWORKS)
+ // VxWorks doesn't support thr_join() semantics... Someday
+ // we'll fix this.
+ ACE_Thread_Manager::instance ()->wait ();
+#else
// Wait for all the threads to reach their exit point and then join
// with all the exiting threads.
for (int i = 0;
@@ -106,8 +115,9 @@ main (int, char *[])
i++)
if (ACE_Thread::join (thread_handles[i]) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "join"), -1);
+#endif /* VXWORKS */
}
-
+
ACE_DEBUG ((LM_DEBUG, "test done\n"));
#else
ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));