Re: spin_lock_irqsave() and spin_lock usage

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

 



Hi Devesh,


spin_lock_irqsave(&x_lock, x_lock_flags) ;
.
 spin_lock_irqsave(&y_lock, y_lock_flags) ; <---- is this 'irqsave' justified?

It is redundant. The code is correct but it will make no difference if
you use spin_lock() instead of spin_lock_irqsave() for y_lock.


Which one is more correct or there are some other implications?


The second one is preferable as it will save you a few instructions.

Thanks,

Rajat

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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