Friday, August 31, 2012

What does IRQ save do in Linux?


Use local_irq_save to disable interrupts on the local processor and remember their previous state. The flags can be passed to local_irq_restore to restore the previous interrupt state.


void local_irq_save(unsigned long flags);
void local_irq_restore(unsigned long flags);

The spinlock version will disable interrupts on all the cores*


1 comments:

Vishal said...

To disable interrupts on all the processor cores use spinlock_irq_save instead with spinlock_irq_restore. Both the local and spinlock versions represent a spinlock and are non-sleeping.

Post a Comment