diff options
author | Namhoon Kim <namhoonk@cs.unc.edu> | 2016-04-19 13:51:20 -0400 |
---|---|---|
committer | Namhoon Kim <namhoonk@cs.unc.edu> | 2016-04-19 13:51:20 -0400 |
commit | ca0daca0526998799ee9f6aa97f96668981e23f1 (patch) | |
tree | f1d1bcb9fb556b993dbdf8f6f345e5cffa13f459 | |
parent | e249dc389530a3e709393f735edde22214fdf1d8 (diff) |
Add support for PGM^RT
-rw-r--r-- | include/litmus/rt_param.h | 21 | ||||
-rw-r--r-- | litmus/Kconfig | 8 |
2 files changed, 29 insertions, 0 deletions
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 { | |||
51 | TASK_EARLY | 51 | TASK_EARLY |
52 | } release_policy_t; | 52 | } release_policy_t; |
53 | 53 | ||
54 | #ifdef CONFIG_PGMRT_SUPPORT | ||
55 | typedef enum { | ||
56 | PGM_NOT_A_NODE, | ||
57 | PGM_SRC, | ||
58 | PGM_SINK, | ||
59 | PGM_SRC_SINK, | ||
60 | PGM_INTERNAL | ||
61 | } pgm_node_type_t; | ||
62 | #endif | ||
63 | |||
54 | /* We use the common priority interpretation "lower index == higher priority", | 64 | /* We use the common priority interpretation "lower index == higher priority", |
55 | * which is commonly used in fixed-priority schedulability analysis papers. | 65 | * which is commonly used in fixed-priority schedulability analysis papers. |
56 | * So, a numerically lower priority value implies higher scheduling priority, | 66 | * So, a numerically lower priority value implies higher scheduling priority, |
@@ -122,6 +132,10 @@ struct rt_task { | |||
122 | task_class_t cls; | 132 | task_class_t cls; |
123 | budget_policy_t budget_policy; /* ignored by pfair */ | 133 | budget_policy_t budget_policy; /* ignored by pfair */ |
124 | release_policy_t release_policy; | 134 | release_policy_t release_policy; |
135 | #ifdef CONFIG_PGMRT_SUPPORT | ||
136 | pgm_node_type_t pgm_type; | ||
137 | lt_t pgm_expected_etoe; | ||
138 | #endif | ||
125 | }; | 139 | }; |
126 | 140 | ||
127 | union np_flag { | 141 | union np_flag { |
@@ -162,6 +176,13 @@ struct control_page { | |||
162 | uint64_t irq_syscall_start; /* Snapshot of irq_count when the syscall | 176 | uint64_t irq_syscall_start; /* Snapshot of irq_count when the syscall |
163 | * started. */ | 177 | * started. */ |
164 | 178 | ||
179 | #ifdef CONFIG_PGMRT_SUPPORT | ||
180 | /* Flags from userspace signifying PGM wait states. */ | ||
181 | volatile uint32_t pgm_waiting; /* waiting for tokens */ | ||
182 | volatile uint32_t pgm_sending; /* sending tokens */ | ||
183 | volatile uint32_t pgm_satisfied; /* done waiting/sending */ | ||
184 | #endif | ||
185 | |||
165 | /* to be extended */ | 186 | /* to be extended */ |
166 | }; | 187 | }; |
167 | 188 | ||
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 | |||
372 | 372 | ||
373 | endmenu | 373 | endmenu |
374 | 374 | ||
375 | config PGMRT_SUPPORT | ||
376 | bool "Support for PGM^RT API" | ||
377 | default y | ||
378 | help | ||
379 | This option enables support for PGM^RT API. The source code of PGM^RT | ||
380 | can be found https://github.com/GElliott/pgm . This option adds some | ||
381 | variables in rt_param.h. | ||
382 | |||
375 | endmenu | 383 | endmenu |