aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus.h')
-rw-r--r--include/litmus.h57
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. */
7typedef int (*rt_fn_t)(void*); 7typedef int (*rt_fn_t)(void*);
8 8
9/* Litmus scheduling policies */
10typedef 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 */
24typedef enum { 10typedef 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 */
49pid_t gettid(void); 35pid_t gettid(void);
50 36
51/* scheduler modes */
52#define MODE_NON_RT 0
53#define MODE_RT_RUN 1
54
55spolicy sched_getpolicy(void);
56int set_rt_mode(int mode);
57int set_rt_task_param(pid_t pid, rt_param_t* param); 37int set_rt_task_param(pid_t pid, rt_param_t* param);
58int get_rt_task_param(pid_t pid, rt_param_t* param); 38int 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 */
71enum {
72 LITMUS_RESERVED_RANGE = 1024,
73} SCHED_SETUP_CMD;
74int scheduler_setup(int cmd, void* param);
75
76/* file descriptor attached shared objects support */ 49/* file descriptor attached shared objects support */
77typedef enum { 50typedef 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
83int od_openx(int fd, obj_type_t type, int obj_id, void* config); 55int 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);
100int wait_for_job_release(unsigned int job_no); 72int wait_for_job_release(unsigned int job_no);
101int sleep_next_period(void); 73int sleep_next_period(void);
102 74
103/* interruptible critical section support */
104#define MAX_ICS_NESTING 16
105#define ICS_STACK_EMPTY (-1)
106
107struct 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 */
119struct 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
128int reg_ics_cb(struct ics_cb* ics_cb);
129int start_wcs(int od);
130
131/* library functions */ 75/* library functions */
132int init_litmus(void); 76int init_litmus(void);
133int init_rt_thread(void); 77int init_rt_thread(void);
@@ -144,7 +88,6 @@ enum rt_task_mode_t {
144}; 88};
145int task_mode(int target_mode); 89int task_mode(int target_mode);
146 90
147const char* get_scheduler_name(spolicy scheduler);
148void show_rt_param(rt_param_t* tp); 91void show_rt_param(rt_param_t* tp);
149task_class_t str2class(const char* str); 92task_class_t str2class(const char* str);
150 93