1 // SPDX-License-Identifier: LGPL-2.1
3 #define EFD_SEMAPHORE 1
7 #define EFD_NONBLOCK 00004000
11 #define EFD_CLOEXEC 02000000
14 static size_t syscall_arg__scnprintf_eventfd_flags(char *bf
, size_t size
, struct syscall_arg
*arg
)
16 bool show_prefix
= arg
->show_string_prefix
;
17 const char *prefix
= "EFD_";
18 int printed
= 0, flags
= arg
->val
;
21 return scnprintf(bf
, size
, "NONE");
23 if (flags & EFD_##n) { \
24 printed += scnprintf(bf + printed, size - printed, "%s%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \
34 printed
+= scnprintf(bf
+ printed
, size
- printed
, "%s%#x", printed
? "|" : "", flags
);
39 #define SCA_EFD_FLAGS syscall_arg__scnprintf_eventfd_flags