diff options
Diffstat (limited to 'include/litmus.h')
-rw-r--r-- | include/litmus.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/include/litmus.h b/include/litmus.h index c3cd51d..8918ae9 100644 --- a/include/litmus.h +++ b/include/litmus.h | |||
@@ -6,20 +6,6 @@ | |||
6 | /* A real-time program. */ | 6 | /* A real-time program. */ |
7 | typedef int (*rt_fn_t)(void*); | 7 | typedef int (*rt_fn_t)(void*); |
8 | 8 | ||
9 | /* Litmus scheduling policies */ | ||
10 | typedef enum { | ||
11 | SCHED_LINUX = 0, | ||
12 | SCHED_PFAIR = 1, | ||
13 | SCHED_PART_EDF = 3, | ||
14 | SCHED_GLOBAL_EDF = 5, | ||
15 | SCHED_PFAIR_DESYNC = 6, | ||
16 | SCHED_GLOBAL_EDF_NP = 7, | ||
17 | SCHED_EDF_HSB = 9, | ||
18 | SCHED_GSN_EDF = 10, | ||
19 | SCHED_PSN_EDF = 11, | ||
20 | SCHED_ADAPTIVE = 12, | ||
21 | } spolicy; | ||
22 | |||
23 | /* different types of clients */ | 9 | /* different types of clients */ |
24 | typedef enum { | 10 | typedef enum { |
25 | RT_CLASS_HARD, | 11 | RT_CLASS_HARD, |
@@ -48,12 +34,6 @@ typedef int pid_t; /* PID of a task */ | |||
48 | /* obtain the PID of a thread */ | 34 | /* obtain the PID of a thread */ |
49 | pid_t gettid(void); | 35 | pid_t gettid(void); |
50 | 36 | ||
51 | /* scheduler modes */ | ||
52 | #define MODE_NON_RT 0 | ||
53 | #define MODE_RT_RUN 1 | ||
54 | |||
55 | spolicy sched_getpolicy(void); | ||
56 | int set_rt_mode(int mode); | ||
57 | int set_rt_task_param(pid_t pid, rt_param_t* param); | 37 | int set_rt_task_param(pid_t pid, rt_param_t* param); |
58 | int get_rt_task_param(pid_t pid, rt_param_t* param); | 38 | int get_rt_task_param(pid_t pid, rt_param_t* param); |
59 | 39 | ||
@@ -66,18 +46,10 @@ int sporadic_task(unsigned long exec_cost, unsigned long period, | |||
66 | #define sporadic_partitioned(e, p, cpu) \ | 46 | #define sporadic_partitioned(e, p, cpu) \ |
67 | sporadic_task(e, p, cpu, RT_CLASS_SOFT) | 47 | sporadic_task(e, p, cpu, RT_CLASS_SOFT) |
68 | 48 | ||
69 | |||
70 | /* deprecated */ | ||
71 | enum { | ||
72 | LITMUS_RESERVED_RANGE = 1024, | ||
73 | } SCHED_SETUP_CMD; | ||
74 | int scheduler_setup(int cmd, void* param); | ||
75 | |||
76 | /* file descriptor attached shared objects support */ | 49 | /* file descriptor attached shared objects support */ |
77 | typedef enum { | 50 | typedef enum { |
78 | PI_SEM = 0, | 51 | PI_SEM = 0, |
79 | SRP_SEM = 1, | 52 | SRP_SEM = 1, |
80 | ICS_ID = 2, | ||
81 | } obj_type_t; | 53 | } obj_type_t; |
82 | 54 | ||
83 | int od_openx(int fd, obj_type_t type, int obj_id, void* config); | 55 | int od_openx(int fd, obj_type_t type, int obj_id, void* config); |
@@ -100,34 +72,6 @@ int get_job_no(unsigned int* job_no); | |||
100 | int wait_for_job_release(unsigned int job_no); | 72 | int wait_for_job_release(unsigned int job_no); |
101 | int sleep_next_period(void); | 73 | int sleep_next_period(void); |
102 | 74 | ||
103 | /* interruptible critical section support */ | ||
104 | #define MAX_ICS_NESTING 16 | ||
105 | #define ICS_STACK_EMPTY (-1) | ||
106 | |||
107 | struct ics_descriptor { | ||
108 | /* ICS id, only read by kernel */ | ||
109 | int id; | ||
110 | /* rollback program counter, only read by kernel */ | ||
111 | void* pc; | ||
112 | /* rollback stack pointer, not used by kernel */ | ||
113 | void* sp; | ||
114 | /* retry flag, not used by kernel */ | ||
115 | int* retry; | ||
116 | }; | ||
117 | |||
118 | /* ICS control block */ | ||
119 | struct ics_cb { | ||
120 | /* Points to the top-most valid entry. | ||
121 | * -1 indicates an empty stack. | ||
122 | * Read and written by kernel. | ||
123 | */ | ||
124 | int top; | ||
125 | struct ics_descriptor ics_stack[MAX_ICS_NESTING]; | ||
126 | }; | ||
127 | |||
128 | int reg_ics_cb(struct ics_cb* ics_cb); | ||
129 | int start_wcs(int od); | ||
130 | |||
131 | /* library functions */ | 75 | /* library functions */ |
132 | int init_litmus(void); | 76 | int init_litmus(void); |
133 | int init_rt_thread(void); | 77 | int init_rt_thread(void); |
@@ -144,7 +88,6 @@ enum rt_task_mode_t { | |||
144 | }; | 88 | }; |
145 | int task_mode(int target_mode); | 89 | int task_mode(int target_mode); |
146 | 90 | ||
147 | const char* get_scheduler_name(spolicy scheduler); | ||
148 | void show_rt_param(rt_param_t* tp); | 91 | void show_rt_param(rt_param_t* tp); |
149 | task_class_t str2class(const char* str); | 92 | task_class_t str2class(const char* str); |
150 | 93 | ||