Re: spin_lock or spin_lock_irqsave ?

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

 



On 4/25/05, Aggarwal, Vikas (OFT) <Vikas.Aggarwal@xxxxxxxxxxxxxxx> wrote:
> Like to put 2 more questions:
> 
> 1. spin_lock_irqsave disables interrupt on local processor or on all the
> processors?  

It only disables the interrupts on local processor. Protection across
other processors is provided by spinlock itself, on local CPU
disabling interrupts serve that.

> 2. Is that ever required to disable interrupts on all the processors?

I dont think, kernel have any construct something like
spinlock_irqsave to disable interrupts on all CPUs.

You can find one good documentation related to differnet types of
spinlocks and there use in documentation directory of kernel sources.

-gd

--
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