diff options
author | John M. Calandrino <jmc@jupiter-cs.cs.unc.edu> | 2007-04-26 00:29:35 -0400 |
---|---|---|
committer | John M. Calandrino <jmc@jupiter-cs.cs.unc.edu> | 2007-04-26 00:29:35 -0400 |
commit | e8ff253be117b3f3c8761a73a3a0a250baa85da4 (patch) | |
tree | b54c2abc47475385f963d46099ec4170ed8509ad | |
parent | 90efec151bdff27b51a32e8224beccb8eaa0e342 (diff) |
Updated system calls to reflect most recent kernel, for libso.
-rw-r--r-- | litmus.c | 33 | ||||
-rw-r--r-- | litmus.h | 12 |
2 files changed, 31 insertions, 14 deletions
@@ -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 | ||
@@ -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 | ||
50 | typedef int sema_id; /* ID of a semaphore in the Linux kernel */ | 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 */ | 51 | typedef int pi_sema_id; /* ID of a PI semaphore in the Linux kernel */ |
52 | typedef int srp_sema_id; /* ID of an SRP "semaphore" in the Linux kernel */ | ||
53 | |||
54 | typedef 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); | |||
80 | int down(sema_id sem_id); | 83 | int down(sema_id sem_id); |
81 | int up(sema_id sem_id); | 84 | int up(sema_id sem_id); |
82 | int sema_free(sema_id sem_id); | 85 | int sema_free(sema_id sem_id); |
86 | int srp_sema_init(void); | ||
87 | int srp_down(srp_sema_id sem_id); | ||
88 | int srp_up(srp_sema_id sem_id); | ||
89 | int reg_task_srp_sem(srp_sema_id sem_id, pid_t t_pid); | ||
90 | int srp_sema_free(srp_sema_id sem_id); | ||
83 | 91 | ||
84 | /* library functions */ | 92 | /* library functions */ |
85 | int create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period); | 93 | int create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period); |