blob: d2979629870105c5932680ca75e2c36b69fe4799 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef _LINUX_SCHED_MC_H_
#define _LINUX_SCHED_MC_H_
#include <litmus/rt_param.h>
/* criticality levels */
enum crit_level {
/* probably don't need to assign these (paranoid) */
CRIT_LEVEL_A = 0,
CRIT_LEVEL_B = 1,
CRIT_LEVEL_C = 2,
NUM_CRIT_LEVELS = 3,
};
struct mc_task {
enum crit_level crit;
int lvl_a_id;
};
struct mc_job {
int is_ghost:1;
lt_t ghost_budget;
};
#ifdef __KERNEL__
/* only used in the kernel (no user space) */
struct mc_data {
struct mc_task mc_task;
struct mc_job mc_job;
};
#define tsk_mc_data(t) (tsk_rt(t)->mc_data)
#define tsk_mc_crit(t) (tsk_mc_data(t)->mc_task.crit)
#define is_ghost(t) (tsk_mc_data(t)->mc_job.is_ghost)
#endif /* __KERNEL__ */
#endif
|