diff options
Diffstat (limited to 'litmus.h')
-rw-r--r-- | litmus.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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); |