aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn M. Calandrino <jmc@jupiter-cs.cs.unc.edu>2007-04-26 00:29:35 -0400
committerJohn M. Calandrino <jmc@jupiter-cs.cs.unc.edu>2007-04-26 00:29:35 -0400
commite8ff253be117b3f3c8761a73a3a0a250baa85da4 (patch)
treeb54c2abc47475385f963d46099ec4170ed8509ad
parent90efec151bdff27b51a32e8224beccb8eaa0e342 (diff)
Updated system calls to reflect most recent kernel, for libso.
-rw-r--r--litmus.c33
-rw-r--r--litmus.h12
2 files changed, 31 insertions, 14 deletions
diff --git a/litmus.c b/litmus.c
index 9d67aa8..2561a3c 100644
--- a/litmus.c
+++ b/litmus.c
@@ -187,26 +187,35 @@ task_class_t str2class(const char* str)
187#define __NR_down 336 187#define __NR_down 336
188#define __NR_up 337 188#define __NR_up 337
189#define __NR_sema_free 338 189#define __NR_sema_free 338
190 190#define __NR_srp_sema_init 339
191#define __NR_srp_down 340
192#define __NR_srp_up 341
193#define __NR_reg_task_srp_sem 342
194#define __NR_srp_sema_free 343
191 195
192/* Syscall stub for setting RT mode and scheduling options */ 196/* Syscall stub for setting RT mode and scheduling options */
193_syscall1(spolicy, sched_setpolicy, spolicy, arg1); 197_syscall1(spolicy, sched_setpolicy, spolicy, arg1);
194_syscall0(spolicy, sched_getpolicy); 198_syscall0(spolicy, sched_getpolicy);
195_syscall1(int, set_rt_mode, int, arg1); 199_syscall1(int, set_rt_mode, int, arg1);
196_syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1); 200_syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1);
197_syscall2(int, get_rt_task_param, pid_t, pid, rt_param_t*, arg1); 201_syscall2(int, get_rt_task_param, pid_t, pid, rt_param_t*, arg1);
198_syscall1(int, prepare_rt_task, pid_t, pid); 202_syscall1(int, prepare_rt_task, pid_t, pid);
199_syscall0(int, reset_stat); 203_syscall0(int, reset_stat);
200_syscall0(int, sleep_next_period); 204_syscall0(int, sleep_next_period);
201_syscall2(int, scheduler_setup, int, cmd, void*, param); 205_syscall2(int, scheduler_setup, int, cmd, void*, param);
202_syscall0(int, enter_np); 206_syscall0(int, enter_np);
203_syscall0(int, exit_np); 207_syscall0(int, exit_np);
204_syscall0(int, pi_sema_init); 208_syscall0(int, pi_sema_init);
205_syscall1(int, pi_down, pi_sema_id, sem_id); 209_syscall1(int, pi_down, pi_sema_id, sem_id);
206_syscall1(int, pi_up, pi_sema_id, sem_id); 210_syscall1(int, pi_up, pi_sema_id, sem_id);
207_syscall1(int, pi_sema_free, pi_sema_id, sem_id); 211_syscall1(int, pi_sema_free, pi_sema_id, sem_id);
208_syscall0(int, sema_init); 212_syscall0(int, sema_init);
209_syscall1(int, down, sema_id, sem_id); 213_syscall1(int, down, sema_id, sem_id);
210_syscall1(int, up, sema_id, sem_id); 214_syscall1(int, up, sema_id, sem_id);
211_syscall1(int, sema_free, sema_id, sem_id); 215_syscall1(int, sema_free, sema_id, sem_id);
216_syscall0(int, srp_sema_init);
217_syscall1(int, srp_down, srp_sema_id, sem_id);
218_syscall1(int, srp_up, srp_sema_id, sem_id);
219_syscall2(int, reg_task_srp_sem, srp_sema_id, sem_id, pid_t, t_pid);
220_syscall1(int, srp_sema_free, srp_sema_id, sem_id);
212 221
diff --git a/litmus.h b/litmus.h
index 7fa6ede..10ed905 100644
--- a/litmus.h
+++ b/litmus.h
@@ -47,8 +47,11 @@ 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 */ 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 */ 51typedef int pi_sema_id; /* ID of a PI semaphore in the Linux kernel */
52typedef int srp_sema_id; /* ID of an SRP "semaphore" in the Linux kernel */
53
54typedef int pid_t; /* PID of a task */
52 55
53#define set_param(t,p,e) do{\ 56#define set_param(t,p,e) do{\
54 (t).is_realtime=1;\ 57 (t).is_realtime=1;\
@@ -80,6 +83,11 @@ int sema_init(void);
80int down(sema_id sem_id); 83int down(sema_id sem_id);
81int up(sema_id sem_id); 84int up(sema_id sem_id);
82int sema_free(sema_id sem_id); 85int sema_free(sema_id sem_id);
86int srp_sema_init(void);
87int srp_down(srp_sema_id sem_id);
88int srp_up(srp_sema_id sem_id);
89int reg_task_srp_sem(srp_sema_id sem_id, pid_t t_pid);
90int srp_sema_free(srp_sema_id sem_id);
83 91
84/* library functions */ 92/* library functions */
85int create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period); 93int create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period);