From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Andrew Morton <akpm@osdl.org>
Cc: eranian@hpl.hp.com, Christoph Hellwig <hch@infradead.org>,
linux-kernel@vger.kernel.org, ak@suse.de
Subject: Re: [PATCH] i386 add idle notifier
Date: Wed, 29 Nov 2006 23:15:35 +0000 [thread overview]
Message-ID: <20061129231535.GE15186@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20061129150544.ebd952f3.akpm@osdl.org>
On Wed, Nov 29, 2006 at 03:05:44PM -0800, Andrew Morton wrote:
> btw, I don't think anyone promised that __test_and_set_bit is atomic wrt
> interrupts on all architectures. Is OK for x86.
Correct. The generic version found in include/asm-generic/bitops/non-atomic.h
is not interrupt safe:
/**
* __test_and_set_bit - Set a bit and return its old value
* @nr: Bit to set
* @addr: Address to count from
*
* This operation is non-atomic and can be reordered.
* If two examples of this operation race, one can appear to succeed
* but actually fail. You must protect multiple accesses with a lock.
*/
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2006-11-29 23:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-29 16:25 [PATCH] i386 add idle notifier Stephane Eranian
2006-11-29 16:37 ` Andi Kleen
2006-11-29 16:41 ` [PATCH] i386 add idle notifier (take 2) Stephane Eranian
2006-11-29 17:09 ` [PATCH] i386 add idle notifier Christoph Hellwig
2006-11-29 21:09 ` Andrew Morton
2006-11-29 22:18 ` Stephane Eranian
2006-11-29 23:05 ` Andrew Morton
2006-11-29 23:15 ` Russell King [this message]
2006-11-29 23:21 ` Andi Kleen
2006-11-30 8:16 ` Stephane Eranian
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=20061129231535.GE15186@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=eranian@hpl.hp.com \
--cc=hch@infradead.org \
--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