Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

*** 1840,1850 **** /* TODO: Use correct offset and size for syncing? */ if (ddi_dma_sync(acb->ccbs_pool_handle, 0, 0, DDI_DMA_SYNC_FORDEV) == DDI_FAILURE) return (DDI_FAILURE); ! atomic_add_32(&acb->ccboutstandingcount, 1); ccb->ccb_time = (time_t)(ddi_get_time() + pkt->pkt_time); ccb->ccb_state = ARCMSR_CCB_START; switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: --- 1840,1850 ---- /* TODO: Use correct offset and size for syncing? */ if (ddi_dma_sync(acb->ccbs_pool_handle, 0, 0, DDI_DMA_SYNC_FORDEV) == DDI_FAILURE) return (DDI_FAILURE); ! atomic_inc_32(&acb->ccboutstandingcount); ccb->ccb_time = (time_t)(ddi_get_time() + pkt->pkt_time); ccb->ccb_state = ARCMSR_CCB_START; switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A:
*** 1953,1963 **** mutex_enter(&acb->isr_mutex); } else { scsi_hba_pkt_comp(pkt); } if (flag == 1) { ! atomic_add_32(&acb->ccboutstandingcount, -1); } } static void arcmsr_report_ccb_state(struct ACB *acb, struct CCB *ccb, boolean_t error) --- 1953,1963 ---- mutex_enter(&acb->isr_mutex); } else { scsi_hba_pkt_comp(pkt); } if (flag == 1) { ! atomic_dec_32(&acb->ccboutstandingcount); } } static void arcmsr_report_ccb_state(struct ACB *acb, struct CCB *ccb, boolean_t error)