diff options
author | Steve Huston <shuston@riverace.com> | 2005-02-15 23:07:37 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2005-02-15 23:07:37 +0000 |
commit | 34104cf059eeafbd1382ac7f9315e0c9a4afac2e (patch) | |
tree | 929cad045679537bffe42e0311c7d1ac90539359 /ace/Thread_Manager.cpp | |
parent | 2cf1b9573c6f58e31ad17124620d11875cf8dab9 (diff) | |
download | ATCD-34104cf059eeafbd1382ac7f9315e0c9a4afac2e.tar.gz |
Commit merged-in changes from mainlinePROACTOR_FIXES_STEVE_JAN05
Diffstat (limited to 'ace/Thread_Manager.cpp')
-rw-r--r-- | ace/Thread_Manager.cpp | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp index 4669856de3d..e4511fdb00c 100644 --- a/ace/Thread_Manager.cpp +++ b/ace/Thread_Manager.cpp @@ -630,40 +630,38 @@ ACE_Thread_Manager::spawn_i (ACE_THR_FUNC func, new_thr_desc->sync_->release (); return -1; } - else - { + #if defined (ACE_HAS_WTHREADS) - // Have to duplicate handle if client asks for it. - // @@ How are thread handles implemented on AIX? Do they - // also need to be duplicated? - if (t_handle != 0) + // Have to duplicate handle if client asks for it. + // @@ How are thread handles implemented on AIX? Do they + // also need to be duplicated? + if (t_handle != 0) # if defined (ACE_HAS_WINCE) - *t_handle = thr_handle; + *t_handle = thr_handle; # else /* ! ACE_HAS_WINCE */ - (void) ::DuplicateHandle (::GetCurrentProcess (), - thr_handle, - ::GetCurrentProcess (), - t_handle, - 0, - TRUE, - DUPLICATE_SAME_ACCESS); + (void) ::DuplicateHandle (::GetCurrentProcess (), + thr_handle, + ::GetCurrentProcess (), + t_handle, + 0, + TRUE, + DUPLICATE_SAME_ACCESS); # endif /* ! ACE_HAS_WINCE */ #else /* ! ACE_HAS_WTHREADS */ - if (t_handle != 0) - *t_handle = thr_handle; + if (t_handle != 0) + *t_handle = thr_handle; #endif /* ! ACE_HAS_WTHREADS && ! VXWORKS */ - // append_thr also put the <new_thr_desc> into Thread_Manager's - // double-linked list. Only after this point, can we manipulate - // double-linked list from a spawned thread's context. - return this->append_thr (*t_id, - thr_handle, - ACE_THR_SPAWNED, - grp_id, - task, - flags, - new_thr_desc.release ()); - } + // append_thr also put the <new_thr_desc> into Thread_Manager's + // double-linked list. Only after this point, can we manipulate + // double-linked list from a spawned thread's context. + return this->append_thr (*t_id, + thr_handle, + ACE_THR_SPAWNED, + grp_id, + task, + flags, + new_thr_desc.release ()); } int |