summaryrefslogtreecommitdiff
path: root/sys/dev/flash/flash_io.h
blob: 90fd49613817a2ab499abcc6b65dae442bcf8e87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef _FLASH_IO_H_
#define _FLASH_IO_H_

struct flash_io {
	device_t fio_dev;
	struct bintime fio_creation;
	struct bintime fio_last_write;
	struct bufq_state *fio_bufq;
	uint8_t *fio_data;
	daddr_t fio_block;
	kmutex_t fio_lock;
	bool fio_write_pending;
	struct lwp *fio_thread;
	kcondvar_t fio_cv;
	bool fio_exiting;
	struct flash_interface *fio_if;
};

int flash_io_submit(struct flash_io *, struct buf *);
void flash_sync_thread(void *);
int flash_sync_thread_init(struct flash_io *, device_t,
	struct flash_interface *);
void flash_sync_thread_destroy(struct flash_io *);

#endif