summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2020-10-23 03:44:40 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2020-10-23 03:44:40 -0400
commit08acd263bc6286a1b9ccb94a0210a8a9ce91ac27 (patch)
tree3012bb0dacd1b25c9ae32c934dc060fd6d3e6d0c
parent915023773323b23671172c0b539e859e203756df (diff)
Fix arguments for paired tasks
-rw-r--r--extra.h13
1 files changed, 7 insertions, 6 deletions
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();
30#endif 30#endif
31 31
32// This is a proxy for "case study mode" now 32// This is a proxy for "case study mode" now
33#define LITMUS 0 33#define LITMUS 1
34#define MMDC_PROF 0 34#define MMDC_PROF 0
35 35
36#if LITMUS 36#if LITMUS
@@ -83,7 +83,7 @@ long unsigned int _rt_period;
83static void _rt_load_params_itrl(int argc, char **argv) { 83static void _rt_load_params_itrl(int argc, char **argv) {
84#ifdef PAIRED 84#ifdef PAIRED
85 if (argc != (8 + LITMUS*2) && argc != (9 + LITMUS*2)) { 85 if (argc != (8 + LITMUS*2) && argc != (9 + LITMUS*2)) {
86 fprintf(stderr, "Usage: %s <name> <loops> <my core> <other core> <other name> <runID> <save results?>", argv[0]); 86 fprintf(stderr, "Usage: %s <name> <loops> <my core> <other core> <other name> <runID> <save results?>\n", argv[0]);
87#else 87#else
88 if (argc != (6 + LITMUS*2)) { 88 if (argc != (6 + LITMUS*2)) {
89 fprintf(stderr, "Usage: %s <name> <loops> <my core> <runID> <save results?>\n", argv[0]); 89 fprintf(stderr, "Usage: %s <name> <loops> <my core> <runID> <save results?>\n", argv[0]);
@@ -120,12 +120,12 @@ static void _rt_load_params_itrl(int argc, char **argv) {
120 _rt_will_output = atoi(argv[7]); 120 _rt_will_output = atoi(argv[7]);
121 char *pairId; 121 char *pairId;
122 int end; 122 int end;
123 if (argc > 8) { 123 if (argc > 7) {
124 pairId = argv[8]; 124 pairId = argv[8];
125 end = 8; 125 end = 9;
126 } else { 126 } else {
127 pairId = "none"; 127 pairId = "none";
128 end = 9; 128 end = 8;
129 } 129 }
130#else 130#else
131 _rt_other_core = "none"; 131 _rt_other_core = "none";
@@ -204,7 +204,7 @@ static void _rt_load_params_itrl(int argc, char **argv) {
204#if LITMUS 204#if LITMUS
205 _rt_period = strtoul(argv[end], NULL, 10); 205 _rt_period = strtoul(argv[end], NULL, 10);
206 unsigned int crit = atoi(argv[end+1]); 206 unsigned int crit = atoi(argv[end+1]);
207 unsigned int wait = 1; 207 unsigned int wait = 0;
208 if (be_migrate_to_domain(_rt_core) < 0) { 208 if (be_migrate_to_domain(_rt_core) < 0) {
209 perror("Unable to migrate to specified CPU"); 209 perror("Unable to migrate to specified CPU");
210 exit(1); 210 exit(1);
@@ -221,6 +221,7 @@ static void _rt_load_params_itrl(int argc, char **argv) {
221 rt_param.release_policy = TASK_PERIODIC; 221 rt_param.release_policy = TASK_PERIODIC;
222 rt_param.budget_policy = NO_ENFORCEMENT; 222 rt_param.budget_policy = NO_ENFORCEMENT;
223 rt_param.cpu = _rt_core; 223 rt_param.cpu = _rt_core;
224 rt_param.release_policy = TASK_PERIODIC;
224 if (set_rt_task_param(gettid(), &rt_param) < 0) { 225 if (set_rt_task_param(gettid(), &rt_param) < 0) {
225 perror("Unable to set real-time parameters"); 226 perror("Unable to set real-time parameters");
226 exit(1); 227 exit(1);