Lines Matching refs:sfs
1771 struct sendfile_sync *sfs;
1787 sfs = addr;
1788 mtx_lock(&sfs->mtx);
1789 KASSERT(sfs->count> 0, ("Sendfile sync botchup count == 0"));
1790 if (--sfs->count == 0)
1791 cv_signal(&sfs->cv);
1792 mtx_unlock(&sfs->mtx);
1882 struct sendfile_sync *sfs = NULL;
1963 sfs = malloc(sizeof *sfs, M_TEMP, M_WAITOK | M_ZERO);
1964 mtx_init(&sfs->mtx, "sendfile", NULL, MTX_DEF);
1965 cv_init(&sfs->cv, "sendfile");
2236 sfs, sf, M_RDONLY, EXT_SFBUF);
2253 if (sfs != NULL) {
2254 mtx_lock(&sfs->mtx);
2255 sfs->count++;
2256 mtx_unlock(&sfs->mtx);
2343 if (sfs != NULL) {
2344 mtx_lock(&sfs->mtx);
2345 if (sfs->count != 0)
2346 cv_wait(&sfs->cv, &sfs->mtx);
2347 KASSERT(sfs->count == 0, ("sendfile sync still busy"));
2348 cv_destroy(&sfs->cv);
2349 mtx_destroy(&sfs->mtx);
2350 free(sfs, M_TEMP);