Re: spin_lock or spin_lock_irqsave ?

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

 



Hi,
Best documentation:
http://www.kernelnewbies.org/documents/kdoc/kernel-locking/lklockingguide.html

On 4/25/05, Thomas Petazzoni <thomas.petazzoni@xxxxxxxx> wrote:
> Hello,
> 
> In the implementation of mempools (in mm/mempool.c in 2.6 kernels, for
> example at http://lxr.linux.no/source/mm/mempool.c), interrupts are
> disabled when accessing the mempool_t structure using the
> spin_lock_irqsave() and irq_unlock_irqrestore() functions.
> 
> Why is it necessary to disable interrupts ? Isn't it enough to use
> spin_lock() and spin_unlock() ?
> 
> Thanks,
> 
> Thomas
> --
> Thomas Petazzoni
> thomas.petazzoni@xxxxxxxx
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 


-- 
Regards,
Devesh Agrawal

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