Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Log kernel ThreadId instead pthread_self #15263

Merged
merged 1 commit into from Jan 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://forum.kodi.tv/showthread.php?tid=339983 <- any chance this might go wrong?

Copy link
Contributor Author

@peak3d peak3d Feb 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refering to the logs it doesn't seem to be an issue caused by this PR, the thread ids are increasing, no resuage there. So I would say no

#else
return pthread_equal(pthread_self(), tid);
#endif
}

int CThread::GetMinPriority(void)
Expand Down