diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2014-07-17 07:54:11 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2014-07-21 08:53:53 -0400 |
commit | 99ca08e2bd92b7957c9a22a8ec6ecad4d7f4afd3 (patch) | |
tree | 6c28c8fd4cfe54b45d9c937f58113a5ed94167ad /include | |
parent | 16a3f28dde0eccb4b58999d2a74a5a802dc53233 (diff) |
Add reservation configuration types to rt_param.h
Diffstat (limited to 'include')
-rw-r--r-- | include/litmus/polling_reservations.h | 5 | ||||
-rw-r--r-- | include/litmus/rt_param.h | 41 |
2 files changed, 41 insertions, 5 deletions
diff --git a/include/litmus/polling_reservations.h b/include/litmus/polling_reservations.h index 9958a92b8aeb..15910ed7ef8b 100644 --- a/include/litmus/polling_reservations.h +++ b/include/litmus/polling_reservations.h | |||
@@ -16,11 +16,6 @@ struct polling_reservation { | |||
16 | void polling_reservation_init(struct polling_reservation *pres, int use_edf_prio, | 16 | void polling_reservation_init(struct polling_reservation *pres, int use_edf_prio, |
17 | int use_periodic_polling, lt_t budget, lt_t period, lt_t deadline, lt_t offset); | 17 | int use_periodic_polling, lt_t budget, lt_t period, lt_t deadline, lt_t offset); |
18 | 18 | ||
19 | struct lt_interval { | ||
20 | lt_t start; | ||
21 | lt_t end; | ||
22 | }; | ||
23 | |||
24 | struct table_driven_reservation { | 19 | struct table_driven_reservation { |
25 | /* extend basic reservation */ | 20 | /* extend basic reservation */ |
26 | struct reservation res; | 21 | struct reservation res; |
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 060b5d745213..b252cc108a2f 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -62,6 +62,7 @@ typedef enum { | |||
62 | #define LITMUS_MAX_PRIORITY 512 | 62 | #define LITMUS_MAX_PRIORITY 512 |
63 | #define LITMUS_HIGHEST_PRIORITY 1 | 63 | #define LITMUS_HIGHEST_PRIORITY 1 |
64 | #define LITMUS_LOWEST_PRIORITY (LITMUS_MAX_PRIORITY - 1) | 64 | #define LITMUS_LOWEST_PRIORITY (LITMUS_MAX_PRIORITY - 1) |
65 | #define LITMUS_NO_PRIORITY UINT_MAX | ||
65 | 66 | ||
66 | /* Provide generic comparison macros for userspace, | 67 | /* Provide generic comparison macros for userspace, |
67 | * in case that we change this later. */ | 68 | * in case that we change this later. */ |
@@ -71,6 +72,46 @@ typedef enum { | |||
71 | ((p) >= LITMUS_HIGHEST_PRIORITY && \ | 72 | ((p) >= LITMUS_HIGHEST_PRIORITY && \ |
72 | (p) <= LITMUS_LOWEST_PRIORITY) | 73 | (p) <= LITMUS_LOWEST_PRIORITY) |
73 | 74 | ||
75 | /* reservation support */ | ||
76 | |||
77 | typedef enum { | ||
78 | PERIODIC_POLLING, | ||
79 | SPORADIC_POLLING, | ||
80 | TABLE_DRIVEN, | ||
81 | } reservation_type_t; | ||
82 | |||
83 | struct lt_interval { | ||
84 | lt_t start; | ||
85 | lt_t end; | ||
86 | }; | ||
87 | |||
88 | #ifndef __KERNEL__ | ||
89 | #define __user | ||
90 | #endif | ||
91 | |||
92 | struct reservation_config { | ||
93 | unsigned int id; | ||
94 | unsigned int priority; | ||
95 | int cpu; | ||
96 | |||
97 | union { | ||
98 | struct { | ||
99 | lt_t period; | ||
100 | lt_t budget; | ||
101 | lt_t relative_deadline; | ||
102 | lt_t offset; | ||
103 | } polling_params; | ||
104 | |||
105 | struct { | ||
106 | lt_t major_cycle_length; | ||
107 | unsigned int num_intervals; | ||
108 | struct lt_interval __user *intervals; | ||
109 | } table_driven_params; | ||
110 | }; | ||
111 | }; | ||
112 | |||
113 | /* regular sporadic task support */ | ||
114 | |||
74 | struct rt_task { | 115 | struct rt_task { |
75 | lt_t exec_cost; | 116 | lt_t exec_cost; |
76 | lt_t period; | 117 | lt_t period; |