]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - kernel/sched/cpupri.h
Merge tag 'platform-drivers-x86-v4.15-1' of git://git.infradead.org/linux-platform...
[mirror_ubuntu-bionic-kernel.git] / kernel / sched / cpupri.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_CPUPRI_H
3 #define _LINUX_CPUPRI_H
4
5 #include <linux/sched.h>
6
7 #define CPUPRI_NR_PRIORITIES (MAX_RT_PRIO + 2)
8
9 #define CPUPRI_INVALID -1
10 #define CPUPRI_IDLE 0
11 #define CPUPRI_NORMAL 1
12 /* values 2-101 are RT priorities 0-99 */
13
14 struct cpupri_vec {
15 atomic_t count;
16 cpumask_var_t mask;
17 };
18
19 struct cpupri {
20 struct cpupri_vec pri_to_cpu[CPUPRI_NR_PRIORITIES];
21 int *cpu_to_pri;
22 };
23
24 #ifdef CONFIG_SMP
25 int cpupri_find(struct cpupri *cp,
26 struct task_struct *p, struct cpumask *lowest_mask);
27 void cpupri_set(struct cpupri *cp, int cpu, int pri);
28 int cpupri_init(struct cpupri *cp);
29 void cpupri_cleanup(struct cpupri *cp);
30 #endif
31
32 #endif /* _LINUX_CPUPRI_H */