From 9e0e41bf1e9f61e8c30a6e45391596a5ac6c2ceb Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 14 Nov 2011 19:19:12 -0500 Subject: [PATCH] Fix multiple probe generation into one single C file Signed-off-by: Mathieu Desnoyers --- include/lttng/tracepoint.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index b487370b..ffc37c17 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -245,6 +245,17 @@ static void __attribute__((destructor)) __tracepoints__destroy(void) tracepoint_unregister_lib(__start___tracepoints_ptrs); } +#ifdef __cplusplus +} +#endif + +#endif /* _LTTNG_TRACEPOINT_H */ + +/* + * For multiple probe generation, we need to redefine TRACEPOINT_EVENT + * each time tracepoint.h is included. + */ + #ifndef TRACEPOINT_EVENT /* * Usage of the TRACEPOINT_EVENT macro: @@ -448,9 +459,3 @@ static void __attribute__((destructor)) __tracepoints__destroy(void) #define TRACEPOINT_LOGLEVEL(name, loglevel) #endif /* #ifndef TRACEPOINT_LOGLEVEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* _LTTNG_TRACEPOINT_H */ -- 2.34.1