arch/mips/src/mips32/up_irq.c
/****************************************************************************
 * Name: irqsave
 *
 * Description:
 *   Save the current interrupt state and disable interrupts.
 *
 * Input Parameters:
 *   None
 *
 * Returned Value:
 *   Interrupt state prior to disabling interrupts.
 *
 ****************************************************************************/
irqsave
Description:
Save the current interrupt state and disable interrupts.

Input Parameters:
None

Returned Value:
Interrupt state prior to disabling interrupts.
irqsave Description : Save the current interrupt state and disable interrupts . Input Parameters : None Returned Value : Interrupt state prior to disabling interrupts .
irqstate_t irqsave(void)
{
  register irqstate_t status;
  register irqstate_t ret;
  status  = cp0_getstatus();       
  ret     = status;                
  status &= ~CP0_STATUS_IM_MASK;   
  status |= CP0_STATUS_IM_SWINTS;  
  cp0_putstatus(status);           
  return ret;                      
}
irqstate_t irqsave ( void ) { register irqstate_t status ; register irqstate_t ret ; status = cp0_getstatus ( ) ; ret = status ; status &= ~ CP0_STATUS_IM_MASK ; status |= CP0_STATUS_IM_SWINTS ; cp0_putstatus ( status ) ; return ret ; }
Name: irqsave
 Description:
   Save the current interrupt state and disable interrupts.
Name : irqsave Description : Save the current interrupt state and disable interrupts .
/* Get CP0 status */ /* Save the status */ /* Clear all interrupt mask bits */ /* Keep S/W interrupts enabled */ /* Disable interrupts */ /* Return status before interrupts disabled */