From e8ff253be117b3f3c8761a73a3a0a250baa85da4 Mon Sep 17 00:00:00 2001 From: "John M. Calandrino" Date: Thu, 26 Apr 2007 00:29:35 -0400 Subject: Updated system calls to reflect most recent kernel, for libso. --- litmus.c | 33 +++++++++++++++++++++------------ litmus.h | 12 ++++++++++-- 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) #define __NR_down 336 #define __NR_up 337 #define __NR_sema_free 338 - +#define __NR_srp_sema_init 339 +#define __NR_srp_down 340 +#define __NR_srp_up 341 +#define __NR_reg_task_srp_sem 342 +#define __NR_srp_sema_free 343 /* Syscall stub for setting RT mode and scheduling options */ _syscall1(spolicy, sched_setpolicy, spolicy, arg1); _syscall0(spolicy, sched_getpolicy); -_syscall1(int, set_rt_mode, int, arg1); -_syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1); -_syscall2(int, get_rt_task_param, pid_t, pid, rt_param_t*, arg1); -_syscall1(int, prepare_rt_task, pid_t, pid); +_syscall1(int, set_rt_mode, int, arg1); +_syscall2(int, set_rt_task_param, pid_t, pid, rt_param_t*, arg1); +_syscall2(int, get_rt_task_param, pid_t, pid, rt_param_t*, arg1); +_syscall1(int, prepare_rt_task, pid_t, pid); _syscall0(int, reset_stat); _syscall0(int, sleep_next_period); -_syscall2(int, scheduler_setup, int, cmd, void*, param); +_syscall2(int, scheduler_setup, int, cmd, void*, param); _syscall0(int, enter_np); _syscall0(int, exit_np); _syscall0(int, pi_sema_init); -_syscall1(int, pi_down, pi_sema_id, sem_id); -_syscall1(int, pi_up, pi_sema_id, sem_id); -_syscall1(int, pi_sema_free, pi_sema_id, sem_id); +_syscall1(int, pi_down, pi_sema_id, sem_id); +_syscall1(int, pi_up, pi_sema_id, sem_id); +_syscall1(int, pi_sema_free, pi_sema_id, sem_id); _syscall0(int, sema_init); -_syscall1(int, down, sema_id, sem_id); -_syscall1(int, up, sema_id, sem_id); -_syscall1(int, sema_free, sema_id, sem_id); +_syscall1(int, down, sema_id, sem_id); +_syscall1(int, up, sema_id, sem_id); +_syscall1(int, sema_free, sema_id, sem_id); +_syscall0(int, srp_sema_init); +_syscall1(int, srp_down, srp_sema_id, sem_id); +_syscall1(int, srp_up, srp_sema_id, sem_id); +_syscall2(int, reg_task_srp_sem, srp_sema_id, sem_id, pid_t, t_pid); +_syscall1(int, srp_sema_free, srp_sema_id, sem_id); 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 { task_class_t cls; } rt_param_t; -typedef int sema_id; /* ID of a semaphore in the Linux kernel */ -typedef int pi_sema_id; /* ID of a PI semaphore in the Linux kernel */ +typedef int sema_id; /* ID of a semaphore in the Linux kernel */ +typedef int pi_sema_id; /* ID of a PI semaphore in the Linux kernel */ +typedef int srp_sema_id; /* ID of an SRP "semaphore" in the Linux kernel */ + +typedef int pid_t; /* PID of a task */ #define set_param(t,p,e) do{\ (t).is_realtime=1;\ @@ -80,6 +83,11 @@ int sema_init(void); int down(sema_id sem_id); int up(sema_id sem_id); int sema_free(sema_id sem_id); +int srp_sema_init(void); +int srp_down(srp_sema_id sem_id); +int srp_up(srp_sema_id sem_id); +int reg_task_srp_sem(srp_sema_id sem_id, pid_t t_pid); +int srp_sema_free(srp_sema_id sem_id); /* library functions */ int create_rt_task(rt_fn_t rt_prog, void *arg, int cpu, int wcet, int period); -- cgit v1.2.2