make rt_task private
PATCH 16/28 make rt_task private
make rt_task private
Scheduler designs may not identify real time tasks by their priority so privatise the rt_task macro as a function.
Signed-off-by Con Kolivas <[email protected]>
include/linux/sched.h +1 -1
@@ -345,7 +345,7 @@ struct signal_struct {#define MAX_PRIO (MAX_RT_PRIO + 40) -#define rt_task (p) (unlikely((p)->prio < MAX_RT_PRIO)) +extern int rt_task (task_t *p);/* * Some day this will be a full-fledged user tracking system..
include/linux/scheduler.h +1 -0
@@ -1,5 +1,6 @@struct sched_drv { +int (*rt_task)(task_t *);void (*wait_for_completion)(struct completion *);void (*io_schedule)(void );long (*io_schedule_timeout)(long );
kernel/sched.c +6 -0
@@ -292,6 +292,11 @@ static DEFINE_PER_CPU(struct runqueue, r#define task_rq (p) cpu_rq(task_cpu(p))#define cpu_curr (cpu) (cpu_rq(cpu)->curr) +static int ingo_rt_task (task_t *p) +{ +return (unlikely ((p)->prio <MAX_RT_PRIO )); +} +/* * Default context-switch locking: */
@@ -4139,6 +4144,7 @@ void destroy_sched_domain_sysctl()#endif struct sched_drv ingo_sched_drv = { + .rt_task = ingo_rt_task, .wait_for_completion = ingo_wait_for_completion, .io_schedule = ingo_io_schedule, .io_schedule_timeout = ingo_io_schedule_timeout,
kernel/scheduler.c +5 -0
@@ -921,6 +921,11 @@ unsigned long nr_iowait(void)return scheduler->nr_iowait (); } +int rt_task (task_t *task) +{ +return scheduler->rt_task (task); +} +int idle_cpu (int cpu) {return scheduler->idle_cpu (cpu);