summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_NS_Thread.cpp
diff options
context:
space:
mode:
authorFred Hornsey <fred@hornsey.us>2019-04-17 22:48:47 -0500
committerFred Hornsey <fred@hornsey.us>2019-04-17 22:48:47 -0500
commit756b05669ff1178967c840734ac42e2e7d2b8db2 (patch)
tree84ddcde112162c6cda859170930fa232a17eeae2 /ACE/ace/OS_NS_Thread.cpp
parent14531f70716a70092d65052e3d3334f52f05c519 (diff)
downloadATCD-756b05669ff1178967c840734ac42e2e7d2b8db2.tar.gz
Respond to PR comments
Diffstat (limited to 'ACE/ace/OS_NS_Thread.cpp')
-rw-r--r--ACE/ace/OS_NS_Thread.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp
index 315713a35a4..809b3657586 100644
--- a/ACE/ace/OS_NS_Thread.cpp
+++ b/ACE/ace/OS_NS_Thread.cpp
@@ -4807,17 +4807,15 @@ ACE_OS::unique_name (const void *object,
}
#endif
-#ifdef ACE_HAS_GETTID
pid_t
ACE_OS::thr_gettid ()
{
-# ifdef ACE_LINUX
+#if defined(ACE_LINUX) && defined(ACE_HAS_GETTID)
return syscall (SYS_gettid);
-# else
-# error "No implementation for thr_gettid(), please disable ACE_HAS_GETTID"
-# endif
-}
+#else
+ return static_cast<pid_t> (ACE_OS::thr_self ());
#endif
+}
ACE_END_VERSIONED_NAMESPACE_DECL