aboutsummaryrefslogtreecommitdiffstats
path: root/litmus.h
diff options
context:
space:
mode:
Diffstat (limited to 'litmus.h')
-rw-r--r--litmus.h12
1 files changed, 10 insertions, 2 deletions
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);