Lines Matching refs:dmultp
349 struct fc_data *dmultp = (struct fc_data *)queuep; in dmult_enque() local
353 que_objp = dmultp->ds_queobjp; in dmult_enque()
354 tgcom_objp = dmultp->ds_tgcomobjp; in dmult_enque()
358 mutex_enter(&dmultp->ds_mutex); in dmult_enque()
359 if ((dmultp->ds_outcnt >= dmultp->ds_waitcnt) || dmultp->ds_bp) { in dmult_enque()
361 if (dmultp->ds_kstat) { in dmult_enque()
362 kstat_waitq_enter(KSTAT_IO_PTR(dmultp->ds_kstat)); in dmult_enque()
364 mutex_exit(&dmultp->ds_mutex); in dmult_enque()
367 if (dmultp->ds_kstat) { in dmult_enque()
368 kstat_waitq_enter(KSTAT_IO_PTR(dmultp->ds_kstat)); in dmult_enque()
372 (caddr_t)dmultp) != DDI_SUCCESS) { in dmult_enque()
374 dmultp->ds_bp = in_bp; in dmult_enque()
375 mutex_exit(&dmultp->ds_mutex); in dmult_enque()
378 dmultp->ds_outcnt++; in dmult_enque()
379 if (dmultp->ds_kstat) in dmult_enque()
380 kstat_waitq_to_runq(KSTAT_IO_PTR(dmultp->ds_kstat)); in dmult_enque()
381 mutex_exit(&dmultp->ds_mutex); in dmult_enque()
390 struct fc_data *dmultp = (struct fc_data *)queuep; in dmult_deque() local
395 que_objp = dmultp->ds_queobjp; in dmult_deque()
396 tgcom_objp = dmultp->ds_tgcomobjp; in dmult_deque()
398 mutex_enter(&dmultp->ds_mutex); in dmult_deque()
400 dmultp->ds_outcnt--; in dmult_deque()
401 if (dmultp->ds_kstat) { in dmult_deque()
403 KSTAT_IO_PTR(dmultp->ds_kstat)->reads++; in dmult_deque()
404 KSTAT_IO_PTR(dmultp->ds_kstat)->nread += in dmult_deque()
407 KSTAT_IO_PTR(dmultp->ds_kstat)->writes++; in dmult_deque()
408 KSTAT_IO_PTR(dmultp->ds_kstat)->nwritten += in dmult_deque()
411 kstat_runq_exit(KSTAT_IO_PTR(dmultp->ds_kstat)); in dmult_deque()
418 if ((curthread->t_intr) && (!dmultp->ds_bp) && in dmult_deque()
419 (!dmultp->ds_outcnt)) in dmult_deque()
423 if (!dmultp->ds_bp) in dmult_deque()
424 dmultp->ds_bp = QUE_DEL(que_objp); in dmult_deque()
425 if (!dmultp->ds_bp || in dmult_deque()
426 (TGCOM_PKT(tgcom_objp, dmultp->ds_bp, dmult_restart, in dmult_deque()
427 (caddr_t)dmultp) != DDI_SUCCESS) || in dmult_deque()
428 (dmultp->ds_outcnt >= dmultp->ds_waitcnt)) { in dmult_deque()
429 mutex_exit(&dmultp->ds_mutex); in dmult_deque()
432 dmultp->ds_outcnt++; in dmult_deque()
433 bp = dmultp->ds_bp; in dmult_deque()
434 dmultp->ds_bp = QUE_DEL(que_objp); in dmult_deque()
436 if (dmultp->ds_kstat) in dmult_deque()
437 kstat_waitq_to_runq(KSTAT_IO_PTR(dmultp->ds_kstat)); in dmult_deque()
439 mutex_exit(&dmultp->ds_mutex); in dmult_deque()
443 if (!mutex_tryenter(&dmultp->ds_mutex)) in dmult_deque()
449 dmult_restart(struct fc_data *dmultp) in dmult_restart() argument
451 (void) dmult_deque(dmultp, NULL); in dmult_restart()