aboutsummaryrefslogtreecommitdiffstats
path: root/bin/rtspin.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rtspin.c')
-rw-r--r--bin/rtspin.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/rtspin.c b/bin/rtspin.c
index 167741d..5de9035 100644
--- a/bin/rtspin.c
+++ b/bin/rtspin.c
@@ -21,7 +21,7 @@ static void usage(char *error) {
21 " rt_spin [COMMON-OPTS] -f FILE [-o COLUMN] WCET PERIOD\n" 21 " rt_spin [COMMON-OPTS] -f FILE [-o COLUMN] WCET PERIOD\n"
22 " rt_spin -l\n" 22 " rt_spin -l\n"
23 "\n" 23 "\n"
24 "COMMON-OPTS = [-w] [-s SCALE]\n" 24 "COMMON-OPTS = [-w] [-s SCALE] [-n SPLIT]\n"
25 " [-p PARTITION/CLUSTER [-z CLUSTER SIZE]] [-c CLASS]\n" 25 " [-p PARTITION/CLUSTER [-z CLUSTER SIZE]] [-c CLASS]\n"
26 " [-X LOCKING-PROTOCOL] [-L CRITICAL SECTION LENGTH] [-Q RESOURCE-ID]" 26 " [-X LOCKING-PROTOCOL] [-L CRITICAL SECTION LENGTH] [-Q RESOURCE-ID]"
27 "\n" 27 "\n"
@@ -184,7 +184,7 @@ static int job(double exec_time, double program_end, int lock_od, double cs_leng
184 } 184 }
185} 185}
186 186
187#define OPTSTR "p:z:c:wlveo:f:s:q:X:L:Q:" 187#define OPTSTR "p:z:c:wlveo:f:s:q:X:L:Q:n:"
188int main(int argc, char** argv) 188int main(int argc, char** argv)
189{ 189{
190 int ret; 190 int ret;
@@ -199,6 +199,7 @@ int main(int argc, char** argv)
199 int wait = 0; 199 int wait = 0;
200 int test_loop = 0; 200 int test_loop = 0;
201 int column = 1; 201 int column = 1;
202 int split = 1;
202 const char *file = NULL; 203 const char *file = NULL;
203 int want_enforcement = 0; 204 int want_enforcement = 0;
204 double duration = 0, start = 0; 205 double duration = 0, start = 0;
@@ -222,6 +223,9 @@ int main(int argc, char** argv)
222 case 'w': 223 case 'w':
223 wait = 1; 224 wait = 1;
224 break; 225 break;
226 case 'n':
227 split = atoi(optarg);
228 break;
225 case 'p': 229 case 'p':
226 cluster = atoi(optarg); 230 cluster = atoi(optarg);
227 migrate = 1; 231 migrate = 1;
@@ -315,6 +319,8 @@ int main(int argc, char** argv)
315 "positive number."); 319 "positive number.");
316 if (period <= 0) 320 if (period <= 0)
317 usage("The period must be a positive number."); 321 usage("The period must be a positive number.");
322 if (split <= 0)
323 usage("The split factor must be a positive number, if specified.");
318 if (!file && wcet > period) { 324 if (!file && wcet > period) {
319 usage("The worst-case execution time must not " 325 usage("The worst-case execution time must not "
320 "exceed the period."); 326 "exceed the period.");
@@ -334,6 +340,7 @@ int main(int argc, char** argv)
334 init_rt_task_param(&param); 340 init_rt_task_param(&param);
335 param.exec_cost = wcet; 341 param.exec_cost = wcet;
336 param.period = period; 342 param.period = period;
343 param.split = split;
337 param.priority = priority; 344 param.priority = priority;
338 param.cls = class; 345 param.cls = class;
339 param.budget_policy = (want_enforcement) ? 346 param.budget_policy = (want_enforcement) ?