aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2011-09-24 19:23:25 -0400
committerChristopher Kenna <cjk@cs.unc.edu>2011-09-24 19:23:25 -0400
commitbe37a04426a806099b4084452fe4275db5254fea (patch)
treefae6fc6e48b408ab108988bd82cabbc040f9307a /include
parentd1e50b511a6586da696ef5a61ed18818b8139b67 (diff)
Check point commit for merging CE with MC plugin.
Also started to fix typos in Jonathan's code, but there were too many after I realized that event_group.o was not in the LITMUS Makefile.
Diffstat (limited to 'include')
-rw-r--r--include/litmus/event_group.h6
-rw-r--r--include/litmus/sched_mc.h29
2 files changed, 30 insertions, 5 deletions
diff --git a/include/litmus/event_group.h b/include/litmus/event_group.h
index 10b60fab2a8f..f17631e4e230 100644
--- a/include/litmus/event_group.h
+++ b/include/litmus/event_group.h
@@ -12,8 +12,8 @@ typedef struct event_group {
12 lt_t res; 12 lt_t res;
13 int cpu; 13 int cpu;
14 struct list_head event_queue[EVENT_QUEUE_SLOTS]; 14 struct list_head event_queue[EVENT_QUEUE_SLOTS];
15 raw_spin_lock_t queue_lock; 15 raw_spinlock_t queue_lock;
16} timer_group_t; 16} event_group_t;
17 17
18/** 18/**
19 * event_list_t - A group of actions to fire at a given time 19 * event_list_t - A group of actions to fire at a given time
@@ -27,7 +27,7 @@ typedef struct event_list {
27 struct hrtimer_start_on_info info; 27 struct hrtimer_start_on_info info;
28 28
29 struct list_head list; /* For event_queue */ 29 struct list_head list; /* For event_queue */
30 timer_group_t* group; /* For callback */ 30 event_group_t *group; /* For callback */
31} event_list_t; 31} event_list_t;
32 32
33/** 33/**
diff --git a/include/litmus/sched_mc.h b/include/litmus/sched_mc.h
index d29796298701..95cd22cd7202 100644
--- a/include/litmus/sched_mc.h
+++ b/include/litmus/sched_mc.h
@@ -1,8 +1,6 @@
1#ifndef _LINUX_SCHED_MC_H_ 1#ifndef _LINUX_SCHED_MC_H_
2#define _LINUX_SCHED_MC_H_ 2#define _LINUX_SCHED_MC_H_
3 3
4#include <litmus/rt_param.h>
5
6/* criticality levels */ 4/* criticality levels */
7enum crit_level { 5enum crit_level {
8 /* probably don't need to assign these (paranoid) */ 6 /* probably don't need to assign these (paranoid) */
@@ -34,6 +32,33 @@ struct mc_data {
34#define tsk_mc_crit(t) (tsk_mc_data(t)->mc_task.crit) 32#define tsk_mc_crit(t) (tsk_mc_data(t)->mc_task.crit)
35#define is_ghost(t) (tsk_mc_data(t)->mc_job.is_ghost) 33#define is_ghost(t) (tsk_mc_data(t)->mc_job.is_ghost)
36 34
35/*
36 * Cache the budget along with the struct PID for a task so that we don't need
37 * to fetch its task_struct every time we check to see what should be
38 * scheduled.
39 */
40struct ce_dom_pid_entry {
41 struct pid *pid;
42 lt_t budget;
43 /* accumulated (summed) budgets, including this one */
44 lt_t acc_time;
45 int expected_job;
46};
47
48struct ce_dom_data {
49 int cpu;
50 struct task_struct *scheduled, *should_schedule;
51 /*
52 * Each CPU needs a mapping of level A ID (integer) to struct pid so
53 * that we can get its task struct.
54 */
55 struct ce_dom_pid_entry pid_entries[CONFIG_PLUGIN_MC_LEVEL_A_MAX_TASKS];
56 int num_pid_entries;
57 lt_t cycle_time;
58 struct hrtimer_start_on_info timer_info;
59 struct hrtimer timer;
60};
61
37#endif /* __KERNEL__ */ 62#endif /* __KERNEL__ */
38 63
39#endif 64#endif