Re: spinlock

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

 



On Mon, Mar 03, 2003 at 02:03:29PM -0500, Zwane Mwaikambo wrote:
> On Sun, 2 Mar 2003, Jan Hudec wrote:
> 
> > Yes. Except you should probably use _irqsave/_irqrestore in int context
> > too (it saves flags and restores them un unlock so it does not matter if
> > interrupts were enabled befor). IIRC in bottomhalves/tasklets interrupts
> > are enabled, so you need irqsave there.
> 
> _irqsave/_irqrestore is unnecessary in interrupt handlers with our 
> interrupt handling infrastructure. If you want to run with interrupts 
> disabled in your isr just set SA_INTERRUPT

Not that I get it. As I understand it, when bottomhalves/tasklets access
to some data, it must be protected using
spin_lock_irqsave/spin_lock_irqrestore (and not just
spin_lock/spin_unlock) unless interrupts are surely disabled. [the whole
thread is about spinlocks thus _irqsave and _irqrestore refered to
spin_lock_irqsave and spin_unlock_irqresore].

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
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