diff options
author | Fred Hornsey <hornseyf@objectcomputing.com> | 2021-01-07 13:12:15 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 13:12:15 -0600 |
commit | a8ed6a22f8d37fa5f139189f9a5427b70c3c406e (patch) | |
tree | adece0925db83efeca4e7b479998b0d0c2d56aed | |
parent | 20d49a47fa71ff45251839427bb333ca9c8ffc97 (diff) | |
parent | 8c07da5c4316895917a33dbaed2171ed7ad00448 (diff) | |
download | ATCD-a8ed6a22f8d37fa5f139189f9a5427b70c3c406e.tar.gz |
Merge pull request #1389 from iguessthislldo/igtd/gettid-export
Inline ACE_OS::thr_gettid
-rw-r--r-- | ACE/ace/OS_NS_Thread.cpp | 10 | ||||
-rw-r--r-- | ACE/ace/OS_NS_Thread.h | 1 | ||||
-rw-r--r-- | ACE/ace/OS_NS_Thread.inl | 10 |
3 files changed, 11 insertions, 10 deletions
diff --git a/ACE/ace/OS_NS_Thread.cpp b/ACE/ace/OS_NS_Thread.cpp index ef2f13ac2a0..2cd16d29e7a 100644 --- a/ACE/ace/OS_NS_Thread.cpp +++ b/ACE/ace/OS_NS_Thread.cpp @@ -4839,16 +4839,6 @@ ACE_OS::unique_name (const void *object, } #endif -pid_t -ACE_OS::thr_gettid () -{ -#ifdef ACE_HAS_GETTID - return syscall (SYS_gettid); -#else - ACE_NOTSUP_RETURN (-1); -#endif -} - ACE_END_VERSIONED_NAMESPACE_DECL #if defined (ACE_VXWORKS) && !defined (__RTP__) diff --git a/ACE/ace/OS_NS_Thread.h b/ACE/ace/OS_NS_Thread.h index e01e8a2b4f7..9419f1d0812 100644 --- a/ACE/ace/OS_NS_Thread.h +++ b/ACE/ace/OS_NS_Thread.h @@ -1767,6 +1767,7 @@ namespace ACE_OS { * For older Linux (pre 2.4.11) and other systems that don't have gettid(), * this uses ACE_NOTSUP_RETURN (-1). */ + ACE_NAMESPACE_INLINE_FUNCTION pid_t thr_gettid (); /** diff --git a/ACE/ace/OS_NS_Thread.inl b/ACE/ace/OS_NS_Thread.inl index 4b34fdeea11..7ab6d5894f1 100644 --- a/ACE/ace/OS_NS_Thread.inl +++ b/ACE/ace/OS_NS_Thread.inl @@ -3179,6 +3179,16 @@ ACE_OS::thr_gettid (char buffer[], size_t buffer_length) static_cast<int> (ACE_OS::thr_gettid ())); } +ACE_INLINE pid_t +ACE_OS::thr_gettid () +{ +#ifdef ACE_HAS_GETTID + return syscall (SYS_gettid); +#else + ACE_NOTSUP_RETURN (-1); +#endif +} + ACE_INLINE ACE_thread_t ACE_OS::thr_self () { |