The interfaces provided by the kernel include registering and deregistering interrupt handlers, forbidding interruptions, shielding interruption, and checking the status of the interrupt system.
The following are several interrupt control methods:
Local_irq_disable () Disable local interruption
Local_irq_enable () activates local interrupt
Local_irq_save () saves the current status of the local interruption transfer, and then disables the local interruption transfer.
Local_irq_restore () restores the local interrupt passed to the specified state
Disable_irq () disables a given disconnection and ensures that no handler is running on the interrupt line before the function returns.
Disable_irq_nosync () disables a specified disconnection.
Enable_irq () activates a given disconnection
Irqs_disabled () if the local interruption transmission is disabled, non-0 is returned; otherwise, 0 is returned.
In_interrupt () if it is in the interrupt context, non-0 is returned. If it is in the process context, 0 is returned.
In_irq () if the Interrupt Processing Program is being executed, non-0 is returned. Otherwise, 0 is returned.