diff options
author | Mac Mollison <mollison@cs.unc.edu> | 2010-10-06 17:40:49 -0400 |
---|---|---|
committer | Mac Mollison <mollison@cs.unc.edu> | 2010-10-06 17:40:49 -0400 |
commit | 6a0a23e25042a74bc3af0f251ff059614b0d288e (patch) | |
tree | 311e7f5e2bf80ee87abe8a5c957b24c5a67e9fad /bin/rt_launch.c | |
parent | c5d64f7c7d5c4f9901acf8313e5a358c31125942 (diff) |
Allow rt_launch to work with sched_mcrit plugin
Diffstat (limited to 'bin/rt_launch.c')
-rw-r--r-- | bin/rt_launch.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/rt_launch.c b/bin/rt_launch.c index 3863031..5c71d01 100644 --- a/bin/rt_launch.c +++ b/bin/rt_launch.c | |||
@@ -29,11 +29,12 @@ int launch(void *task_info_p) { | |||
29 | } | 29 | } |
30 | 30 | ||
31 | void usage(char *error) { | 31 | void usage(char *error) { |
32 | fprintf(stderr, "%s\nUsage: rt_launch [-w][-v][-p cpu][-c hrt | srt | be] wcet period program [arg1 arg2 ...]\n" | 32 | fprintf(stderr, "%s\nUsage: rt_launch [-w][-v][-p cpu][-c hrt | srt | be] [-m criticality] wcet period program [arg1 arg2 ...]\n" |
33 | "\t-w\tSynchronous release\n" | 33 | "\t-w\tSynchronous release\n" |
34 | "\t-v\tVerbose\n" | 34 | "\t-v\tVerbose\n" |
35 | "\t-p\tcpu (or initial cpu)\n" | 35 | "\t-p\tcpu (or initial cpu)\n" |
36 | "\t-c\tClass\n" | 36 | "\t-c\tClass\n" |
37 | "\t-m\tCriticality\n" | ||
37 | "\twcet, period in ms\n" | 38 | "\twcet, period in ms\n" |
38 | "\tprogram to be launched\n", | 39 | "\tprogram to be launched\n", |
39 | error); | 40 | error); |
@@ -41,7 +42,7 @@ void usage(char *error) { | |||
41 | } | 42 | } |
42 | 43 | ||
43 | 44 | ||
44 | #define OPTSTR "p:c:vw" | 45 | #define OPTSTR "p:c:vwm:" |
45 | 46 | ||
46 | int main(int argc, char** argv) | 47 | int main(int argc, char** argv) |
47 | { | 48 | { |
@@ -51,6 +52,7 @@ int main(int argc, char** argv) | |||
51 | int migrate = 0; | 52 | int migrate = 0; |
52 | int cpu = 0; | 53 | int cpu = 0; |
53 | int opt; | 54 | int opt; |
55 | crit_level_t crit; | ||
54 | int verbose = 0; | 56 | int verbose = 0; |
55 | int wait = 0; | 57 | int wait = 0; |
56 | startup_info_t info; | 58 | startup_info_t info; |
@@ -68,6 +70,11 @@ int main(int argc, char** argv) | |||
68 | cpu = atoi(optarg); | 70 | cpu = atoi(optarg); |
69 | migrate = 1; | 71 | migrate = 1; |
70 | break; | 72 | break; |
73 | case 'm': | ||
74 | crit = str2crit(optarg); | ||
75 | if (crit == -1) | ||
76 | usage("Unknown criticality level."); | ||
77 | break; | ||
71 | case 'c': | 78 | case 'c': |
72 | class = str2class(optarg); | 79 | class = str2class(optarg); |
73 | if (class == -1) | 80 | if (class == -1) |
@@ -107,7 +114,7 @@ int main(int argc, char** argv) | |||
107 | if (ret < 0) | 114 | if (ret < 0) |
108 | bail_out("could not migrate to target partition"); | 115 | bail_out("could not migrate to target partition"); |
109 | } | 116 | } |
110 | ret = __create_rt_task(launch, &info, cpu, wcet, period, class); | 117 | ret = __create_rt_task(launch, &info, cpu, crit, wcet, period, class); |
111 | 118 | ||
112 | 119 | ||
113 | if (ret < 0) | 120 | if (ret < 0) |