diff options
author | Sean Christopherson <seanjc@google.com> | 2022-11-19 04:34:46 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-12-02 21:22:33 +0300 |
commit | 75d7ba32f9829e778484cf6e96e6e8f80914b0b3 (patch) | |
tree | 84e0c2d67e2c6b35138bfd9ecf13e5e99677399b /tools/perf/bench/find-bit-bench.c | |
parent | 7f2b47f22b825c16d9843e6e78bbb2370d2c31a0 (diff) | |
download | linux-75d7ba32f9829e778484cf6e96e6e8f80914b0b3.tar.xz |
perf tools: Use dedicated non-atomic clear/set bit helpers
Use the dedicated non-atomic helpers for {clear,set}_bit() and their
test variants, i.e. the double-underscore versions. Depsite being
defined in atomic.h, and despite the kernel versions being atomic in the
kernel, tools' {clear,set}_bit() helpers aren't actually atomic. Move
to the double-underscore versions so that the versions that are expected
to be atomic (for kernel developers) can be made atomic without affecting
users that don't want atomic operations.
No functional change intended.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Message-Id: <20221119013450.2643007-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/bench/find-bit-bench.c')
-rw-r--r-- | tools/perf/bench/find-bit-bench.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/bench/find-bit-bench.c b/tools/perf/bench/find-bit-bench.c index 22b5cfe97023..d103c3136983 100644 --- a/tools/perf/bench/find-bit-bench.c +++ b/tools/perf/bench/find-bit-bench.c @@ -70,7 +70,7 @@ static int do_for_each_set_bit(unsigned int num_bits) bitmap_zero(to_test, num_bits); skip = num_bits / set_bits; for (i = 0; i < num_bits; i += skip) - set_bit(i, to_test); + __set_bit(i, to_test); for (i = 0; i < outer_iterations; i++) { old = accumulator; |