34#include "linux/spinlock.h"
35#include "asm/atomic.h"
42typedef unsigned short fmode_t;
47struct proc_file_operations;
49typedef int (*read_proc_t)(
struct proc_file *pf,
void *buf);
50typedef int (*write_proc_t)(
struct proc_file *pf,
const char *buf,
size_t count, loff_t *ppos);
52struct proc_file_operations {
56 loff_t (*llseek)(
struct proc_file *pf, loff_t offset,
int whence);
57 int (*open)(
struct inode *inode,
struct proc_file *pf);
58 int (*release)(
struct inode *inode,
struct proc_file *pf);
59 ssize_t (*read)(
struct proc_file *pf,
char *buf,
size_t count, loff_t *ppos);
60 ssize_t (*write)(
struct proc_file *pf,
const char *buf,
size_t count, loff_t *ppos);
63struct proc_dir_entry {
66 const struct proc_file_operations *proc_fops;
68 struct proc_dir_entry *next, *parent, *subdir;
70 read_proc_t read_proc;
71 write_proc_t write_proc;
73 spinlock_t pde_unload_lock;
76 struct proc_dir_entry *pdir_current;
77 char name[MAX_NAMELEN];
84 struct proc_dir_entry *pPDE;
86 unsigned long long f_version;
88 char name[MAX_NAMELEN];
120extern struct proc_dir_entry *create_proc_entry(
const char *name, mode_t mode,
121 struct proc_dir_entry *parent);
145extern void remove_proc_entry(
const char *name,
struct proc_dir_entry *parent);
172extern struct proc_dir_entry *proc_mkdir(
const char *name,
struct proc_dir_entry *parent);
201extern struct proc_dir_entry *proc_create(
const char *name, mode_t mode,
202 struct proc_dir_entry *parent,
const struct proc_file_operations *proc_fops);
225extern void proc_fs_init(
void);
INT32 ssize_t
Definition los_typedef.h:77
Definition hal_uart_v151_regs_def.h:38