| 695 | } |
| 696 | |
| 697 | void |
| 698 | ccp_queue_abort(struct ccp_queue *qp) |
| 699 | { |
| 700 | unsigned i; |
| 701 | |
| 702 | mtx_assert(&qp->cq_lock, MA_OWNED); |
| 703 | |
| 704 | /* Wipe out any descriptors associated with this aborted txn. */ |
| 705 | for (i = qp->cq_acq_tail; i != qp->cq_tail; |
| 706 | i = (i + 1) % (1 << qp->cq_softc->ring_size_order)) { |
| 707 | memset(&qp->desc_ring[i], 0, sizeof(qp->desc_ring[i])); |
| 708 | } |
| 709 | qp->cq_tail = qp->cq_acq_tail; |
| 710 | |
| 711 | mtx_unlock(&qp->cq_lock); |
| 712 | } |
| 713 | |
| 714 | #ifdef DDB |
| 715 | #define _db_show_lock(lo) LOCK_CLASS(lo)->lc_ddb_show(lo) |
no test coverage detected