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

Summary: Android, set thread priorities
Product: SDL Reporter: Sylvain <sylvain.becker>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: don't know   
Hardware: All   
OS: Android (All)   
Attachments: patch

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