linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: melinda develey <melinda.develey70@yahoo.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: spin_lock doesn't work?!?
Date: Thu, 30 Aug 2007 06:50:39 -0500	[thread overview]
Message-ID: <20070830065039.0f660dad@zod.rchland.ibm.com> (raw)
In-Reply-To: <762949.1267.qm@web63906.mail.re1.yahoo.com>

On Wed, 29 Aug 2007 23:30:22 -0700 (PDT)
melinda develey <melinda.develey70@yahoo.com> wrote:

>   >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.
> 
>   I used the spinlock both in an interrupt handler to protect a group of variables (because in an interrupt I can't use a semaphore) and the same spinlock in a ioctl handler where the same group of variables is accessed. Is this wrong? I have a 2.6.19.2 linux kernel.

You might want to use spin_lock_irq instead.  That will disable
interrupts in the critical section in the ioctl.  Seems more like what
you are trying to do.

josh

  reply	other threads:[~2007-08-30 11:53 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
2007-08-30  6:30   ` melinda develey
2007-08-30 11:50     ` Josh Boyer [this message]
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=20070830065039.0f660dad@zod.rchland.ibm.com \
    --to=jwboyer@linux.vnet.ibm.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).