Skip to content

Commit

Permalink
Merge pull request #1389 from iguessthislldo/igtd/gettid-export
Browse files Browse the repository at this point in the history
Inline ACE_OS::thr_gettid
  • Loading branch information
iguessthislldo authored Jan 7, 2021
2 parents 20d49a4 + 8c07da5 commit a8ed6a2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions ACE/ace/OS_NS_Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
1 change: 1 addition & 0 deletions ACE/ace/OS_NS_Thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();

/**
Expand Down
10 changes: 10 additions & 0 deletions ACE/ace/OS_NS_Thread.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
{
Expand Down

0 comments on commit a8ed6a2

Please sign in to comment.