Move private macro
PATCH 21/28 Move private macro
Move private macro
Take the MAX_PRIO macro and comments out of sched.h to allow more flexible range of dynamic priorities and scheduler designs.
Signed-off-by Con Kolivas <[email protected]>
include/linux/sched.h +2 -7
@@ -328,11 +328,6 @@ struct signal_struct { };/* -* Priority of a process goes from 0..MAX_PRIO-1, valid RT -* priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL tasks are -* in the range MAX_RT_PRIO..MAX_PRIO-1. Priority values -* are inverted: lower p->prio value means higher priority. -* * The MAX_USER_RT_PRIO value allows the actual maximum * RT priority to be separate from the value exported to * user-space. This allows kernel threads to set their
@@ -343,8 +338,6 @@ struct signal_struct {#define MAX_USER_RT_PRIO 100#define MAX_RT_PRIO MAX_USER_RT_PRIO -#define MAX_PRIO (MAX_RT_PRIO + 40) -extern int rt_task (task_t *p);/*
@@ -515,6 +508,8 @@ struct mempolicy;#include <linux/scheduler.h> +extern struct sched_drv *scheduler; +struct task_struct {volatile long state;/* -1 unrunnable, 0 runnable, >0 stopped */ struct thread_info *thread_info;
kernel/sched.c +9 -0
@@ -59,6 +59,15 @@#endif /* +* Priority of a process goes from 0..MAX_PRIO-1, valid RT +* priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL tasks are +* in the range MAX_RT_PRIO..MAX_PRIO-1. Priority values +* are inverted: lower p->prio value means higher priority. +*/ + +#define MAX_PRIO (MAX_RT_PRIO + 40) + +/* * Convert user-nice values [ -20 ... 0 ... 19 ] * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], * and back.