diff options
author | 2025-05-17 17:14:54 +0200 | |
---|---|---|
committer | 2025-05-21 13:57:41 +0200 | |
commit | 4140e2b31bedd87bfc53362441165979aa4fc5d8 (patch) | |
tree | b8ac911213ff7b8ffe3f6e6c1454d6d63018f8c0 /tools/perf | |
parent | futex: Use RCU_INIT_POINTER() in futex_mm_init(). (diff) | |
download | linux-rng-4140e2b31bedd87bfc53362441165979aa4fc5d8.tar.xz linux-rng-4140e2b31bedd87bfc53362441165979aa4fc5d8.zip |
tools headers: Synchronize prctl.h ABI header
The prctl.h ABI header was slightly updated during the development of
the interface. In particular the "immutable" parameter became a bit in
the option argument.
Synchronize prctl.h ABI header again and make use of the definition in
the testsuite and "perf bench futex".
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Link: https://lore.kernel.org/r/20250517151455.1065363-5-bigeasy@linutronix.de
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/bench/futex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/bench/futex.c b/tools/perf/bench/futex.c index 02ae6c52ba88..26382e4d8d4c 100644 --- a/tools/perf/bench/futex.c +++ b/tools/perf/bench/futex.c @@ -9,12 +9,14 @@ void futex_set_nbuckets_param(struct bench_futex_parameters *params) { + unsigned long flags; int ret; if (params->nbuckets < 0) return; - ret = prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS, params->nbuckets, params->buckets_immutable); + flags = params->buckets_immutable ? FH_FLAG_IMMUTABLE : 0; + ret = prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS, params->nbuckets, flags); if (ret) { printf("Requesting %d hash buckets failed: %d/%m\n", params->nbuckets, ret); |