include: implement REUSE with SPDX identifiers
[lttng-ust.git] / include / lttng / tracef.h
CommitLineData
1c196845
MJ
1// SPDX-FileCopyrightText: 2013-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2//
3// SPDX-License-Identifier: MIT
7dae71f2 4
c0c0989a
MJ
5#ifndef _LTTNG_UST_TRACEF_H
6#define _LTTNG_UST_TRACEF_H
7
06294ff9 8#include <lttng/ust-api-compat.h>
b15c4010 9#include <lttng/tp/lttng-ust-tracef.h>
7dae71f2 10
866f2767
MD
11#ifdef __cplusplus
12extern "C" {
13#endif
14
7dae71f2 15extern
06294ff9 16void lttng_ust__tracef(const char *fmt, ...)
4199ddc7 17 __attribute__((format(printf, 1, 2)));
7dae71f2 18
cfd56ee1 19extern
06294ff9 20void lttng_ust__vtracef(const char *fmt, va_list ap)
4199ddc7 21 __attribute__((format(printf, 1, 0)));
cfd56ee1 22
06294ff9 23#define lttng_ust_tracef(fmt, ...) \
7dae71f2 24 do { \
b88f9167 25 LTTNG_UST_STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \
0274f7f2 26 if (caa_unlikely(lttng_ust_tracepoint_lttng_ust_tracef___event.state)) \
06294ff9 27 lttng_ust__tracef(fmt, ## __VA_ARGS__); \
7dae71f2
MD
28 } while (0)
29
06294ff9 30#define lttng_ust_vtracef(fmt, ap) \
cfd56ee1 31 do { \
0274f7f2 32 if (caa_unlikely(lttng_ust_tracepoint_lttng_ust_tracef___event.state)) \
06294ff9 33 lttng_ust__vtracef(fmt, ap); \
cfd56ee1 34 } while (0)
06294ff9
MJ
35
36#if LTTNG_UST_COMPAT_API(0)
37#define tracef lttng_ust_tracef
06294ff9
MJ
38#endif
39
866f2767
MD
40#ifdef __cplusplus
41}
42#endif
43
7dae71f2 44#endif /* _LTTNG_UST_TRACEF_H */
This page took 0.034992 seconds and 4 git commands to generate.