diff options
-rw-r--r-- | litmus.c | 27 | ||||
-rw-r--r-- | litmus.h | 3 |
2 files changed, 25 insertions, 5 deletions
@@ -179,17 +179,34 @@ task_class_t str2class(const char* str) | |||
179 | #define __NR_scheduler_setup 328 | 179 | #define __NR_scheduler_setup 328 |
180 | #define __NR_enter_np 329 | 180 | #define __NR_enter_np 329 |
181 | #define __NR_exit_np 330 | 181 | #define __NR_exit_np 330 |
182 | #define __NR_pi_sema_init 331 | ||
183 | #define __NR_pi_down 332 | ||
184 | #define __NR_pi_up 333 | ||
185 | #define __NR_pi_sema_free 334 | ||
186 | #define __NR_sema_init 335 | ||
187 | #define __NR_down 336 | ||
188 | #define __NR_up 337 | ||
189 | #define __NR_sema_free 338 | ||
182 | 190 | ||
183 | 191 | ||
184 | /* Syscall stub for setting RT mode and scheduling options */ | 192 | /* Syscall stub for setting RT mode and scheduling options */ |
185 | _syscall1(spolicy, sched_setpolicy, spolicy, arg1); | 193 | _syscall1(spolicy, sched_setpolicy, spolicy, arg1); |
186 | _syscall0(spolicy, sched_getpolicy); | 194 | _syscall0(spolicy, sched_getpolicy); |
187 | _syscall1(int, set_rt_mode, int, arg1); | 195 | _syscall1(int, set_rt_mode, int, arg1); |
188 | _syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1); | 196 | _syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1); |
189 | _syscall2(int, get_rt_task_param, pid_t, pid, rt_param_t*, arg1); | 197 | _syscall2(int, get_rt_task_param, pid_t, pid, rt_param_t*, arg1); |
190 | _syscall1(int, prepare_rt_task, pid_t, pid); | 198 | _syscall1(int, prepare_rt_task, pid_t, pid); |
191 | _syscall0(int, reset_stat); | 199 | _syscall0(int, reset_stat); |
192 | _syscall0(int, sleep_next_period); | 200 | _syscall0(int, sleep_next_period); |
193 | _syscall2(int, scheduler_setup, int, cmd, void*, param); | 201 | _syscall2(int, scheduler_setup, int, cmd, void*, param); |
194 | _syscall0(int, enter_np); | 202 | _syscall0(int, enter_np); |
195 | _syscall0(int, exit_np); | 203 | _syscall0(int, exit_np); |
204 | _syscall0(int, pi_sema_init); | ||
205 | _syscall1(int, pi_down, pi_sema_id, sem_id); | ||
206 | _syscall1(int, pi_up, pi_sema_id, sem_id); | ||
207 | _syscall1(int, pi_sema_free, pi_sema_id, sem_id); | ||
208 | _syscall0(int, sema_init); | ||
209 | _syscall1(int, down, sema_id, sem_id); | ||
210 | _syscall1(int, up, sema_id, sem_id); | ||
211 | _syscall1(int, sema_free, sema_id, sem_id); | ||
212 | |||
@@ -47,6 +47,9 @@ typedef struct rt_param { | |||
47 | task_class_t cls; | 47 | task_class_t cls; |
48 | } rt_param_t; | 48 | } rt_param_t; |
49 | 49 | ||
50 | typedef int sema_id; /* ID of a semaphore in the Linux kernel */ | ||
51 | typedef int pi_sema_id; /* ID of a PI semaphore in the Linux kernel */ | ||
52 | |||
50 | #define set_param(t,p,e) do{\ | 53 | #define set_param(t,p,e) do{\ |
51 | (t).is_realtime=1;\ | 54 | (t).is_realtime=1;\ |
52 | (t).exec_cost=(e);\ | 55 | (t).exec_cost=(e);\ |