mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
325ea10c08
Do the following cleanups and simplifications: - sched/sched.h already includes <asm/paravirt.h>, so no need to include it in sched/core.c again. - order the <linux/sched/*.h> headers alphabetically - add all <linux/sched/*.h> headers to kernel/sched/sched.h - remove all unnecessary includes from the .c files that are already included in kernel/sched/sched.h. Finally, make all scheduler .c files use a single common header: #include "sched.h" ... which now contains a union of the relied upon headers. This makes the various .c files easier to read and easier to handle. Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
27 lines
469 B
C
27 lines
469 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
* SCHED_DEADLINE tasks has negative priorities, reflecting
|
|
* the fact that any of them has higher prio than RT and
|
|
* NORMAL/BATCH tasks.
|
|
*/
|
|
|
|
#define MAX_DL_PRIO 0
|
|
|
|
static inline int dl_prio(int prio)
|
|
{
|
|
if (unlikely(prio < MAX_DL_PRIO))
|
|
return 1;
|
|
return 0;
|
|
}
|
|
|
|
static inline int dl_task(struct task_struct *p)
|
|
{
|
|
return dl_prio(p->prio);
|
|
}
|
|
|
|
static inline bool dl_time_before(u64 a, u64 b)
|
|
{
|
|
return (s64)(a - b) < 0;
|
|
}
|