blob: c9a4552b2bf3354a787a7f5f68b17d498b1f5ef1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef LITMUS_SRP_H
#define LITMUS_SRP_H
struct srp_semaphore;
struct srp_priority {
struct list_head list;
unsigned int priority;
pid_t pid;
};
#define list2prio(l) list_entry(l, struct srp_priority, list)
/* struct for uniprocessor SRP "semaphore" */
struct srp_semaphore {
struct litmus_lock litmus_lock;
struct srp_priority ceiling;
struct task_struct* owner;
int cpu; /* cpu associated with this "semaphore" and resource */
};
/* map a task to its SRP preemption level priority */
typedef unsigned int (*srp_prioritization_t)(struct task_struct* t);
/* Must be updated by each plugin that uses SRP.*/
extern srp_prioritization_t get_srp_prio;
struct srp_semaphore* allocate_srp_semaphore(void);
#endif
|