* Initialize a struct bufobj before use. Memory is assumed zero filled. */
| 5037 | * Initialize a struct bufobj before use. Memory is assumed zero filled. |
| 5038 | */ |
| 5039 | void |
| 5040 | bufobj_init(struct bufobj *bo, void *private) |
| 5041 | { |
| 5042 | static volatile int bufobj_cleanq; |
| 5043 | |
| 5044 | bo->bo_domain = |
| 5045 | atomic_fetchadd_int(&bufobj_cleanq, 1) % buf_domains; |
| 5046 | rw_init(BO_LOCKPTR(bo), "bufobj interlock"); |
| 5047 | bo->bo_private = private; |
| 5048 | TAILQ_INIT(&bo->bo_clean.bv_hd); |
| 5049 | TAILQ_INIT(&bo->bo_dirty.bv_hd); |
| 5050 | } |
| 5051 | |
| 5052 | void |
| 5053 | bufobj_wrefl(struct bufobj *bo) |
no test coverage detected