MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bufobj_init

Function bufobj_init

freebsd/kern/vfs_bio.c:5039–5050  ·  view source on GitHub ↗

* Initialize a struct bufobj before use. Memory is assumed zero filled. */

Source from the content-addressed store, hash-verified

5037 * Initialize a struct bufobj before use. Memory is assumed zero filled.
5038 */
5039void
5040bufobj_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
5052void
5053bufobj_wrefl(struct bufobj *bo)

Callers 1

vnode_initFunction · 0.85

Calls 2

rw_initFunction · 0.85
atomic_fetchadd_intFunction · 0.50

Tested by

no test coverage detected