diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/litmus/mc2_common.h | 31 | ||||
-rw-r--r-- | include/litmus/rt_param.h | 4 | ||||
-rw-r--r-- | include/litmus/unistd_32.h | 3 | ||||
-rw-r--r-- | include/litmus/unistd_64.h | 5 |
4 files changed, 40 insertions, 3 deletions
diff --git a/include/litmus/mc2_common.h b/include/litmus/mc2_common.h new file mode 100644 index 000000000000..e3c0af28f1b9 --- /dev/null +++ b/include/litmus/mc2_common.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * MC^2 common data structures | ||
3 | */ | ||
4 | |||
5 | #ifndef __UNC_MC2_COMMON_H__ | ||
6 | #define __UNC_MC2_COMMON_H__ | ||
7 | |||
8 | enum crit_level { | ||
9 | CRIT_LEVEL_A = 0, | ||
10 | CRIT_LEVEL_B = 1, | ||
11 | CRIT_LEVEL_C = 2, | ||
12 | NUM_CRIT_LEVELS = 3, | ||
13 | }; | ||
14 | |||
15 | struct mc2_task { | ||
16 | enum crit_level crit; | ||
17 | unsigned int res_id; | ||
18 | }; | ||
19 | |||
20 | #ifdef __KERNEL__ | ||
21 | |||
22 | #include <litmus/reservation.h> | ||
23 | |||
24 | #define tsk_mc2_data(t) (tsk_rt(t)->mc2_data) | ||
25 | |||
26 | long mc2_task_client_init(struct task_client *tc, struct mc2_task *mc2_param, struct task_struct *tsk, | ||
27 | struct reservation *res); | ||
28 | |||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | #endif \ No newline at end of file | ||
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index e626bbbe60d5..26dfa33c1e5e 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -206,6 +206,7 @@ struct rt_job { | |||
206 | }; | 206 | }; |
207 | 207 | ||
208 | struct pfair_param; | 208 | struct pfair_param; |
209 | struct mc2_task; | ||
209 | 210 | ||
210 | /* RT task parameters for scheduling extensions | 211 | /* RT task parameters for scheduling extensions |
211 | * These parameters are inherited during clone and therefore must | 212 | * These parameters are inherited during clone and therefore must |
@@ -322,6 +323,9 @@ struct rt_param { | |||
322 | 323 | ||
323 | /* Pointer to the page shared between userspace and kernel. */ | 324 | /* Pointer to the page shared between userspace and kernel. */ |
324 | struct control_page * ctrl_page; | 325 | struct control_page * ctrl_page; |
326 | |||
327 | /* Mixed-criticality specific data */ | ||
328 | struct mc2_task* mc2_data; | ||
325 | }; | 329 | }; |
326 | 330 | ||
327 | #endif | 331 | #endif |
diff --git a/include/litmus/unistd_32.h b/include/litmus/unistd_32.h index 5f6a2749c6a7..202f439a62ae 100644 --- a/include/litmus/unistd_32.h +++ b/include/litmus/unistd_32.h | |||
@@ -19,5 +19,6 @@ | |||
19 | #define __NR_null_call __LSC(11) | 19 | #define __NR_null_call __LSC(11) |
20 | #define __NR_reservation_create __LSC(12) | 20 | #define __NR_reservation_create __LSC(12) |
21 | #define __NR_reservation_destroy __LSC(13) | 21 | #define __NR_reservation_destroy __LSC(13) |
22 | #define __NR_set_mc2_task_param __LSC(14) | ||
22 | 23 | ||
23 | #define NR_litmus_syscalls 14 | 24 | #define NR_litmus_syscalls 15 |
diff --git a/include/litmus/unistd_64.h b/include/litmus/unistd_64.h index 3e6b1d330336..ba2c91c5bf8c 100644 --- a/include/litmus/unistd_64.h +++ b/include/litmus/unistd_64.h | |||
@@ -33,6 +33,7 @@ __SYSCALL(__NR_null_call, sys_null_call) | |||
33 | __SYSCALL(__NR_reservation_create, sys_reservation_create) | 33 | __SYSCALL(__NR_reservation_create, sys_reservation_create) |
34 | #define __NR_reservation_destroy __LSC(13) | 34 | #define __NR_reservation_destroy __LSC(13) |
35 | __SYSCALL(__NR_reservation_destroy, sys_reservation_destroy) | 35 | __SYSCALL(__NR_reservation_destroy, sys_reservation_destroy) |
36 | #define __NR_set_mc2_task_param __LSC(14) | ||
37 | __SYSCALL(__NR_set_mc2_task_param, sys_set_mc2_task_param) | ||
36 | 38 | ||
37 | 39 | #define NR_litmus_syscalls 15 | |
38 | #define NR_litmus_syscalls 14 | ||