mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
sched: clean up is_migration_thread()
clean up is_migration_thread() and turn it into an inline function. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
3a5e4dc12f
commit
d5036e89dc
1 changed files with 9 additions and 6 deletions
|
@ -75,12 +75,6 @@ unsigned long long __attribute__((weak)) sched_clock(void)
|
||||||
return (unsigned long long)jiffies * (1000000000 / HZ);
|
return (unsigned long long)jiffies * (1000000000 / HZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
#define is_migration_thread(p, rq) ((p) == (rq)->migration_thread)
|
|
||||||
#else
|
|
||||||
#define is_migration_thread(p, rq) 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert user-nice values [ -20 ... 0 ... 19 ]
|
* Convert user-nice values [ -20 ... 0 ... 19 ]
|
||||||
* to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
|
* to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
|
||||||
|
@ -371,6 +365,15 @@ static inline int cpu_of(struct rq *rq)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int is_migration_thread(struct task_struct *p, struct rq *rq)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
return p == rq->migration_thread;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the per-runqueue clock, as finegrained as the platform can give
|
* Update the per-runqueue clock, as finegrained as the platform can give
|
||||||
* us, but without assuming monotonicity, etc.:
|
* us, but without assuming monotonicity, etc.:
|
||||||
|
|
Loading…
Add table
Reference in a new issue