Hi,
It will work only if you are absolutely sure that interrupts will be
enabled when this code gets executed. If you are not sure about the
current state of interrupts when you are trying to grab a spinlock,
use spin_lock_irqsave(). This will be more clearer below:
I understand that
Hi,
Will this work for multiple writers to solve:
* contention between ISR and write
* contention between 2 or more writers
In the write() method:
Grab spin_lock_irq
Copy from interrupt buffer to local buffer
spin_unlock_irq
copy_to_user from local buffer
If so, How? How is it
Hi Rajat,
Thanks for your simple and clear explanation.
If so, How? How is it different from irqsave call?
It will work only if you are absolutely sure that interrupts will be enabled
when this code gets executed. If you are not sure about the current state of
interrupts when you are