x86, bitops: note on __test_and_clear_bit atomicity
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 24 Jun 2012 16:24:42 +0000 (19:24 +0300)
committerAvi Kivity <avi@redhat.com>
Mon, 25 Jun 2012 09:38:35 +0000 (12:38 +0300)
commitd0a69d6321ca759bb8d47803d06ba8571ab42d07
tree6b94990e0b4d43251740fa60deef29148bce9d58
parentab9cf4996bb989983e73da894b8dd0239aa2c3c2
x86, bitops: note on __test_and_clear_bit atomicity

__test_and_clear_bit is actually atomic with respect
to the local CPU. Add a note saying that KVM on x86
relies on this behaviour so people don't accidentaly break it.
Also warn not to rely on this in portable code.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/bitops.h