From 08acd263bc6286a1b9ccb94a0210a8a9ce91ac27 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Fri, 23 Oct 2020 03:44:40 -0400 Subject: Fix arguments for paired tasks --- extra.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'extra.h') diff --git a/extra.h b/extra.h index 4194b71..9f27a80 100644 --- a/extra.h +++ b/extra.h @@ -30,7 +30,7 @@ extern int sched_getcpu(); #endif // This is a proxy for "case study mode" now -#define LITMUS 0 +#define LITMUS 1 #define MMDC_PROF 0 #if LITMUS @@ -83,7 +83,7 @@ long unsigned int _rt_period; static void _rt_load_params_itrl(int argc, char **argv) { #ifdef PAIRED if (argc != (8 + LITMUS*2) && argc != (9 + LITMUS*2)) { - fprintf(stderr, "Usage: %s ", argv[0]); + fprintf(stderr, "Usage: %s \n", argv[0]); #else if (argc != (6 + LITMUS*2)) { fprintf(stderr, "Usage: %s \n", argv[0]); @@ -120,12 +120,12 @@ static void _rt_load_params_itrl(int argc, char **argv) { _rt_will_output = atoi(argv[7]); char *pairId; int end; - if (argc > 8) { + if (argc > 7) { pairId = argv[8]; - end = 8; + end = 9; } else { pairId = "none"; - end = 9; + end = 8; } #else _rt_other_core = "none"; @@ -204,7 +204,7 @@ static void _rt_load_params_itrl(int argc, char **argv) { #if LITMUS _rt_period = strtoul(argv[end], NULL, 10); unsigned int crit = atoi(argv[end+1]); - unsigned int wait = 1; + unsigned int wait = 0; if (be_migrate_to_domain(_rt_core) < 0) { perror("Unable to migrate to specified CPU"); exit(1); @@ -221,6 +221,7 @@ static void _rt_load_params_itrl(int argc, char **argv) { rt_param.release_policy = TASK_PERIODIC; rt_param.budget_policy = NO_ENFORCEMENT; rt_param.cpu = _rt_core; + rt_param.release_policy = TASK_PERIODIC; if (set_rt_task_param(gettid(), &rt_param) < 0) { perror("Unable to set real-time parameters"); exit(1); -- cgit v1.2.2