summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-15 21:39:48 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-15 21:39:48 +0000
commit699ed888957d96905a5054139305e323f5768d4a (patch)
treeca2270600e7eb277c8220ff5fbe7607fad423e04
parent5c93870797b91a8bd910afa3acf20a4e3e933d66 (diff)
downloadATCD-699ed888957d96905a5054139305e323f5768d4a.tar.gz
Added more changes to wait and exit for Chorus.
-rw-r--r--ace/Thread_Manager.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp
index 35ccb8cc260..448f47d666a 100644
--- a/ace/Thread_Manager.cpp
+++ b/ace/Thread_Manager.cpp
@@ -1260,7 +1260,7 @@ ACE_Thread_Manager::exit (void *status, int do_thr_exit)
td->cleanup_info_.cleanup_hook_ = 0;
}
-#if !defined (VXWORKS) && !defined (CHORUS)
+#if !defined (VXWORKS)
// Threads created with THR_DAEMON shouldn't exist here, but
// just to be safe, let's put it here.
@@ -1271,7 +1271,7 @@ ACE_Thread_Manager::exit (void *status, int do_thr_exit)
td->thr_state_ = ACE_THR_TERMINATED;
this->terminated_thr_queue_.enqueue_tail (*td);
}
-#endif /* ! VXWORKS && ! CHORUS */
+#endif /* ! VXWORKS */
// Remove thread descriptor from the table.
this->remove_thr (td, 0);
@@ -1341,16 +1341,24 @@ ACE_Thread_Manager::wait (const ACE_Time_Value *timeout,
// Release the guard, giving other threads a chance to run.
}
-#if !defined (VXWORKS) && ! defined (CHORUS)
+#if !defined (VXWORKS)
// @@ VxWorks doesn't support thr_join (yet.) We are working
//on our implementation. Chorus'es thr_join seems broken.
ACE_Thread_Descriptor item;
- while (this->terminated_thr_queue_.dequeue_head (item) == 0)
- if (ACE_BIT_DISABLED (item.flags_, (THR_DETACHED | THR_DAEMON))
- || ACE_BIT_ENABLED (item.flags_, THR_JOINABLE))
- ACE_Thread::join (item.thr_handle_);
-#endif /* ! VXWORKS && ! CHORUS */
+#if defined (CHORUS)
+ if (ACE_Object_Manager::shutting_down () != 1)
+ {
+#endif /* CHORUS */
+ while (this->terminated_thr_queue_.dequeue_head (item) == 0)
+ if (ACE_BIT_DISABLED (item.flags_, (THR_DETACHED | THR_DAEMON))
+ || ACE_BIT_ENABLED (item.flags_, THR_JOINABLE))
+ ACE_Thread::join (item.thr_handle_);
+#if defined (CHORUS)
+ }
+#endif /* CHORUS */
+
+#endif /* ! VXWORKS */
#else
ACE_UNUSED_ARG (timeout);
#endif /* ACE_HAS_THREADS */