If you want to disable pre-use, use preempt_disable()and preempt_enable(). If you want to disable interrupts, use local_irq_disable()andlocal_irq_enable()
spin_lock_irqsaveusually perform both of these actions, although some real-time improvements sometimes allow you to use lock lists, so it’s always better to say what you mean.
source
share