externC hal_mpc5xx_arbitration_data * hal_mpc5xx_remove_arbitration_isr(cyg_uint32 apriority) { hal_mpc5xx_arbitration_data * result = 0; // Find the SIU vector from the priority CYG_ADDRWORD vector = 2*(1 + apriority); if(vector < CYGNUM_HAL_INTERRUPT_SIU_LVL7) { result = (hal_mpc5xx_arbitration_data *)(hal_interrupt_objects[vector]); HAL_INTERRUPT_DETACH(vector, hal_interrupt_handlers[vector]); } else { #ifdef CYGSEM_HAL_POWERPC_MPC5XX_IMB3_ARBITER // Prevent anything from coming through while manipulating the list HAL_INTERRUPT_MASK(CYGNUM_HAL_INTERRUPT_SIU_LVL7); result = mpc5xx_remove(imb3_data_head, apriority); // If something was removed, update the list. if(result) imb3_data_head = result->reserved; HAL_INTERRUPT_UNMASK(CYGNUM_HAL_INTERRUPT_SIU_LVL7); #else result = (hal_mpc5xx_arbitration_data *)(hal_interrupt_objects[CYGNUM_HAL_INTERRUPT_SIU_LVL7]); HAL_INTERRUPT_DETACH(CYGNUM_HAL_INTERRUPT_SIU_LVL7, hal_interrupt_handlers[CYGNUM_HAL_INTERRUPT_SIU_LVL7]); #endif } return result; }
externC void hal_mpc5xx_remove_arbitration_isr(hal_mpc5xx_arbitration_data * adata) { #ifdef CYGSEM_HAL_POWERPC_MPC5XX_IMB3_ARBITER // Prevent anything from coming through while manipulating the list HAL_INTERRUPT_MASK(CYGNUM_HAL_INTERRUPT_SIU_LVL7); imb3_data_head = mpc5xx_remove(imb3_data_head, adata); HAL_INTERRUPT_UNMASK(CYGNUM_HAL_INTERRUPT_SIU_LVL7); #endif }