2 * Copyright (C) 2022 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: GPL-2.0-only
8 #ifndef LTTNG_UST_FIELD_CONVERT_H
9 #define LTTNG_UST_FIELD_CONVERT_H
12 #include <type_traits>
19 enum class ctl_field_quirks : unsigned int {
22 * LTTng-UST with ABI major version <= 9 express variants with a tag
23 * enumeration that doesn't match the fields of the variant. The
24 * tag's mapping names are systematically prefixed with an underscore.
26 UNDERSCORE_PREFIXED_VARIANT_TAG_MAPPINGS = 1 << 0,
29 inline ctl_field_quirks operator&(ctl_field_quirks lhs, ctl_field_quirks rhs)
31 using enum_type = std::underlying_type<ctl_field_quirks>::type;
32 return ctl_field_quirks(static_cast<enum_type>(lhs) & static_cast<enum_type>(rhs));
35 inline ctl_field_quirks operator|(ctl_field_quirks lhs, ctl_field_quirks rhs)
37 using enum_type = std::underlying_type<ctl_field_quirks>::type;
38 return ctl_field_quirks(static_cast<enum_type>(lhs) | static_cast<enum_type>(rhs));
42 } /* namespace sessiond */
43 } /* namespace lttng */
45 #endif /* LTTNG_UST_FIELD_CONVERT_H */