public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Duncan Sands <baldrick@wanadoo.fr>
To: Heiko.Rabe@InVision.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: inconsistent usage of
Date: Tue, 22 Apr 2003 10:40:45 +0200	[thread overview]
Message-ID: <200304221040.45480.baldrick@wanadoo.fr> (raw)
In-Reply-To: <OF07767E6D.29E660DD-ONC1256D10.002B8A2D@invision.de>

> void foo()
> {
>      unsigned long  local_flags;
>      spin_lock_irqsave (&qtlock, local_flags);
>      spin_lock_irqsave (&qtlock, local_flags);
> }
>
> Calling the function foo() works proper in none SMP kernels. I assume, the
> spinlocks internaly will be initialized as
> recursive semaphore as default. So it is possible to aquire it more than
> once by the same thread.

No.  If you acquire it twice then you die.  The above code is wrong.
Where did you find it?

All the best,

Duncan.

  reply	other threads:[~2003-04-22  8:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-22  8:11 inconsistent usage of Heiko.Rabe
2003-04-22  8:40 ` Duncan Sands [this message]
2003-04-22  9:21 ` viro
2003-04-22  9:25 ` Jens Axboe

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=200304221040.45480.baldrick@wanadoo.fr \
    --to=baldrick@wanadoo.fr \
    --cc=Heiko.Rabe@InVision.de \
    --cc=linux-kernel@vger.kernel.org \
    /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