| 5083 | } |
| 5084 | |
| 5085 | int |
| 5086 | bufobj_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. |
no outgoing calls
no test coverage detected