Tracepoint probes don't need extern C
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Aug 2013 14:55:30 +0000 (10:55 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Aug 2013 18:18:48 +0000 (14:18 -0400)
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 <mathieu.desnoyers@efficios.com>
tests/hello/ust_tests_hello.h
tests/same_line_tracepoint/ust_tests_sameline.h
tools/lttng-gen-tp

index 88f1a7f578cbf8fcc4a912ac42f100c20e74acfa..e518b0d4903499aa93281d01f8c5e9689c09441d 100644 (file)
@@ -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 <mathieu.desnoyers@efficios.com>
  *
@@ -70,7 +66,3 @@ TRACEPOINT_EVENT(ust_tests_hello, tptest_sighandler,
 
 /* This part must be outside ifdef protection */
 #include <lttng/tracepoint-event.h>
-
-#ifdef __cplusplus
-}
-#endif
index 2517406f385b07f83ff83d3d43d30eaa5906d496..6425db7285d4ca3fc693c9a4dd42ec13441ea6a1 100644 (file)
@@ -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 <mathieu.desnoyers@efficios.com>
  *
@@ -51,7 +47,3 @@ TRACEPOINT_LOGLEVEL(ust_tests_sameline, event2, TRACE_CRIT)
 
 /* This part must be outside ifdef protection */
 #include <lttng/tracepoint-event.h>
-
-#ifdef __cplusplus
-}
-#endif
index 5937dfdfe1793f61b46c43e544d41f2b109d0674..db78a5a82b8358a915982aef0969809c81fb44ec 100755 (executable)
@@ -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 <lttng/tracepoint-event.h>
-
-#ifdef __cplusplus
-}}
-#endif /* __cplusplus */
-
 """
     def __init__(self, filename, template):
         self.outputFilename = filename
This page took 0.033956 seconds and 4 git commands to generate.