public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@surriel.com>
To: Rajat Jain <rajat.noida.india@gmail.com>
Cc: Rick Brown <rick.brown.3@gmail.com>,
	kernelnewbies@nl.linux.org, linux-kernel@vger.kernel.org
Subject: Re: Spinlock query
Date: Wed, 30 Aug 2006 08:03:52 -0400	[thread overview]
Message-ID: <44F57EA8.4010905@surriel.com> (raw)
In-Reply-To: <b115cb5f0608292231r1a3c47c8r8980b32e838ff964@mail.gmail.com>

Rajat Jain wrote:
> On 8/30/06, Rik van Riel <riel@surriel.com> wrote:
>> Rick Brown wrote:
>> > Hi,
>> >
>> > In my driver (Process context), I have written the following code:
>> >
>> > --------------------------------------------
>> > spin_lock(lock)
>> > ...
>> > //Critical section to manipulate driver data
>>
>> ... interrupt hits here
>>     interrupt handler tries to grab the spinlock, which is already taken
>>     *BOOM*
>>
>> > spin_u lock(lock)
>> > ---------------------------------------------
>> >
> 
> The interrupt handler TRIES to grab the spinlock, which is already
> taken. Why will it "BOOM"? Wouldn't the interrupt handler busy wait,
> waiting for the lock?
> 
> Am I missing something here?

Yes, it will busy wait.  Forever.


-- 
What is important?  What you want to be true, or what is true?

  parent reply	other threads:[~2006-08-30 12:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30  2:12 Spinlock query Rick Brown
2006-08-30  3:10 ` Rik van Riel
2006-08-30  5:31   ` Rajat Jain
2006-08-30  6:04     ` Vin
2006-08-30 12:03     ` Rik van Riel [this message]
     [not found]   ` <fa2bedd60608292159ra9fce70wd1dbc8231d9c052c@mail.gmail.com>
2006-09-01  2:31     ` Rajat Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44F57EA8.4010905@surriel.com \
    --to=riel@surriel.com \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rajat.noida.india@gmail.com \
    --cc=rick.brown.3@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox