diff options
author | Steve Huston <shuston@riverace.com> | 2001-03-02 17:31:49 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2001-03-02 17:31:49 +0000 |
commit | 376f936a68dc7154013271e7cce489b84cdf6c6a (patch) | |
tree | 7dd25e6a9765693a8b74306fb59d6a22a2eebd1a /ace/OS.i | |
parent | 96c4a1d585b9346670a45df019617ee65fd1036a (diff) | |
download | ATCD-376f936a68dc7154013271e7cce489b84cdf6c6a.tar.gz |
ChangeLogTag:Fri Mar 02 12:24:27 2001 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ace/OS.i')
-rw-r--r-- | ace/OS.i | 27 |
1 files changed, 23 insertions, 4 deletions
@@ -7719,13 +7719,32 @@ ACE_OS::thr_join (ACE_hthread_t thr_handle, int, -1); # elif defined (ACE_HAS_PTHREADS) # if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6) + int ace_result; # if defined (ACE_LACKS_NULL_PTHREAD_STATUS) void *temp; - ACE_OSCALL_RETURN (::pthread_join (thr_handle, - status == 0 ? &temp : status), int, -1); + ACE_OSCALL (::pthread_join (thr_handle, + status == 0 ? &temp : status), + int, -1, ace_result); # else - ACE_OSCALL_RETURN (::pthread_join (thr_handle, status), int, -1); -# endif + ACE_OSCALL (::pthread_join (thr_handle, status), int, -1, ace_result); +# endif /* ACE_LACKS_NULL_PTHREAD_STATUS */ + // Joinable threads need to be detached after joining on Pthreads + // draft 4 (at least) to reclaim thread storage. +# if defined (ACE_HAS_PTHREADS_DRAFT4) +# if defined (HPUX_10) + // HP-UX DCE threads' pthread_detach will smash thr_id if it's just given + // as an argument. Since the id is still needed, give pthread_detach + // a junker to scribble on. + ACE_thread_t junker; + cma_handle_assign(&thr_handle, &junker); + ::pthread_detach (&junker); +# else + ::pthread_detach (&thr_handle); +# endif /* HPUX_10 */ +# endif /* ACE_HAS_PTHREADS_DRAFT4 */ + + return ace_result; + # else ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_join (thr_handle, status), ace_result_), int, -1); |