5 extern void bdev_driver(dev_t dev
, char *label
);
8 extern int bdev_open(dev_t dev
, int access
);
9 extern int bdev_close(dev_t dev
);
11 extern ssize_t
bdev_read(dev_t dev
, u64_t pos
, char *buf
, size_t count
,
13 extern ssize_t
bdev_write(dev_t dev
, u64_t pos
, char *buf
, size_t count
,
15 extern ssize_t
bdev_gather(dev_t dev
, u64_t pos
, iovec_t
*vec
, int count
,
17 extern ssize_t
bdev_scatter(dev_t dev
, u64_t pos
, iovec_t
*vec
, int count
,
19 extern int bdev_ioctl(dev_t dev
, int request
, void *buf
);
21 /* Asynchronous API. */
22 typedef int bdev_id_t
;
23 typedef void *bdev_param_t
;
25 typedef void (*bdev_callback_t
)(dev_t dev
, bdev_id_t id
, bdev_param_t param
,
28 extern void bdev_flush_asyn(dev_t dev
);
30 extern bdev_id_t
bdev_read_asyn(dev_t dev
, u64_t pos
, char *buf
, size_t count
,
31 int flags
, bdev_callback_t callback
, bdev_param_t param
);
32 extern bdev_id_t
bdev_write_asyn(dev_t dev
, u64_t pos
, char *buf
, size_t count
,
33 int flags
, bdev_callback_t callback
, bdev_param_t param
);
34 extern bdev_id_t
bdev_gather_asyn(dev_t dev
, u64_t pos
, iovec_t
*vec
,
35 int count
, int flags
, bdev_callback_t callback
, bdev_param_t param
);
36 extern bdev_id_t
bdev_scatter_asyn(dev_t dev
, u64_t pos
, iovec_t
*vec
,
37 int count
, int flags
, bdev_callback_t callback
, bdev_param_t param
);
38 extern bdev_id_t
bdev_ioctl_asyn(dev_t dev
, int request
, void *buf
,
39 bdev_callback_t callback
, bdev_param_t param
);
41 extern int bdev_wait_asyn(bdev_id_t id
);
43 extern void bdev_reply_asyn(message
*m
);
45 #endif /* _MINIX_BDEV_H */