1 // SPDX-License-Identifier: MIT
3 * Copyright 2022 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 #define SIDE_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
14 * Compound literals with static storage are needed by SIDE
16 * Compound literals are part of the C99 and C11 standards, but not
17 * part of the C++ standards. They are supported by most C++ compilers
21 * static struct mystruct *var = LTTNG_UST_COMPOUND_LITERAL(struct mystruct, { 1, 2, 3 });
23 #define SIDE_COMPOUND_LITERAL(type, ...) (type[]) { __VA_ARGS__ }
25 #define side_likely(x) __builtin_expect(!!(x), 1)
26 #define side_unlikely(x) __builtin_expect(!!(x), 0)
28 #define SIDE_PARAM(...) __VA_ARGS__
30 #endif /* _SIDE_MACROS_H */
This page took 0.029685 seconds and 4 git commands to generate.