Commit d46523ea32a7 ("[PATCH] fix MAX_USER_RT_PRIO and MAX_RT_PRIO") was introduced due to a a small time period in which the realtime patch set was using different values for MAX_USER_RT_PRIO and MAX_RT_PRIO. This is no longer true, i.e. now MAX_RT_PRIO == MAX_USER_RT_PRIO. Get rid of MAX_USER_RT_PRIO and make everything use MAX_RT_PRIO instead.
Showing the changes to kernel (1 of 2 files). Show all
Unified · Split
| @@ -5911,11 +5911,10 @@ recheck: · 5910 unmodified lines | ||
| 5911 | 5911 | |
| 5912 | 5912 | /* |
| 5913 | 5913 | * Valid priorities for SCHED_FIFO and SCHED_RR are |
| 5914 | − * 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_NORMAL, | |
| 5914 | + * 1..MAX_RT_PRIO-1, valid priority for SCHED_NORMAL, | |
| 5915 | 5915 | * SCHED_BATCH and SCHED_IDLE is 0. |
| 5916 | 5916 | */ |
| 5917 | − if ((p->mm && attr->sched_priority > MAX_USER_RT_PRIO-1) || | |
| 5918 | − (!p->mm && attr->sched_priority > MAX_RT_PRIO-1)) | |
| 5917 | + if (attr->sched_priority > MAX_RT_PRIO-1) | |
| 5919 | 5918 | return -EINVAL; |
| 5920 | 5919 | if ((dl_policy(policy) && !__checkparam_dl(attr)) || |
| 5921 | 5920 | (rt_policy(policy) != (attr->sched_priority != 0))) |
| @@ -6983,7 +6982,7 @@ SYSCALL_DEFINE1(sched_get_priority_max, int, policy) · 1061 unmodified lines | ||
| 6983 | 6982 | switch (policy) { |
| 6984 | 6983 | case SCHED_FIFO: |
| 6985 | 6984 | case SCHED_RR: |
| 6986 | − ret = MAX_USER_RT_PRIO-1; | |
| 6985 | + ret = MAX_RT_PRIO-1; | |
| 6987 | 6986 | break; |
| 6988 | 6987 | case SCHED_DEADLINE: |
| 6989 | 6988 | case SCHED_NORMAL: |