xref: /kernel/linux/linux-6.6/tools/perf/trace/beauty/futex_val3.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/tools/perf/trace/beauty/
162306a36Sopenharmony_ci// SPDX-License-Identifier: LGPL-2.1
262306a36Sopenharmony_ci#include <linux/futex.h>
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#ifndef FUTEX_BITSET_MATCH_ANY
562306a36Sopenharmony_ci#define FUTEX_BITSET_MATCH_ANY 0xffffffff
662306a36Sopenharmony_ci#endif
762306a36Sopenharmony_ci
862306a36Sopenharmony_cistatic size_t syscall_arg__scnprintf_futex_val3(char *bf, size_t size, struct syscall_arg *arg)
962306a36Sopenharmony_ci{
1062306a36Sopenharmony_ci	const char *prefix = "FUTEX_BITSET_";
1162306a36Sopenharmony_ci	unsigned int bitset = arg->val;
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci	if (bitset == FUTEX_BITSET_MATCH_ANY)
1462306a36Sopenharmony_ci		return scnprintf(bf, size, "%s%s", arg->show_string_prefix ? prefix : "", "MATCH_ANY");
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci	return scnprintf(bf, size, "%#xd", bitset);
1762306a36Sopenharmony_ci}
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#define SCA_FUTEX_VAL3  syscall_arg__scnprintf_futex_val3
20

Indexes created Thu Nov 07 10:32:03 CST 2024