summaryrefslogtreecommitdiff
path: root/ace/Log_Msg.cpp
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>1997-08-19 19:03:35 +0000
committerSteve Huston <shuston@riverace.com>1997-08-19 19:03:35 +0000
commitc2ed763cf3b00931ea50349cc559dce69f3884a9 (patch)
tree4f07f1f3fcd26af80ec3693ba32cacda5b7c4cb1 /ace/Log_Msg.cpp
parent7cbb6284eb94e474a34a6081478b67b8194f9790 (diff)
downloadATCD-c2ed763cf3b00931ea50349cc559dce69f3884a9.tar.gz
For the 't' (thread ID) formatting on AIX, changed to call thread_self()
directly.
Diffstat (limited to 'ace/Log_Msg.cpp')
-rw-r--r--ace/Log_Msg.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index ef9fdd37192..d5cd2148d88 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -805,6 +805,18 @@ ACE_Log_Msg::log (const char *format_str,
type = SKIP_SPRINTF;
#if defined (ACE_WIN32)
ACE_OS::sprintf (bp, "%u", ACE_Thread::self ());
+#elif defined (AIX)
+ // AIX's pthread_t (ACE_hthread_t) is a pointer, and it's
+ // a little ugly to send that through a %u format. So,
+ // get the kernel thread ID (tid_t) via thread_self() and
+ // display that instead.
+ // This isn't conditionalized on ACE_HAS_THREAD_SELF because
+ // 1. AIX 4.2 doesn't have that def anymore (it messes up
+ // other things)
+ // 2. OSF/1 V3.2 has that def, and I'm not sure what affect
+ // this would have on that.
+ // -Steve Huston, 19-Aug-97
+ ACE_OS::sprintf (bp, "%u", thread_self());
#else
ACE_hthread_t t_id;
ACE_Thread::self (t_id);