From 095f515b2fd903a0140afcc42db9a9f76d688b65 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Wed, 2 Sep 2015 18:13:42 +0200 Subject: Add reservation configuration types to rt_param.h --- include/litmus/rt_param.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) 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 { #define LITMUS_MAX_PRIORITY 512 #define LITMUS_HIGHEST_PRIORITY 1 #define LITMUS_LOWEST_PRIORITY (LITMUS_MAX_PRIORITY - 1) +#define LITMUS_NO_PRIORITY UINT_MAX /* Provide generic comparison macros for userspace, * in case that we change this later. */ @@ -71,6 +72,46 @@ typedef enum { ((p) >= LITMUS_HIGHEST_PRIORITY && \ (p) <= LITMUS_LOWEST_PRIORITY) +/* reservation support */ + +typedef enum { + PERIODIC_POLLING = 10, + SPORADIC_POLLING, + TABLE_DRIVEN, +} reservation_type_t; + +struct lt_interval { + lt_t start; + lt_t end; +}; + +#ifndef __KERNEL__ +#define __user +#endif + +struct reservation_config { + unsigned int id; + lt_t priority; + int cpu; + + union { + struct { + lt_t period; + lt_t budget; + lt_t relative_deadline; + lt_t offset; + } polling_params; + + struct { + lt_t major_cycle_length; + unsigned int num_intervals; + struct lt_interval __user *intervals; + } table_driven_params; + }; +}; + +/* regular sporadic task support */ + struct rt_task { lt_t exec_cost; lt_t period; -- cgit v1.2.2