Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 046cda49 authored by San Mehat's avatar San Mehat
Browse files

Add support for changing a threads scheduler group. Three groups are available...


Add support for changing a threads scheduler group. Three groups are available (default, background non interactive, foreground boost). Setting a thread priority to PRIORITY_BACKGROUND will transparently change groups to background

Signed-off-by: default avatarSan Mehat <san@google.com>
parent e2ac5fdd
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -79,6 +79,13 @@ enum {
    ANDROID_PRIORITY_LESS_FAVORABLE = +1,
};

enum {
    ANDROID_TGROUP_DEFAULT          = 0,
    ANDROID_TGROUP_BG_NONINTERACT   = 1,
    ANDROID_TGROUP_FG_BOOST         = 2,
    ANDROID_TGROUP_MAX              = ANDROID_TGROUP_FG_BOOST,
};

// Create and run a new thread.
extern int androidCreateThread(android_thread_func_t, void *);