diff options
| author | Jeremy Erickson <jerickso@cs.unc.edu> | 2011-01-22 21:27:09 -0500 |
|---|---|---|
| committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2011-01-22 21:27:09 -0500 |
| commit | 95992f287406fe7db96431b912e41d81acbbbf66 (patch) | |
| tree | 90aa3e611aa88bfb77b1a5696c5146c3530f3dba /bin/rtspin.c | |
| parent | 4a2b128f0db282896552ba3dc311c0241ea819e4 (diff) | |
Added crit
Diffstat (limited to 'bin/rtspin.c')
| -rw-r--r-- | bin/rtspin.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/rtspin.c b/bin/rtspin.c index 01855ab..5c5d8aa 100644 --- a/bin/rtspin.c +++ b/bin/rtspin.c | |||
| @@ -152,7 +152,7 @@ static int job(double exec_time, double program_end) | |||
| 152 | } | 152 | } |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | #define OPTSTR "p:c:wld:veo:f:s:" | 155 | #define OPTSTR "p:c:wld:veo:f:s:m:" |
| 156 | 156 | ||
| 157 | int main(int argc, char** argv) | 157 | int main(int argc, char** argv) |
| 158 | { | 158 | { |
| @@ -163,6 +163,7 @@ int main(int argc, char** argv) | |||
| 163 | int migrate = 0; | 163 | int migrate = 0; |
| 164 | int cpu = 0; | 164 | int cpu = 0; |
| 165 | int opt; | 165 | int opt; |
| 166 | int crit = CRIT_LEVEL_B; | ||
| 166 | int wait = 0; | 167 | int wait = 0; |
| 167 | int column = 1; | 168 | int column = 1; |
| 168 | const char *file = NULL; | 169 | const char *file = NULL; |
| @@ -187,6 +188,11 @@ int main(int argc, char** argv) | |||
| 187 | if (class == -1) | 188 | if (class == -1) |
| 188 | usage("Unknown task class."); | 189 | usage("Unknown task class."); |
| 189 | break; | 190 | break; |
| 191 | case 'm': | ||
| 192 | crit = str2crit(optarg); | ||
| 193 | if (crit == -1) | ||
| 194 | usage("Unknown criticality level."); | ||
| 195 | break; | ||
| 190 | case 'e': | 196 | case 'e': |
| 191 | want_enforcement = 1; | 197 | want_enforcement = 1; |
| 192 | break; | 198 | break; |
| @@ -257,7 +263,7 @@ int main(int argc, char** argv) | |||
| 257 | ret = sporadic_task_ns(wcet, period, 0, cpu, class, | 263 | ret = sporadic_task_ns(wcet, period, 0, cpu, class, |
| 258 | want_enforcement ? PRECISE_ENFORCEMENT | 264 | want_enforcement ? PRECISE_ENFORCEMENT |
| 259 | : NO_ENFORCEMENT, | 265 | : NO_ENFORCEMENT, |
| 260 | migrate); | 266 | migrate, crit); |
| 261 | if (ret < 0) | 267 | if (ret < 0) |
| 262 | bail_out("could not setup rt task params"); | 268 | bail_out("could not setup rt task params"); |
| 263 | 269 | ||
