Lines Matching defs:pd
220 prefetch_data_t *pd = td->td_pfd;
266 if (pd != NULL && !pd->pd_exited && prefetch_needed(pd, bp)) {
268 mutex_enter(&pd->pd_mtx);
269 ASSERT(pd->pd_bytes_fetched >= 0);
270 while (pd->pd_bytes_fetched < size && !pd->pd_exited)
271 cv_wait(&pd->pd_cv, &pd->pd_mtx);
272 pd->pd_bytes_fetched -= size;
273 cv_broadcast(&pd->pd_cv);
274 mutex_exit(&pd->pd_mtx);
553 prefetch_data_t pd = { 0 };
567 td.td_pfd = &pd;
579 pd.pd_flags = flags;
581 pd.pd_resume = *resume;
582 mutex_init(&pd.pd_mtx, NULL, MUTEX_DEFAULT, NULL);
583 cv_init(&pd.pd_cv, NULL, CV_DEFAULT, NULL);
605 pd.pd_exited = B_TRUE;
611 mutex_enter(&pd.pd_mtx);
612 pd.pd_cancel = B_TRUE;
613 cv_broadcast(&pd.pd_cv);
614 while (!pd.pd_exited)
615 cv_wait(&pd.pd_cv, &pd.pd_mtx);
616 mutex_exit(&pd.pd_mtx);
618 mutex_destroy(&pd.pd_mtx);
619 cv_destroy(&pd.pd_cv);