RE: Need for a new spinlock API?

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

 



Title: RE: Need for a new spinlock API?

Yaa Rajat... I think that will work if datastructure is shared only among process context thread and one ISR routine.But in case the datastructure is shared among multiple interrupt context routines say in IRQ handler A and Tasklet B then you need to use spin_lock_irqsave() routine in IRQ context too.

--
Gaurav



-----Original Message-----
From: Rajat Jain [mailto:rajat.noida.india@xxxxxxxxx]
Sent: Wednesday, April 04, 2007 10:40 AM
To: GAggarwal@xxxxxxxxxxxxxxxxxx
Cc: kernelnewbies@xxxxxxxxxxxx; linux-newbie@xxxxxxxxxxxxxxx
Subject: Re: Need for a new spinlock API?


On 4/4/07, GAggarwal@xxxxxxxxxxxxxxxxxx <GAggarwal@xxxxxxxxxxxxxxxxxx> wrote:
>
>
> Hi Rajat,
>
> I think spin_lock_irqsave() will fulfill the purpose as otherwise it may be
> possible that the when a data structure is accessed in process context by
> taking spin_lock and an interrupt comes then the ISR will remain in forever
> loop waiting for the process context to release the lock result in a
> deadlock situation for a uniprocessor system.

HI Gaurav,

I meant to use spin_lock_irqsave() in process context and spin_lock()
in IRQ context.

Thanks,

Rajat


The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it.

[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