From: "Rick Brown" <rick.brown.3@gmail.com>
To: kernelnewbies@nl.linux.org, linux-newbie@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Spinlock query
Date: Wed, 30 Aug 2006 07:42:32 +0530 [thread overview]
Message-ID: <7783925d0608291912i3f04d460kc9edebf9d358dbc3@mail.gmail.com> (raw)
Hi,
In my driver (Process context), I have written the following code:
--------------------------------------------
spin_lock(lock)
...
//Critical section to manipulate driver data
...
spin_u lock(lock)
---------------------------------------------
I have written similar code in my interrupt handler (Interrupt
context). The driver data is not accessed from anywhere else. Is my
code safe from any potential concurrency issues? Is there a need to
use spin_lock_irqsave()? In both the places?
I intend to run the driver on SMP machine.
Regards,
Rick
next reply other threads:[~2006-08-30 2:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-30 2:12 Rick Brown [this message]
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
[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=7783925d0608291912i3f04d460kc9edebf9d358dbc3@mail.gmail.com \
--to=rick.brown.3@gmail.com \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-newbie@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
all inboxes | Powered by JetHome®