1 1.1 ahoka #ifndef _FLASH_IO_H_ 2 1.1 ahoka #define _FLASH_IO_H_ 3 1.1 ahoka 4 1.1 ahoka struct flash_io { 5 1.1 ahoka device_t fio_dev; 6 1.1 ahoka struct bintime fio_creation; 7 1.1 ahoka struct bintime fio_last_write; 8 1.1 ahoka struct bufq_state *fio_bufq; 9 1.1 ahoka uint8_t *fio_data; 10 1.1 ahoka daddr_t fio_block; 11 1.1 ahoka kmutex_t fio_lock; 12 1.1 ahoka bool fio_write_pending; 13 1.1 ahoka struct lwp *fio_thread; 14 1.1 ahoka kcondvar_t fio_cv; 15 1.1 ahoka bool fio_exiting; 16 1.1 ahoka struct flash_interface *fio_if; 17 1.1 ahoka }; 18 1.1 ahoka 19 1.1 ahoka int flash_io_submit(struct flash_io *, struct buf *); 20 1.1 ahoka void flash_sync_thread(void *); 21 1.2 cliff int flash_sync_thread_init(struct flash_io *, device_t, 22 1.2 cliff struct flash_interface *); 23 1.1 ahoka void flash_sync_thread_destroy(struct flash_io *); 24 1.1 ahoka 25 1.1 ahoka #endif 26