Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/bufobj.h
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
typedef void b_strategy_t(struct bufobj *, struct buf *); | typedef void b_strategy_t(struct bufobj *, struct buf *); | ||||
typedef int b_write_t(struct buf *); | typedef int b_write_t(struct buf *); | ||||
typedef int b_sync_t(struct bufobj *, int waitfor); | typedef int b_sync_t(struct bufobj *, int waitfor); | ||||
typedef void b_bdflush_t(struct bufobj *, struct buf *); | typedef void b_bdflush_t(struct bufobj *, struct buf *); | ||||
struct buf_ops { | struct buf_ops { | ||||
char *bop_name; | const char *bop_name; | ||||
b_write_t *bop_write; | b_write_t *bop_write; | ||||
b_strategy_t *bop_strategy; | b_strategy_t *bop_strategy; | ||||
b_sync_t *bop_sync; | b_sync_t *bop_sync; | ||||
b_bdflush_t *bop_bdflush; | b_bdflush_t *bop_bdflush; | ||||
}; | }; | ||||
#define BO_STRATEGY(bo, bp) ((bo)->bo_ops->bop_strategy((bo), (bp))) | #define BO_STRATEGY(bo, bp) ((bo)->bo_ops->bop_strategy((bo), (bp))) | ||||
#define BO_SYNC(bo, w) ((bo)->bo_ops->bop_sync((bo), (w))) | #define BO_SYNC(bo, w) ((bo)->bo_ops->bop_sync((bo), (w))) | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |