aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-02-02 02:10:46 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-02-02 02:10:46 -0500
commitdb33c3290ce4b1c727dd88eb7ffae336fd893f47 (patch)
treedea3495f7e15aa64116862d98c9e2d14472fe3bb /include/linux
parent568001b3e0cf8c5d6a836072476a547e201a6300 (diff)
litmus: rip out the concept of RT_MODE.
It also rips out scheduler_setup(). This patch is very invasive and only compile-tested.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/litmus.h17
-rw-r--r--include/linux/sched_plugin.h8
2 files changed, 2 insertions, 23 deletions
diff --git a/include/linux/litmus.h b/include/linux/litmus.h
index 90ed164d4d..8f2a174fae 100644
--- a/include/linux/litmus.h
+++ b/include/linux/litmus.h
@@ -25,19 +25,12 @@ typedef enum {
25 25
26} sched_setup_cmd_t; 26} sched_setup_cmd_t;
27 27
28/* System-wide runtime modes */
29enum rt_mode_t {
30 MODE_NON_RT = 0,
31 MODE_RT_RUN = 1
32};
33
34/* per-task modes */ 28/* per-task modes */
35enum rt_task_mode_t { 29enum rt_task_mode_t {
36 BACKGROUND_TASK = 0, 30 BACKGROUND_TASK = 0,
37 LITMUS_RT_TASK = 1 31 LITMUS_RT_TASK = 1
38}; 32};
39 33
40
41/* Plugin boot options, for convenience */ 34/* Plugin boot options, for convenience */
42#define PLUGIN_LINUX "linux" 35#define PLUGIN_LINUX "linux"
43#define PLUGIN_GSN_EDF "gsn_edf" 36#define PLUGIN_GSN_EDF "gsn_edf"
@@ -48,12 +41,6 @@ extern spolicy sched_policy;
48/* RT mode start time */ 41/* RT mode start time */
49extern volatile unsigned long rt_start_time; 42extern volatile unsigned long rt_start_time;
50 43
51/* Here we store the current mode of the system */
52extern atomic_t rt_mode;
53
54#define get_rt_mode() (atomic_read(&rt_mode))
55#define set_rt_mode(a) atomic_set(&rt_mode,(a))
56
57#define TRACE(fmt, args...) \ 44#define TRACE(fmt, args...) \
58 sched_trace_log_message("%d: " fmt, raw_smp_processor_id(), ## args) 45 sched_trace_log_message("%d: " fmt, raw_smp_processor_id(), ## args)
59 46
@@ -66,10 +53,10 @@ extern atomic_t rt_mode;
66#define TRACE_BUG_ON(cond) \ 53#define TRACE_BUG_ON(cond) \
67 do { if (cond) TRACE("BUG_ON(%s) at %s:%d " \ 54 do { if (cond) TRACE("BUG_ON(%s) at %s:%d " \
68 "called from %p current=%s/%d state=%d " \ 55 "called from %p current=%s/%d state=%d " \
69 "flags=%x mode=%d partition=%d cpu=%d rtflags=%d"\ 56 "flags=%x partition=%d cpu=%d rtflags=%d"\
70 " job=%u knp=%d timeslice=%u\n", \ 57 " job=%u knp=%d timeslice=%u\n", \
71 #cond, __FILE__, __LINE__, __builtin_return_address(0), current->comm, \ 58 #cond, __FILE__, __LINE__, __builtin_return_address(0), current->comm, \
72 current->pid, current->state, current->flags, get_rt_mode(), \ 59 current->pid, current->state, current->flags, \
73 get_partition(current), smp_processor_id(), get_rt_flags(current), \ 60 get_partition(current), smp_processor_id(), get_rt_flags(current), \
74 current->rt_param.times.job_no, current->rt_param.kernel_np, \ 61 current->rt_param.times.job_no, current->rt_param.kernel_np, \
75 current->time_slice\ 62 current->time_slice\
diff --git a/include/linux/sched_plugin.h b/include/linux/sched_plugin.h
index 30d3bd6b48..6bc2fc3788 100644
--- a/include/linux/sched_plugin.h
+++ b/include/linux/sched_plugin.h
@@ -86,18 +86,11 @@ typedef long (*pi_block_t) (struct pi_semaphore *sem, struct task_struct *t);
86/* This function causes the caller to sleep until the next release */ 86/* This function causes the caller to sleep until the next release */
87typedef long (*sleep_next_period_t) (void); 87typedef long (*sleep_next_period_t) (void);
88 88
89typedef int (*scheduler_setup_t) (int cmd, void __user *parameter);
90
91typedef int (*mode_change_t) (int);
92
93struct sched_plugin { 89struct sched_plugin {
94 struct list_head list; 90 struct list_head list;
95 /* basic info */ 91 /* basic info */
96 char *plugin_name; 92 char *plugin_name;
97 93
98 /* management interface */
99 mode_change_t mode_change;
100
101 /* scheduler invocation */ 94 /* scheduler invocation */
102 scheduler_tick_t scheduler_tick; 95 scheduler_tick_t scheduler_tick;
103 schedule_t schedule; 96 schedule_t schedule;
@@ -105,7 +98,6 @@ struct sched_plugin {
105 98
106 /* syscall backend */ 99 /* syscall backend */
107 sleep_next_period_t sleep_next_period; 100 sleep_next_period_t sleep_next_period;
108 scheduler_setup_t scheduler_setup;
109 101
110 /* task state changes */ 102 /* task state changes */
111 prepare_task_t prepare_task; 103 prepare_task_t prepare_task;