aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/litmus/litmus_proc.h38
-rw-r--r--include/litmus/sched_plugin.h6
2 files changed, 44 insertions, 0 deletions
diff --git a/include/litmus/litmus_proc.h b/include/litmus/litmus_proc.h
index 6800e725d48c..a5db24c03ec0 100644
--- a/include/litmus/litmus_proc.h
+++ b/include/litmus/litmus_proc.h
@@ -4,6 +4,22 @@
4int __init init_litmus_proc(void); 4int __init init_litmus_proc(void);
5void exit_litmus_proc(void); 5void exit_litmus_proc(void);
6 6
7struct cd_mapping
8{
9 int id;
10 cpumask_var_t mask;
11 struct proc_dir_entry *proc_file;
12};
13
14struct domain_proc_info
15{
16 int num_cpus;
17 int num_domains;
18
19 struct cd_mapping *cpu_to_domains;
20 struct cd_mapping *domain_to_cpus;
21};
22
7/* 23/*
8 * On success, returns 0 and sets the pointer to the location of the new 24 * On success, returns 0 and sets the pointer to the location of the new
9 * proc dir entry, otherwise returns an error code and sets pde to NULL. 25 * proc dir entry, otherwise returns an error code and sets pde to NULL.
@@ -17,6 +33,28 @@ long make_plugin_proc_dir(struct sched_plugin* plugin,
17 */ 33 */
18void remove_plugin_proc_dir(struct sched_plugin* plugin); 34void remove_plugin_proc_dir(struct sched_plugin* plugin);
19 35
36/*
37 * Setup the CPU <-> sched domain mappings in proc
38 */
39long activate_domain_proc(struct domain_proc_info* map);
40
41/*
42 * Remove the CPU <-> sched domain mappings from proc
43 */
44long deactivate_domain_proc(void);
45
46/*
47 * Alloc memory for the mapping
48 * Note: Does not set up proc files. Use make_sched_domain_maps for that.
49 */
50long init_domain_proc_info(struct domain_proc_info* map,
51 int num_cpus, int num_domains);
52
53/*
54 * Free memory of the mapping
55 * Note: Does not clean up proc files. Use deactivate_domain_proc for that.
56 */
57void destroy_domain_proc_info(struct domain_proc_info* map);
20 58
21/* Copy at most size-1 bytes from ubuf into kbuf, null-terminate buf, and 59/* Copy at most size-1 bytes from ubuf into kbuf, null-terminate buf, and
22 * remove a '\n' if present. Returns the number of bytes that were read or 60 * remove a '\n' if present. Returns the number of bytes that were read or
diff --git a/include/litmus/sched_plugin.h b/include/litmus/sched_plugin.h
index 0f2fe90123db..f173dca7cd65 100644
--- a/include/litmus/sched_plugin.h
+++ b/include/litmus/sched_plugin.h
@@ -16,6 +16,8 @@
16typedef long (*activate_plugin_t) (void); 16typedef long (*activate_plugin_t) (void);
17typedef long (*deactivate_plugin_t) (void); 17typedef long (*deactivate_plugin_t) (void);
18 18
19struct domain_proc_info;
20typedef long (*get_domain_proc_info_t) (struct domain_proc_info **info);
19 21
20 22
21/********************* scheduler invocation ******************/ 23/********************* scheduler invocation ******************/
@@ -69,6 +71,9 @@ typedef long (*admit_task_t)(struct task_struct* tsk);
69 71
70typedef void (*release_at_t)(struct task_struct *t, lt_t start); 72typedef void (*release_at_t)(struct task_struct *t, lt_t start);
71 73
74/************************ misc routines ***********************/
75
76
72struct sched_plugin { 77struct sched_plugin {
73 struct list_head list; 78 struct list_head list;
74 /* basic info */ 79 /* basic info */
@@ -77,6 +82,7 @@ struct sched_plugin {
77 /* setup */ 82 /* setup */
78 activate_plugin_t activate_plugin; 83 activate_plugin_t activate_plugin;
79 deactivate_plugin_t deactivate_plugin; 84 deactivate_plugin_t deactivate_plugin;
85 get_domain_proc_info_t get_domain_proc_info;
80 86
81 /* scheduler invocation */ 87 /* scheduler invocation */
82 scheduler_tick_t tick; 88 scheduler_tick_t tick;