We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3930 - Android, set thread priorities
Summary: Android, set thread priorities
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: don't know
Hardware: All Android (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-31 12:18 UTC by Sylvain
Modified: 2019-01-10 17:07 UTC (History)
0 users

See Also:


Attachments
patch (8.28 KB, patch)
2017-10-31 12:18 UTC, Sylvain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain 2017-10-31 12:18:35 UTC
Created attachment 3050 [details]
patch

Thread priorities have not been set on android.

Main UI thread and native SDL thread got PRIORITY_DISPLAY.  (-4, instead of 0)
Audio Playback and capture got PRIORITY_AUDIO (-16)
ThreadListener got priority LOWEST

Also, it adds the name of Audio Thread (that wasn't working from C code, it was named "Thread-8").
and the name of the SDLActivity thread (it was named "main")

so that it's easier to find the thread when running systrace ...

https://developer.android.com/studio/command-line/systrace.html
https://developer.android.com/reference/android/os/Process.html
Comment 1 Sylvain 2019-01-10 17:07:44 UTC
Fixed by https://hg.libsdl.org/SDL/rev/2a567875fe8e