From 8ccc745889efb88847e2e2c01cb27c814635e092 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 15 Aug 2013 10:55:30 -0400 Subject: [PATCH] Tracepoint probes don't need extern C tracepoint.h has the proper extern C guards, so every liblttng-ust API called from the probe has the proper linkage. The rest of the symbols are only meaningful within the probe, so we don't care if they are mangled or not. This fixes the two examples, and lttng-gen-tp. Fixes #597 Signed-off-by: Mathieu Desnoyers --- tests/hello/ust_tests_hello.h | 8 -------- tests/same_line_tracepoint/ust_tests_sameline.h | 8 -------- tools/lttng-gen-tp | 10 ---------- 3 files changed, 26 deletions(-) diff --git a/tests/hello/ust_tests_hello.h b/tests/hello/ust_tests_hello.h index 88f1a7f5..e518b0d4 100644 --- a/tests/hello/ust_tests_hello.h +++ b/tests/hello/ust_tests_hello.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_UST_TESTS_HELLO_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_TESTS_HELLO_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -70,7 +66,3 @@ TRACEPOINT_EVENT(ust_tests_hello, tptest_sighandler, /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tests/same_line_tracepoint/ust_tests_sameline.h b/tests/same_line_tracepoint/ust_tests_sameline.h index 2517406f..6425db72 100644 --- a/tests/same_line_tracepoint/ust_tests_sameline.h +++ b/tests/same_line_tracepoint/ust_tests_sameline.h @@ -4,10 +4,6 @@ #if !defined(_TRACEPOINT_UST_TESTS_SAMELINE_H) || defined(TRACEPOINT_HEADER_MULTI_READ) #define _TRACEPOINT_UST_TESTS_SAMELINE_H -#ifdef __cplusplus -extern "C" { -#endif - /* * Copyright (C) 2011 Mathieu Desnoyers * @@ -51,7 +47,3 @@ TRACEPOINT_LOGLEVEL(ust_tests_sameline, event2, TRACE_CRIT) /* This part must be outside ifdef protection */ #include - -#ifdef __cplusplus -} -#endif diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp index 5937dfdf..db78a5a8 100755 --- a/tools/lttng-gen-tp +++ b/tools/lttng-gen-tp @@ -34,11 +34,6 @@ class HeaderFile: #undef TRACEPOINT_INCLUDE #define TRACEPOINT_INCLUDE "./{headerFilename}" -#ifdef __cplusplus -extern "C"{{ -#endif /* __cplusplus */ - - #if !defined({includeGuard}) || defined(TRACEPOINT_HEADER_MULTI_READ) #define {includeGuard} @@ -49,11 +44,6 @@ extern "C"{{ #endif /* {includeGuard} */ #include - -#ifdef __cplusplus -}} -#endif /* __cplusplus */ - """ def __init__(self, filename, template): self.outputFilename = filename -- 2.34.1