diff options
Diffstat (limited to 'include/litmus')
-rw-r--r-- | include/litmus/litmus_proc.h | 38 |
1 files changed, 38 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 @@ | |||
4 | int __init init_litmus_proc(void); | 4 | int __init init_litmus_proc(void); |
5 | void exit_litmus_proc(void); | 5 | void exit_litmus_proc(void); |
6 | 6 | ||
7 | struct cd_mapping | ||
8 | { | ||
9 | int id; | ||
10 | cpumask_var_t mask; | ||
11 | struct proc_dir_entry *proc_file; | ||
12 | }; | ||
13 | |||
14 | struct 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 | */ |
18 | void remove_plugin_proc_dir(struct sched_plugin* plugin); | 34 | void remove_plugin_proc_dir(struct sched_plugin* plugin); |
19 | 35 | ||
36 | /* | ||
37 | * Setup the CPU <-> sched domain mappings in proc | ||
38 | */ | ||
39 | long activate_domain_proc(struct domain_proc_info* map); | ||
40 | |||
41 | /* | ||
42 | * Remove the CPU <-> sched domain mappings from proc | ||
43 | */ | ||
44 | long 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 | */ | ||
50 | long 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 | */ | ||
57 | void 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 |