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

Commit d0aecceb authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Maybe really fix windows build.

parent 80240139
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -286,10 +286,12 @@ int androidSetThreadSchedulingGroup(pid_t tid, int grp)
        return BAD_VALUE;
        return BAD_VALUE;
    }
    }


#if defined(HAVE_PTHREADS)
    if (set_sched_policy(tid, (grp == ANDROID_TGROUP_BG_NONINTERACT) ?
    if (set_sched_policy(tid, (grp == ANDROID_TGROUP_BG_NONINTERACT) ?
                                      SP_BACKGROUND : SP_FOREGROUND)) {
                                      SP_BACKGROUND : SP_FOREGROUND)) {
        return PERMISSION_DENIED;
        return PERMISSION_DENIED;
    }
    }
#endif
    
    
    return NO_ERROR;
    return NO_ERROR;
}
}
@@ -297,6 +299,8 @@ int androidSetThreadSchedulingGroup(pid_t tid, int grp)
int androidSetThreadPriority(pid_t tid, int pri)
int androidSetThreadPriority(pid_t tid, int pri)
{
{
    int rc = 0;
    int rc = 0;
    
#if defined(HAVE_PTHREADS)
    int lasterr = 0;
    int lasterr = 0;


    if (pri >= ANDROID_PRIORITY_BACKGROUND) {
    if (pri >= ANDROID_PRIORITY_BACKGROUND) {
@@ -309,7 +313,6 @@ int androidSetThreadPriority(pid_t tid, int pri)
        lasterr = errno;
        lasterr = errno;
    }
    }


#if defined(HAVE_PTHREADS)
    if (setpriority(PRIO_PROCESS, tid, pri) < 0) {
    if (setpriority(PRIO_PROCESS, tid, pri) < 0) {
        rc = INVALID_OPERATION;
        rc = INVALID_OPERATION;
    } else {
    } else {