sched: Clean up and harmonize the coding style of the scheduler code base
[linux-2.6-block.git] / kernel / sched / cpupri.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/sched.h>
3
4 #define CPUPRI_NR_PRIORITIES    (MAX_RT_PRIO + 2)
5
6 #define CPUPRI_INVALID          -1
7 #define CPUPRI_IDLE              0
8 #define CPUPRI_NORMAL            1
9 /* values 2-101 are RT priorities 0-99 */
10
11 struct cpupri_vec {
12         atomic_t                count;
13         cpumask_var_t           mask;
14 };
15
16 struct cpupri {
17         struct cpupri_vec       pri_to_cpu[CPUPRI_NR_PRIORITIES];
18         int                     *cpu_to_pri;
19 };
20
21 #ifdef CONFIG_SMP
22 int  cpupri_find(struct cpupri *cp, struct task_struct *p, struct cpumask *lowest_mask);
23 void cpupri_set(struct cpupri *cp, int cpu, int pri);
24 int  cpupri_init(struct cpupri *cp);
25 void cpupri_cleanup(struct cpupri *cp);
26 #endif