summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorsma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-02-22 09:02:44 +0000
committersma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-02-22 09:02:44 +0000
commit35c9fd68f0c35ae14b4c5b14da3a55912bf729e5 (patch)
tree2c3d341d0e0ede3e66cf1441860046f23ad2f368 /ace
parent5122c49e40dd2352e25612d97091367a99093e11 (diff)
downloadATCD-35c9fd68f0c35ae14b4c5b14da3a55912bf729e5.tar.gz
Wed Feb 22 08:33:03 UTC 2006 Don Sharp <Donald.Sharp@prismtech.com>
Diffstat (limited to 'ace')
-rw-r--r--ace/Log_Msg.cpp15
-rw-r--r--ace/config-lynxos-pthread.h17
-rw-r--r--ace/config-lynxos.h2
-rw-r--r--ace/os_include/os_pthread.h4
4 files changed, 35 insertions, 3 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index c276ee42e23..2eaf01ec85f 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -60,11 +60,11 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Log_Msg)
# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \
defined (ACE_HAS_TSS_EMULATION)
+static ACE_thread_key_t the_log_msg_tss_key = 0;
+
ACE_thread_key_t *log_msg_tss_key (void)
{
- static ACE_thread_key_t key = 0;
-
- return &key;
+ return &the_log_msg_tss_key;
}
# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
@@ -251,6 +251,15 @@ ACE_TSS_CLEANUP_NAME (void *ptr)
log_msg->thr_desc()->log_msg_cleanup(log_msg);
else
#endif /* !ACE_USE_ONE_SHOT_AT_THREAD_EXIT */
+#ifdef ACE_HAS_BROKEN_THREAD_KEYFREE
+ if ( ACE_Thread::setspecific( (*log_msg_tss_key()),
+ (void *)NULL ) != 0 )
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_LIB_TEXT ("(%P|%t) ACE_Log_Msg::close failed to ACE_Thread::setspecific to NULL\n")));
+
+ }
+#endif /* ACE_HAS_BROKEN_THREAD_KEYFREE */
delete (ACE_Log_Msg *) ptr;
}
# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */
diff --git a/ace/config-lynxos-pthread.h b/ace/config-lynxos-pthread.h
new file mode 100644
index 00000000000..41a302c63c2
--- /dev/null
+++ b/ace/config-lynxos-pthread.h
@@ -0,0 +1,17 @@
+// $Id$
+
+#ifndef CONFIG_LYNXOS_PTHREAD_H
+#define CONFIG_LYNXOS_PTHREAD_H
+#include /**/ "ace/pre.h"
+
+#ifdef pthread_cancel
+# undef pthread_cancel
+# define pthread_cancel(t) st_cancel_no_macro(t)
+inline int st_cancel_no_macro(pthread_t t)
+{
+ return (st_cancel(t) < 0 ? -1 : 0);
+}
+#endif /* pthread_cancel */
+
+#include /**/ "ace/post.h"
+#endif /* CONFIG_LYNXOS_PTHREAD_H */
diff --git a/ace/config-lynxos.h b/ace/config-lynxos.h
index 3cc01203cea..63619c9cfec 100644
--- a/ace/config-lynxos.h
+++ b/ace/config-lynxos.h
@@ -171,6 +171,8 @@
#define __NO_INCLUDE_WARN__
#if ACE_LYNXOS_MAJOR > 3 /* LynxOS 4.x */
+# define ACE_HAS_SVR4_DYNAMIC_LINKING
+# define ACE_HAS_BROKEN_THREAD_KEYFREE
// "changes signedness" error (OS.i and many other files)
# define ACE_HAS_SOCKLEN_T
// LSOCK.cpp uses a macro from param.h, not included
diff --git a/ace/os_include/os_pthread.h b/ace/os_include/os_pthread.h
index a457271c9eb..e70ad0ba6d6 100644
--- a/ace/os_include/os_pthread.h
+++ b/ace/os_include/os_pthread.h
@@ -62,6 +62,10 @@ extern "C" pthread_t pthread_self (void);
# include /**/ <spthread.h>
# else
# include /**/ <pthread.h>
+# if defined (__Lynx__)
+ // cope with LynxOS' use of macros
+# include /**/ "ace/config-lynxos-pthread.h"
+# endif /* __Lynx__ */
# endif
}
#endif /* !ACE_LACKS_PTHREAD_H */