aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2010-10-19 10:05:36 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-10-19 10:05:36 -0400
commitc3566e210d4e466e97d84d4a190760c4e91766ac (patch)
treebd3c1a64f290beb5d886a0171fd1deaf4581bfef
parentbe6bf3ca538405037fb04ee2584ea57435c9770b (diff)
rtspin: add -e option to enable PRECISE_ENFORCEMENT2010.2
Useful to test how the kernel handles PRECISE_ENFORCEMENT.
-rw-r--r--bin/rtspin.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/rtspin.c b/bin/rtspin.c
index f291869..33919b1 100644
--- a/bin/rtspin.c
+++ b/bin/rtspin.c
@@ -133,7 +133,7 @@ static int job(double exec_time)
133 return 0; 133 return 0;
134} 134}
135 135
136#define OPTSTR "p:c:wld:v" 136#define OPTSTR "p:c:wld:ve"
137 137
138int main(int argc, char** argv) 138int main(int argc, char** argv)
139{ 139{
@@ -148,6 +148,7 @@ int main(int argc, char** argv)
148 int test_loop = 0; 148 int test_loop = 0;
149 int skip_config = 0; 149 int skip_config = 0;
150 int verbose = 0; 150 int verbose = 0;
151 int want_enforcement = 0;
151 double duration, start; 152 double duration, start;
152 task_class_t class = RT_CLASS_HARD; 153 task_class_t class = RT_CLASS_HARD;
153 154
@@ -167,6 +168,9 @@ int main(int argc, char** argv)
167 if (class == -1) 168 if (class == -1)
168 usage("Unknown task class."); 169 usage("Unknown task class.");
169 break; 170 break;
171 case 'e':
172 want_enforcement = 1;
173 break;
170 case 'l': 174 case 'l':
171 test_loop = 1; 175 test_loop = 1;
172 break; 176 break;
@@ -221,7 +225,10 @@ int main(int argc, char** argv)
221 bail_out("could not migrate to target partition"); 225 bail_out("could not migrate to target partition");
222 } 226 }
223 227
224 ret = sporadic_task_ns(wcet, period, 0, cpu, class, NO_ENFORCEMENT, migrate); 228 ret = sporadic_task_ns(wcet, period, 0, cpu, class,
229 want_enforcement ? PRECISE_ENFORCEMENT
230 : NO_ENFORCEMENT,
231 migrate);
225 232
226 if (ret < 0) 233 if (ret < 0)
227 bail_out("could not setup rt task params"); 234 bail_out("could not setup rt task params");