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
,
20 endpoint_t user_endpt
);
22 /* Asynchronous API. */
23 typedef int bdev_id_t
;
24 typedef void *bdev_param_t
;
26 typedef void (*bdev_callback_t
)(dev_t dev
, bdev_id_t id
, bdev_param_t param
,
29 extern void bdev_flush_asyn(dev_t dev
);
31 extern bdev_id_t
bdev_read_asyn(dev_t dev
, u64_t pos
, char *buf
, size_t count
,
32 int flags
, bdev_callback_t callback
, bdev_param_t param
);
33 extern bdev_id_t
bdev_write_asyn(dev_t dev
, u64_t pos
, char *buf
, size_t count
,
34 int flags
, bdev_callback_t callback
, bdev_param_t param
);
35 extern bdev_id_t
bdev_gather_asyn(dev_t dev
, u64_t pos
, iovec_t
*vec
,
36 int count
, int flags
, bdev_callback_t callback
, bdev_param_t param
);
37 extern bdev_id_t
bdev_scatter_asyn(dev_t dev
, u64_t pos
, iovec_t
*vec
,
38 int count
, int flags
, bdev_callback_t callback
, bdev_param_t param
);
39 extern bdev_id_t
bdev_ioctl_asyn(dev_t dev
, int request
, void *buf
,
40 endpoint_t user_endpt
, bdev_callback_t callback
, bdev_param_t param
);
42 extern int bdev_wait_asyn(bdev_id_t id
);
44 extern void bdev_reply_asyn(message
*m
);
46 #endif /* _MINIX_BDEV_H */