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

Function bufobj_wwait

freebsd/kern/vfs_bio.c:5085–5101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5083}
5084
5085int
5086bufobj_wwait(struct bufobj *bo, int slpflag, int timeo)
5087{
5088 int error;
5089
5090 KASSERT(bo != NULL, ("NULL bo in bufobj_wwait"));
5091 ASSERT_BO_WLOCKED(bo);
5092 error = 0;
5093 while (bo->bo_numoutput) {
5094 bo->bo_flag |= BO_WWAIT;
5095 error = msleep(&bo->bo_numoutput, BO_LOCKPTR(bo),
5096 slpflag | (PRIBIO + 1), "bo_wwait", timeo);
5097 if (error)
5098 break;
5099 }
5100 return (error);
5101}
5102
5103/*
5104 * Set bio_data or bio_ma for struct bio from the struct buf.

Callers 3

vn_fsync_bufFunction · 0.85
bufobj_invalbufFunction · 0.85
vtruncbufFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected