kernel/sched_setscheduler: Fix return value.
authorSascha Wildner <saw@online.de>
Sun, 2 Feb 2014 23:04:32 +0000 (00:04 +0100)
committerSascha Wildner <saw@online.de>
Sun, 2 Feb 2014 23:04:32 +0000 (00:04 +0100)
sched_setscheduler() shall return EINVAL "if one or more of the
parameters contained in param is outside the valid range for the
specified scheduling policy."

sys/kern/kern_sched.c

index b7989e7..4b423c1 100644 (file)
@@ -172,7 +172,7 @@ ksched_setscheduler(register_t *ret, struct ksched *ksched,
                        lp->lwp_rtprio = rtp;
                        need_user_resched();
                } else {
-                       e = EPERM;
+                       e = EINVAL;
                }
                break;
        case SCHED_OTHER: