From: Wolfgang Reissnegger <wolfgang.reissnegger@xilinx.com>
To: melinda develey <melinda.develey70@yahoo.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: spin_lock doesn't work?!?
Date: Wed, 29 Aug 2007 14:40:50 -0700 [thread overview]
Message-ID: <20070829214050.8C47A1A2804D@mail19-sin.bigfish.com> (raw)
In-Reply-To: <177333.15506.qm@web63904.mail.re1.yahoo.com>
Hi Melinda,
depending on how your kernel is configured spin_locks will compileinto
nothing. For example, if you are compiling a kernel for a single
processor platform without preemptive scheduling then the spin_lock()
calls will be compiled into no-op as they are unnecessary on a non-SMP,
non-preemptive system.
You should still put the spin_lock calls into your code because you
never know if someone else will compile it and for another target. If
someone would, for example, compile the same code for a SMP machine then
the spin_lock will actually lock.
Cheers,
Wolfgang
melinda develey wrote:
> I discovered that I called spin_lock two times consecutively without
> calling spin_unlock but my code didn't lock (I was managing an ioctl).
> Probably I didn't understand how spin_lock works!!!!
>
> Any help?
>
> ------------------------------------------------------------------------
> Need a vacation? Get great deals to amazing places
> <http://us.rd.yahoo.com/evt=48256/*http://travel.yahoo.com/;_ylc=X3oDMTFhN2hucjlpBF9TAzk3NDA3NTg5BHBvcwM1BHNlYwNncm91cHMEc2xrA2VtYWlsLW5jbQ-->on
> Yahoo! Travel.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
next prev parent reply other threads:[~2007-08-29 21:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-29 21:26 spin_lock doesn't work?!? melinda develey
2007-08-29 21:38 ` Scott Wood
2007-08-29 21:40 ` Wolfgang Reissnegger [this message]
2007-08-30 6:30 ` melinda develey
2007-08-30 11:50 ` Josh Boyer
2007-08-30 15:36 ` Wolfgang Reissnegger
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=20070829214050.8C47A1A2804D@mail19-sin.bigfish.com \
--to=wolfgang.reissnegger@xilinx.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=melinda.develey70@yahoo.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;
as well as URLs for NNTP newsgroup(s).