diff options
| author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-09-02 12:13:42 -0400 |
|---|---|---|
| committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2016-03-20 14:30:33 -0400 |
| commit | 095f515b2fd903a0140afcc42db9a9f76d688b65 (patch) | |
| tree | e01aec4fa42dff67cb7c448f58dba3e43453d2a0 | |
| parent | 8c9a8402595eb86d039da74d8bb884cb77368049 (diff) | |
Add reservation configuration types to rt_param.h
| -rw-r--r-- | include/litmus/rt_param.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 9d365f2b41d9..0070cbcbe21e 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 = 10, | ||
| 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 | lt_t 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; |
