18 |
#ifndef _MODULE_H |
#ifndef _MODULE_H |
19 |
#define _MODULE_H 1 |
#define _MODULE_H 1 |
20 |
|
|
|
#include "proc.h" |
|
|
#include "io-buf.h" |
|
|
#include "io-uio.h" |
|
|
|
|
21 |
#define __need_size_t |
#define __need_size_t |
22 |
#include <stddef.h> |
#include <stddef.h> |
23 |
|
|
24 |
|
struct io_uio; |
25 |
|
struct io_buf; |
26 |
|
struct proc; |
27 |
|
|
28 |
#define md_printhdr(MDD, UNIT, STREAM) \ |
#define md_printhdr(MDD, UNIT, STREAM) \ |
29 |
do \ |
do \ |
30 |
{ \ |
{ \ |
39 |
|
|
40 |
struct cdev_ops |
struct cdev_ops |
41 |
{ |
{ |
42 |
int (*d_open) (dev_t dev); |
int (*d_open) (dev_t dev, int flag, struct proc *proc); |
43 |
int (*d_read) (dev_t dev, struct io_uio *uio, struct proc *p); |
int (*d_read) (dev_t dev, struct io_uio *uio, struct proc *p); |
44 |
int (*d_write) (dev_t dev, struct io_uio *uio, struct proc *p); |
int (*d_write) (dev_t dev, struct io_uio *uio, struct proc *p); |
45 |
}; |
}; |