From ca0daca0526998799ee9f6aa97f96668981e23f1 Mon Sep 17 00:00:00 2001 From: Namhoon Kim Date: Tue, 19 Apr 2016 13:51:20 -0400 Subject: Add support for PGM^RT --- include/litmus/rt_param.h | 21 +++++++++++++++++++++ litmus/Kconfig | 8 ++++++++ 2 files changed, 29 insertions(+) diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 998762051a6b..56de045e0898 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h @@ -51,6 +51,16 @@ typedef enum { TASK_EARLY } release_policy_t; +#ifdef CONFIG_PGMRT_SUPPORT +typedef enum { + PGM_NOT_A_NODE, + PGM_SRC, + PGM_SINK, + PGM_SRC_SINK, + PGM_INTERNAL +} pgm_node_type_t; +#endif + /* We use the common priority interpretation "lower index == higher priority", * which is commonly used in fixed-priority schedulability analysis papers. * So, a numerically lower priority value implies higher scheduling priority, @@ -122,6 +132,10 @@ struct rt_task { task_class_t cls; budget_policy_t budget_policy; /* ignored by pfair */ release_policy_t release_policy; +#ifdef CONFIG_PGMRT_SUPPORT + pgm_node_type_t pgm_type; + lt_t pgm_expected_etoe; +#endif }; union np_flag { @@ -162,6 +176,13 @@ struct control_page { uint64_t irq_syscall_start; /* Snapshot of irq_count when the syscall * started. */ +#ifdef CONFIG_PGMRT_SUPPORT + /* Flags from userspace signifying PGM wait states. */ + volatile uint32_t pgm_waiting; /* waiting for tokens */ + volatile uint32_t pgm_sending; /* sending tokens */ + volatile uint32_t pgm_satisfied; /* done waiting/sending */ +#endif + /* to be extended */ }; diff --git a/litmus/Kconfig b/litmus/Kconfig index babb43deffb5..81daf35d9432 100644 --- a/litmus/Kconfig +++ b/litmus/Kconfig @@ -372,4 +372,12 @@ config PREEMPT_STATE_TRACE endmenu +config PGMRT_SUPPORT + bool "Support for PGM^RT API" + default y + help + This option enables support for PGM^RT API. The source code of PGM^RT + can be found https://github.com/GElliott/pgm . This option adds some + variables in rt_param.h. + endmenu -- cgit v1.2.2