diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-24 14:09:39 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-24 14:09:39 +0000 |
commit | 4c9b31d09d3419bfbab343fff5a178a3e3e952b0 (patch) | |
tree | 30e62e8e7789c1a3430d46ce6c5c346bb39408cb /ace/OS.cpp | |
parent | d45d9eadc400450a1123ea084819926c27318f6d (diff) | |
download | ATCD-4c9b31d09d3419bfbab343fff5a178a3e3e952b0.tar.gz |
with ACE_HAS_DCE_DRAFT4_THREADS and ACE_LACKS_SETDETACH, added ::pthread_detach () calls
Diffstat (limited to 'ace/OS.cpp')
-rw-r--r-- | ace/OS.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ace/OS.cpp b/ace/OS.cpp index 38d83481d8a..26707c34ec0 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -2344,6 +2344,11 @@ ACE_OS::thr_create (ACE_THR_FUNC func, return -1; } } + + // Note: if ACE_LACKS_SETDETACH and THR_DETACHED is enabled, we + // call ::pthread_detach () below. If THR_DETACHED is not + // enabled, we call ::pthread_detach () in the Thread_Manager, + // after joining with the thread. # endif /* ACE_LACKS_SETDETACH */ // *** Set Policy @@ -2608,6 +2613,12 @@ ACE_OS::thr_create (ACE_THR_FUNC func, thread_args->entry_point (), thread_args), int, -1, result); + +# if defined (ACE_LACKS_SETDETACH) + if (ACE_BIT_ENABLED (flags, THR_DETACHED)) + ::pthread_detach (thr_id); +# endif /* ACE_LACKS_SETDETACH */ + # else ACE_OSCALL (ACE_ADAPT_RETVAL (::pthread_create (thr_id, attr, thread_args->entry_point (), |