Linux Kernel
3.7.1
|
#include <linux/init.h>
#include <linux/module.h>
#include <linux/oprofile.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <asm/uaccess.h>
#include "oprof.h"
Go to the source code of this file.
Macros | |
#define | OPROFILEFS_MAGIC 0x6f70726f |
#define | TMPBUFSIZE 50 |
A simple filesystem for configuration and access of oprofile.
Definition in file oprofilefs.c.
#define OPROFILEFS_MAGIC 0x6f70726f |
Definition at line 22 of file oprofilefs.c.
#define TMPBUFSIZE 50 |
Definition at line 51 of file oprofilefs.c.
DEFINE_RAW_SPINLOCK | ( | oprofilefs_lock | ) |
int oprofilefs_create_file | ( | struct super_block * | sb, |
struct dentry * | root, | ||
char const * | name, | ||
const struct file_operations * | fops | ||
) |
Create a file of the given name as a child of the given root, with the specified file operations.
Definition at line 195 of file oprofilefs.c.
int oprofilefs_create_file_perm | ( | struct super_block * | sb, |
struct dentry * | root, | ||
char const * | name, | ||
const struct file_operations * | fops, | ||
int | perm | ||
) |
Definition at line 202 of file oprofilefs.c.
int oprofilefs_create_ro_atomic | ( | struct super_block * | sb, |
struct dentry * | root, | ||
char const * | name, | ||
atomic_t * | val | ||
) |
Create a file for read-only access to an atomic_t.
Definition at line 187 of file oprofilefs.c.
int oprofilefs_create_ro_ulong | ( | struct super_block * | sb, |
struct dentry * | root, | ||
char const * | name, | ||
ulong * | val | ||
) |
Create a file for read-only access to an unsigned long.
Definition at line 165 of file oprofilefs.c.
int oprofilefs_create_ulong | ( | struct super_block * | sb, |
struct dentry * | root, | ||
char const * | name, | ||
ulong * | val | ||
) |
Create a file for read/write access to an unsigned long.
Definition at line 157 of file oprofilefs.c.
|
read |
create a directory
Definition at line 209 of file oprofilefs.c.
Definition at line 271 of file oprofilefs.c.
ssize_t oprofilefs_str_to_user | ( | char const * | str, |
char __user * | buf, | ||
size_t | count, | ||
loff_t * | offset | ||
) |
Write the given asciz string to the given user buffer , updating *offset appropriately. Returns bytes written or -EFAULT.
Definition at line 45 of file oprofilefs.c.
Read an ASCII string for a number from a userspace buffer and fill *val on success. Returns 0 on success, < 0 on error.
Definition at line 70 of file oprofilefs.c.
ssize_t oprofilefs_ulong_to_user | ( | unsigned long | val, |
char __user * | buf, | ||
size_t | count, | ||
loff_t * | offset | ||
) |
Convert an unsigned long value into ASCII and copy it to the user buffer , updating *offset appropriately. Returns bytes written or -EFAULT.
Definition at line 53 of file oprofilefs.c.
Definition at line 277 of file oprofilefs.c.