Skip to content

Commit

Permalink
Merge pull request xbmc#15263 from peak3d/tid
Browse files Browse the repository at this point in the history
[Android] Log kernel ThreadId instead pthread_self
  • Loading branch information
peak3d authored and MartijnKaijser committed Jan 22, 2019
2 parents ea25585 + a4032d6 commit c39c0f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xbmc/threads/platform/pthreads/ThreadImpl.cpp
Expand Up @@ -116,12 +116,20 @@ void CThread::SetThreadInfo()

ThreadIdentifier CThread::GetCurrentThreadId()
{
#if defined(TARGET_ANDROID)
return gettid();
#else
return pthread_self();
#endif
}

bool CThread::IsCurrentThread(const ThreadIdentifier tid)
{
#if defined(TARGET_ANDROID)
return gettid() == tid;
#else
return pthread_equal(pthread_self(), tid);
#endif
}

int CThread::GetMinPriority(void)
Expand Down

0 comments on commit c39c0f8

Please sign in to comment.