Re: spin_lock_irqsave query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linux Learner wrote:
I have a question regarding spin_lock_irqsave. Can bottom halfs or
softirqs execute if an irq lock is held? E.g

spin_lock_irqsave(&lock, flags)
function()
spin_unlock_irqsave(&lock, flags)

Is it possible that function is interrupted by bottom half or softirq?

No, spin_lock_irq locks out all code in irq context and disables
preemption.

--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux