futex_val3.c 464 B

12345678910111213141516171819
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include <linux/futex.h>
  3. #ifndef FUTEX_BITSET_MATCH_ANY
  4. #define FUTEX_BITSET_MATCH_ANY 0xffffffff
  5. #endif
  6. static size_t syscall_arg__scnprintf_futex_val3(char *bf, size_t size, struct syscall_arg *arg)
  7. {
  8. unsigned int bitset = arg->val;
  9. if (bitset == FUTEX_BITSET_MATCH_ANY)
  10. return scnprintf(bf, size, "MATCH_ANY");
  11. return scnprintf(bf, size, "%#xd", bitset);
  12. }
  13. #define SCA_FUTEX_VAL3 syscall_arg__scnprintf_futex_val3