tracing: fixes C++ compilation issue

When tracing_cpu_stats.h is included by C++ file it will not compile
and link correctly due to missing #ifdef __cplusplus directives
in the header file.

Fixes #23072

Signed-off-by: Dariusz Lisik <dariusz.lisik@hidglobal.com>
This commit is contained in:
Dariusz Lisik 2020-02-25 15:44:53 +01:00 committed by Johan Hedberg
commit d4d7c947b9

View file

@ -10,6 +10,10 @@
#include <kernel_structs.h> #include <kernel_structs.h>
#include <init.h> #include <init.h>
#ifdef __cplusplus
extern "C" {
#endif
struct cpu_stats { struct cpu_stats {
u64_t idle; u64_t idle;
u64_t non_idle; u64_t non_idle;
@ -41,4 +45,8 @@ void cpu_stats_reset_counters(void);
#define sys_trace_void(id) #define sys_trace_void(id)
#define sys_trace_end_call(id) #define sys_trace_end_call(id)
#ifdef __cplusplus
}
#endif
#endif /* _TRACE_CPU_STATS_H */ #endif /* _TRACE_CPU_STATS_H */