aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/debug')
-rw-r--r--src/core/lib/debug/stats.cc (renamed from src/core/lib/debug/stats.c)0
-rw-r--r--src/core/lib/debug/stats.h8
-rw-r--r--src/core/lib/debug/stats_data.cc (renamed from src/core/lib/debug/stats_data.c)0
-rw-r--r--src/core/lib/debug/stats_data.h8
-rw-r--r--src/core/lib/debug/trace.cc (renamed from src/core/lib/debug/trace.c)1
-rw-r--r--src/core/lib/debug/trace.h8
6 files changed, 25 insertions, 0 deletions
diff --git a/src/core/lib/debug/stats.c b/src/core/lib/debug/stats.cc
index 4096384dd9..4096384dd9 100644
--- a/src/core/lib/debug/stats.c
+++ b/src/core/lib/debug/stats.cc
diff --git a/src/core/lib/debug/stats.h b/src/core/lib/debug/stats.h
index 09d190d488..fec1d651e6 100644
--- a/src/core/lib/debug/stats.h
+++ b/src/core/lib/debug/stats.h
@@ -23,6 +23,10 @@
#include "src/core/lib/debug/stats_data.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_stats_data {
gpr_atm counters[GRPC_STATS_COUNTER_COUNT];
gpr_atm histograms[GRPC_STATS_HISTOGRAM_BUCKETS];
@@ -58,4 +62,8 @@ double grpc_stats_histo_percentile(const grpc_stats_data *data,
size_t grpc_stats_histo_count(const grpc_stats_data *data,
grpc_stats_histograms histogram);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/core/lib/debug/stats_data.c b/src/core/lib/debug/stats_data.cc
index c0aec63c1d..c0aec63c1d 100644
--- a/src/core/lib/debug/stats_data.c
+++ b/src/core/lib/debug/stats_data.cc
diff --git a/src/core/lib/debug/stats_data.h b/src/core/lib/debug/stats_data.h
index 28dab00117..cf5bafbd04 100644
--- a/src/core/lib/debug/stats_data.h
+++ b/src/core/lib/debug/stats_data.h
@@ -24,6 +24,10 @@
#include <inttypes.h>
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED,
GRPC_STATS_COUNTER_SERVER_CALLS_CREATED,
@@ -467,4 +471,8 @@ extern const int *const grpc_stats_histo_bucket_boundaries[13];
extern void (*const grpc_stats_inc_histogram[13])(grpc_exec_ctx *exec_ctx,
int x);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */
diff --git a/src/core/lib/debug/trace.c b/src/core/lib/debug/trace.cc
index 7cb2789a19..21b0d8c3a6 100644
--- a/src/core/lib/debug/trace.c
+++ b/src/core/lib/debug/trace.cc
@@ -20,6 +20,7 @@
#include <string.h>
+#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/support/env.h"
diff --git a/src/core/lib/debug/trace.h b/src/core/lib/debug/trace.h
index 64f2e3fc33..558ba942bb 100644
--- a/src/core/lib/debug/trace.h
+++ b/src/core/lib/debug/trace.h
@@ -23,6 +23,10 @@
#include <grpc/support/port_platform.h>
#include <stdbool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if defined(__has_feature)
#if __has_feature(thread_sanitizer)
#define GRPC_THREADSAFE_TRACER
@@ -52,4 +56,8 @@ void grpc_register_tracer(grpc_tracer_flag *flag);
void grpc_tracer_init(const char *env_var_name);
void grpc_tracer_shutdown(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_DEBUG_TRACE_H */