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

Commit a9235301 authored by Yabin Cui's avatar Yabin Cui Committed by Gerrit Code Review
Browse files

Merge "kill HAVE_SCHED_SETSCHEDULER"

parents c34e6359 65b4a686
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -287,7 +287,8 @@ static void android_os_Process_setCanSelfBackground(JNIEnv* env, jobject clazz,
void android_os_Process_setThreadScheduler(JNIEnv* env, jclass clazz,
void android_os_Process_setThreadScheduler(JNIEnv* env, jclass clazz,
                                              jint tid, jint policy, jint pri)
                                              jint tid, jint policy, jint pri)
{
{
#ifdef HAVE_SCHED_SETSCHEDULER
// linux has sched_setscheduler(), others don't.
#if defined(__linux__)
    struct sched_param param;
    struct sched_param param;
    param.sched_priority = pri;
    param.sched_priority = pri;
    int rc = sched_setscheduler(tid, policy, &param);
    int rc = sched_setscheduler(tid, policy, &param);