Lines Matching defs:qfp

46 static struct buf *qmerge_nextbp(struct que_data *qfp, struct buf *bp_merge,
728 static int que_init(struct que_data *qfp, void *lkarg);
730 static struct buf *que_del(struct que_data *qfp);
735 struct que_data *qfp;
738 queobjp = kmem_zalloc((sizeof (*queobjp) + sizeof (*qfp)), KM_NOSLEEP);
743 qfp = (struct que_data *)(queobjp+1);
744 queobjp->que_data = (opaque_t)qfp;
750 que_init(struct que_data *qfp, void *lkarg)
752 mutex_init(&qfp->q_mutex, NULL, MUTEX_DRIVER, lkarg);
759 struct que_data *qfp;
761 qfp = (struct que_data *)queobjp->que_data;
762 mutex_destroy(&qfp->q_mutex);
768 que_del(struct que_data *qfp)
772 bp = qfp->q_tab.b_actf;
774 qfp->q_tab.b_actf = bp->av_forw;
775 if (!qfp->q_tab.b_actf)
776 qfp->q_tab.b_actl = NULL;
789 static struct buf *qmerge_del(struct que_data *qfp);
853 struct que_data *qfp;
856 queobjp = kmem_zalloc((sizeof (*queobjp) + sizeof (*qfp)), KM_NOSLEEP);
861 qfp = (struct que_data *)(queobjp+1);
862 qfp->q_tab.hd_private = 0;
863 qfp->q_tab.hd_sync_next = qfp->q_tab.hd_async_next = NULL;
864 qfp->q_tab.hd_cnt = (void *)qmerge_sync2async;
865 queobjp->que_data = (opaque_t)qfp;
873 struct que_data *qfp;
875 qfp = (struct que_data *)queobjp->que_data;
876 mutex_destroy(&qfp->q_mutex);
877 kmem_free(queobjp, (sizeof (*queobjp) + sizeof (*qfp)));
939 que_insert(struct que_data *qfp, struct buf *bp)
944 struct diskhd *dp = &qfp->q_tab;
1053 qmerge_add(struct que_data *qfp, struct buf *bp)
1056 que_insert(qfp, bp);
1057 return (++qfp->q_cnt);
1101 qmerge_nextbp(struct que_data *qfp, struct buf *bp_merge, int *can_merge)
1107 struct diskhd *dp = &qfp->q_tab;
1109 if (qfp->q_cnt == 0) {
1112 flags = qfp->q_tab.hd_flags;
1113 sync_bpp = &qfp->q_tab.hd_sync_next;
1114 async_bpp = &qfp->q_tab.hd_async_next;
1150 SYNC2ASYNC(qfp) = (void *)qmerge_sync2async;
1151 qfp->q_tab.hd_private = 0;
1178 SYNC2ASYNC(qfp) =
1180 qfp->q_tab.hd_private = 0;
1206 SYNC2ASYNC(qfp) = (void *)qmerge_sync2async;
1219 SYNC2ASYNC(qfp) = (void *)qmerge_sync2async;
1227 cnt = (intptr_t)SYNC2ASYNC(qfp);
1230 SYNC2ASYNC(qfp) = (void *)cnt;
1234 SYNC2ASYNC(qfp) =
1245 cnt = (intptr_t)SYNC2ASYNC(qfp);
1248 SYNC2ASYNC(qfp) = (void *)cnt;
1252 SYNC2ASYNC(qfp) =
1282 qfp->q_tab.hd_private = (void *)private;
1283 qfp->q_cnt--;
1284 qfp->q_tab.hd_flags = flags;
1293 qmerge_del(struct que_data *qfp)
1298 if (qfp->q_cnt == 0) {
1302 bp_merge = bp = qmerge_nextbp(qfp, NULL, &merge);
1304 while (merge && (next_bp = qmerge_nextbp(qfp, bp_merge, &merge))) {
1308 mutex_exit(&qfp->q_mutex);
1314 bp_merge->b_back = (struct buf *)qfp;
1350 qfifo_add(struct que_data *qfp, struct buf *bp)
1353 if (!qfp->q_tab.b_actf)
1354 qfp->q_tab.b_actf = bp;
1356 qfp->q_tab.b_actl->av_forw = bp;
1357 qfp->q_tab.b_actl = bp;
1390 qsort_add(struct que_data *qfp, struct buf *bp)
1392 qfp->q_cnt++;
1393 oneway_scan_binary(&qfp->q_tab, bp);
1429 qsort_del(struct que_data *qfp)
1433 if (qfp->q_cnt == 0) {
1436 qfp->q_cnt--;
1437 bp = qfp->q_tab.b_actf;
1438 qfp->q_tab.b_actf = bp->av_forw;
1440 if (!qfp->q_tab.b_actf && qfp->q_tab.b_pasf) {
1441 qfp->q_tab.b_actf = qfp->q_tab.b_pasf;
1442 qfp->q_tab.b_pasf = NULL;