summaryrefslogtreecommitdiffstats
path: root/extra.h
diff options
context:
space:
mode:
Diffstat (limited to 'extra.h')
-rw-r--r--extra.h58
1 files changed, 1 insertions, 57 deletions
diff --git a/extra.h b/extra.h
index 8c894f6..3f1df9d 100644
--- a/extra.h
+++ b/extra.h
@@ -29,13 +29,8 @@ extern int sched_getcpu();
29#include <sys/syscall.h> 29#include <sys/syscall.h>
30#endif 30#endif
31 31
32<<<<<<< HEAD
33#define LITMUS 1
34#define MC2 0
35=======
36// This is a proxy for "case study mode" now 32// This is a proxy for "case study mode" now
37#define LITMUS 0 33#define LITMUS 1
38>>>>>>> rtas20-wip
39#define MMDC_PROF 0 34#define MMDC_PROF 0
40 35
41#if LITMUS 36#if LITMUS
@@ -269,57 +264,6 @@ static void _rt_load_params_itrl(int argc, char **argv) {
269 mmdc->madpcr1 = axi_arm1;\ 264 mmdc->madpcr1 = axi_arm1;\
270 msync(&(mmdc->madpcr1),4,MS_SYNC); 265 msync(&(mmdc->madpcr1),4,MS_SYNC);
271 266
272<<<<<<< HEAD
273#define SETUP_LITMUS \
274 unsigned int wait = 0; \
275 if (be_migrate_to_domain(_rt_core) < 0) { \
276 perror("Unable to migrate to specified CPU"); \
277 exit(1); \
278 } \
279 struct rt_task rt_param; \
280 init_rt_task_param(&rt_param); \
281 /* Supposedly the next two parameters are irrelevant when reservations are enabled, but I'm leaving them anyway... */ \
282 rt_param.exec_cost = ms2ns(999); \
283 rt_param.period = ms2ns(1000); \
284 rt_param.priority = LITMUS_HIGHEST_PRIORITY; \
285 rt_param.cls = RT_CLASS_HARD; \
286 rt_param.release_policy = TASK_PERIODIC; \
287 rt_param.budget_policy = NO_ENFORCEMENT; \
288 rt_param.cpu = _rt_core; \
289 if (set_rt_task_param(gettid(), &rt_param) < 0) { \
290 perror("Unable to set real-time parameters"); \
291 exit(1); \
292 } \
293 if (init_litmus() != 0) { \
294 perror("init_litmus failed"); \
295 exit(1); \
296 } \
297 MC2_SETUP \
298 if (task_mode(LITMUS_RT_TASK) != 0) { \
299 perror("Unable to become real-time task"); \
300 exit(1); \
301 } \
302 if (wait && wait_for_ts_release() != 0) { \
303 perror("Unable to wait for taskset release"); \
304 exit(1); \
305 }
306
307#if MC2
308#define MC2_SETUP \
309
310 set_page_color(rt_param.cpu);
311#else
312#define MC2_SETUP
313#endif
314
315#define CLEANUP_LITMUS \
316 if (task_mode(BACKGROUND_TASK) != 0) { \
317 perror("Unable to become a real-time task"); \
318 exit(1); \
319 } \
320
321=======
322>>>>>>> rtas20-wip
323#if __arm__ 267#if __arm__
324// On ARM, manually flush the cache 268// On ARM, manually flush the cache
325#define FLUSH_CACHES \ 269#define FLUSH_CACHES \