License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6-block.git] / kernel / sched / cpupri.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
6e0534f2
GH
2#ifndef _LINUX_CPUPRI_H
3#define _LINUX_CPUPRI_H
4
5#include <linux/sched.h>
6
e539d8fc 7#define CPUPRI_NR_PRIORITIES (MAX_RT_PRIO + 2)
6e0534f2
GH
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
14struct cpupri_vec {
c92211d9
SR
15 atomic_t count;
16 cpumask_var_t mask;
6e0534f2
GH
17};
18
19struct cpupri {
20 struct cpupri_vec pri_to_cpu[CPUPRI_NR_PRIORITIES];
4dac0b63 21 int *cpu_to_pri;
6e0534f2
GH
22};
23
24#ifdef CONFIG_SMP
25int cpupri_find(struct cpupri *cp,
612a726f 26 struct task_struct *p, struct cpumask *lowest_mask);
6e0534f2 27void cpupri_set(struct cpupri *cp, int cpu, int pri);
68c38fc3 28int cpupri_init(struct cpupri *cp);
68e74568 29void cpupri_cleanup(struct cpupri *cp);
6e0534f2
GH
30#endif
31
32#endif /* _LINUX_CPUPRI_H */