From: Mathieu Desnoyers Date: Thu, 15 Aug 2013 14:55:30 +0000 (-0400) Subject: Tracepoint probes don't need extern C X-Git-Tag: v2.3.0-rc2~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=177d5e84ca824cd51c41cc380b0f7600e27e39a6;p=lttng-ust.git 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 --- 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 8ae243f6..1b8439f3 100755 --- a/tools/lttng-gen-tp +++ b/tools/lttng-gen-tp @@ -35,11 +35,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} @@ -50,11 +45,6 @@ extern "C"{{ #endif /* {includeGuard} */ #include - -#ifdef __cplusplus -}} -#endif /* __cplusplus */ - """ def __init__(self, filename, template): self.outputFilename = filename