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