kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: daniel.baluta@gmail.com (Daniel Baluta)
To: kernelnewbies@lists.kernelnewbies.org
Subject: spin_lock behavior
Date: Fri, 4 Nov 2011 00:04:52 +0200	[thread overview]
Message-ID: <CAEnQRZALcmrSGmHb-qD+FOm97MwxBcKDZ1zKR2PSwEH+VBKZbg@mail.gmail.com> (raw)
In-Reply-To: <CAAFf3B8S_3iZ1-TKdekKprQ1vuuMHwdJABPLtuYrkbcyxOhEcA@mail.gmail.com>

Hello,

> I wrote a sample module which looked like this and i expected the module to
> hang as i have used 2 spin_lock simultaneously. But i find the print after
> the second spin_lock being printed and the module works perfectly fine. Can
> any body please help me in understanding this? I got this problem from a
> driver i wrote and had a typo "spin_lock" instead of "spin_unlock" the
> driver worked fine and i caught the mistake only during a review

Are you running your tests on an UP with preemption disabled?

thanks,
Daniel.

  reply	other threads:[~2011-11-03 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02  9:01 spin_lock behavior Prajosh Premdas
2011-11-03 22:04 ` Daniel Baluta [this message]
2011-11-03 22:11 ` Jeff Haran
2011-11-04  6:33   ` Prajosh Premdas
  -- strict thread matches above, loose matches on Subject: below --
2011-11-02 13:53 Prajosh Premdas

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=CAEnQRZALcmrSGmHb-qD+FOm97MwxBcKDZ1zKR2PSwEH+VBKZbg@mail.gmail.com \
    --to=daniel.baluta@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).