aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/mc2_common.h
blob: a1d571f0280fe5ce1854f23b1d2047960d70a4a1 (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
/*
 * MC^2 common data structures
 */
 
#ifndef __UNC_MC2_COMMON_H__
#define __UNC_MC2_COMMON_H__

enum crit_level {
	CRIT_LEVEL_A = 0,
	CRIT_LEVEL_B = 1,
	CRIT_LEVEL_C = 2,
	NUM_CRIT_LEVELS = 3,
};

struct mc2_task {
	enum crit_level crit;
	pid_t pid;
	lt_t hyperperiod;
};

#ifdef __KERNEL__

#include <litmus/reservation.h>

struct mc2_param{
	struct mc2_task mc2_task;
};

struct mc2_task_client {
	struct task_client tc;
	struct mc2_param mc2;
};

long mc2_task_client_init(struct mc2_task_client *mtc, struct task_struct *tsk,
							struct reservation *res);
	
#endif /* __KERNEL__ */

#endif