blob: 0c5c07ea0ef5720a4a34a658211102472e5e1051 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include <litmus/sched_plugin.h>
#include <linux/proc_fs.h>
int __init init_litmus_proc(void);
void exit_litmus_proc(void);
/*
* On success, returns 0 and sets the pointer to the location of the new
* proc dir entry, otherwise returns an error code and sets pde to NULL.
*/
long make_plugin_proc_dir(struct sched_plugin* plugin,
struct proc_dir_entry** pde);
/*
* Plugins should deallocate all child proc directory entries before
* calling this, to avoid memory leaks.
*/
void remove_plugin_proc_dir(struct sched_plugin* plugin);
/* Copy at most size-1 bytes from ubuf into kbuf, null-terminate buf, and
* remove a '\n' if present. Returns the number of bytes that were read or
* -EFAULT. */
int copy_and_chomp(char *kbuf, unsigned long ksize,
__user const char* ubuf, unsigned long ulength);
#ifdef CONFIG_LITMUS_LOCKING
struct proc_dir_entry* litmus_add_proc_lock(struct litmus_lock *l, read_proc_t func);
void litmus_remove_proc_lock(struct litmus_lock* l);
#endif
|