Functions

  • Disables all interrupts in the current hart (supervisor mode).
  • Enables all the interrupts in the current hart (supervisor mode).
  • Execute closure f with interrupts disabled in the current hart (supervisor mode).
  • Execute closure f with interrupts enabled in the current hart (supervisor mode). This method is assumed to be called within an interrupt handler, and allows nested interrupts to occur. After the closure f is executed, the sstatus and sepc registers are properly restored to their previous values.