diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-08-18 17:57:22 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-08-18 17:57:22 +0000 |
commit | 4dcd827f0de32bf19b3c50256a014d38228ec3aa (patch) | |
tree | e2746daccc2e79ecad8a3f638db32dfc1ff1cae8 /tests/Barrier_Test.cpp | |
parent | 2e15544f7bc5fc0420f36744710f511b71e28373 (diff) | |
download | ATCD-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.cpp | 12 |
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")); |