diff options
| author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-01-22 12:04:01 -0500 |
|---|---|---|
| committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2008-01-22 12:04:01 -0500 |
| commit | d9f376087182aa679b77d2bc416ade454df5dab1 (patch) | |
| tree | f6aa2878749c1f7b4d76d8a81a0b14ea6db80652 /src | |
| parent | 726fc7a6c8e8f8e1036337e1503af0cbb1bb741f (diff) | |
add set_rt_param() wrapper sporadic_task()
Diffstat (limited to 'src')
| -rw-r--r-- | src/litmus.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/litmus.c b/src/litmus.c index 6ca35a3..89d0f86 100644 --- a/src/litmus.c +++ b/src/litmus.c | |||
| @@ -218,7 +218,16 @@ task_class_t str2class(const char* str) | |||
| 218 | return -1; | 218 | return -1; |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | 221 | int sporadic_task(unsigned long e, unsigned long p, | |
| 222 | int cpu, task_class_t cls) | ||
| 223 | { | ||
| 224 | rt_param_t param; | ||
| 225 | param.exec_cost = e; | ||
| 226 | param.period = p; | ||
| 227 | param.cpu = cpu; | ||
| 228 | param.cls = cls; | ||
| 229 | return set_rt_task_param(getpid(), ¶m); | ||
| 230 | } | ||
| 222 | 231 | ||
| 223 | struct np_flag { | 232 | struct np_flag { |
| 224 | #define RT_PREEMPTIVE 0x2050 /* = NP */ | 233 | #define RT_PREEMPTIVE 0x2050 /* = NP */ |
