aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--litmus.c27
-rw-r--r--litmus.h3
2 files changed, 25 insertions, 5 deletions
diff --git a/litmus.c b/litmus.c
index 665ae64..9d67aa8 100644
--- a/litmus.c
+++ b/litmus.c
@@ -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
diff --git a/litmus.h b/litmus.h
index 8b0b88d..f46e705 100644
--- a/litmus.h
+++ b/litmus.h
@@ -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
50typedef int sema_id; /* ID of a semaphore in the Linux kernel */
51typedef 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);\