-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrrnotify.h
64 lines (47 loc) · 1.76 KB
/
rrnotify.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* @file rrnotify.h
*
* @remark Copyright (C) 2006-2015 RotateRight, LLC
* @remark Copyright 2002 OProfile authors
* @remark Based on Oprofile's implementation.
* @remark Read the file COPYING
*/
#ifndef RRNOTIFY_H_
#define RRNOTIFY_H_
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/fs.h>
int rrnotify_setup(void);
void rrnotify_shutdown(void);
int rrnotifyfs_register(void);
void rrnotifyfs_unregister(void);
int rrnotify_start(void);
void rrnotify_stop(void);
int rrnotify_set_ulong(unsigned long *addr, unsigned long val);
extern unsigned long fs_buffer_size;
extern unsigned long fs_buffer_watershed;
extern unsigned long rrnotify_started;
extern int rrnotify_debug; // RR
/** lock for read/write safety */
extern spinlock_t rrnotifyfs_lock;
struct super_block;
struct dentry;
void rrnotify_create_files(struct super_block * sb, struct dentry * root);
/**
* Create a file of the given name as a child of the given root, with
* the specified file operations.
*/
int rrnotifyfs_create_file(struct super_block * sb, struct dentry * root,
char const * name, const struct file_operations * fops);
int rrnotifyfs_create_file_perm(struct super_block * sb, struct dentry * root,
char const * name, const struct file_operations * fops, int perm);
/** Create a file for read/write access to an unsigned long. */
int rrnotifyfs_create_ulong(struct super_block * sb, struct dentry * root,
char const * name, unsigned long * val);
/** Create a file for read-only access to an atomic_t. */
int rrnotifyfs_create_ro_atomic(struct super_block * sb, struct dentry * root,
char const * name, atomic_t * val);
/** create a directory */
struct dentry * rrnotifyfs_mkdir(struct super_block * sb, struct dentry * root,
char const * name);
#endif /*RRNOTIFY_H_*/