diff options
author | Adam Mitz <mitza@ociweb.com> | 2015-11-11 16:15:52 -0600 |
---|---|---|
committer | Adam Mitz <mitza@ociweb.com> | 2015-11-11 16:15:52 -0600 |
commit | 74f5d92308ff3d0ae6012b2e4e4d3986c8ff5e8d (patch) | |
tree | ebdcdf336ac24ab877022fbb88268640ebd1b231 /ACE/ace | |
parent | 6226b0eec95959b716a46120699d6357a20dad70 (diff) | |
download | ATCD-74f5d92308ff3d0ae6012b2e4e4d3986c8ff5e8d.tar.gz |
LynxOS-178 has some issues in its thread specific storage.
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/Log_Msg.cpp | 15 | ||||
-rw-r--r-- | ACE/ace/TSS_T.cpp | 4 |
2 files changed, 13 insertions, 6 deletions
diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index 4b19f872e8c..03bc08fec39 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -243,12 +243,15 @@ LOCAL_EXTERN_PREFIX void ACE_TSS_CLEANUP_NAME (void *ptr) { - // Delegate to thr_desc if this not has terminated - ACE_Log_Msg* log_msg = (ACE_Log_Msg*) ptr; - if (log_msg->thr_desc()!=0) - log_msg->thr_desc()->log_msg_cleanup(log_msg); - else - delete log_msg; + if (ptr != 0) + { + // Delegate to thr_desc if this not has terminated + ACE_Log_Msg *log_msg = (ACE_Log_Msg *) ptr; + if (log_msg->thr_desc () != 0) + log_msg->thr_desc ()->log_msg_cleanup (log_msg); + else + delete log_msg; + } } # endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */ #endif /* ! ACE_MT_SAFE */ diff --git a/ACE/ace/TSS_T.cpp b/ACE/ace/TSS_T.cpp index adbc0465ba7..c99593e4542 100644 --- a/ACE/ace/TSS_T.cpp +++ b/ACE/ace/TSS_T.cpp @@ -46,7 +46,11 @@ ACE_TSS<TYPE>::~ACE_TSS (void) # else TYPE *ts_obj = this->ts_value (); this->ts_value (0); +# if !defined ACE_HAS_LYNXOS_178 || defined ACE_HAS_TSS_EMULATION + // A bug in LynxOS-178 causes pthread_setspecific (called from ts_value(0) + // above) to call the cleanup function, so we need to avoid calling it here. ACE_TSS<TYPE>::cleanup (ts_obj); +# endif # endif /* ACE_HAS_THR_C_DEST */ ACE_OS::thr_key_detach (this->key_); |