aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/support')
-rw-r--r--src/core/lib/support/arena.h8
-rw-r--r--src/core/lib/support/backoff.h8
-rw-r--r--src/core/lib/support/mpscq.h8
-rw-r--r--src/core/lib/support/murmur_hash.h8
-rw-r--r--src/core/lib/support/stack_lockfree.h8
-rw-r--r--src/core/lib/support/string_windows.h8
-rw-r--r--src/core/lib/support/time_precise.h8
7 files changed, 56 insertions, 0 deletions
diff --git a/src/core/lib/support/arena.h b/src/core/lib/support/arena.h
index 47f0e4d16b..8a50786348 100644
--- a/src/core/lib/support/arena.h
+++ b/src/core/lib/support/arena.h
@@ -27,6 +27,10 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct gpr_arena gpr_arena;
// Create an arena, with \a initial_size bytes in the first allocated buffer
@@ -36,4 +40,8 @@ void *gpr_arena_alloc(gpr_arena *arena, size_t size);
// Destroy an arena, returning the total number of bytes allocated
size_t gpr_arena_destroy(gpr_arena *arena);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_ARENA_H */
diff --git a/src/core/lib/support/backoff.h b/src/core/lib/support/backoff.h
index 6e0cc3a4b6..31ec28f666 100644
--- a/src/core/lib/support/backoff.h
+++ b/src/core/lib/support/backoff.h
@@ -21,6 +21,10 @@
#include <grpc/support/time.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
/// const: how long to wait after the first failure before retrying
int64_t initial_connect_timeout;
@@ -53,4 +57,8 @@ gpr_timespec gpr_backoff_step(gpr_backoff *backoff, gpr_timespec now);
/// instead
void gpr_backoff_reset(gpr_backoff *backoff);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_BACKOFF_H */
diff --git a/src/core/lib/support/mpscq.h b/src/core/lib/support/mpscq.h
index daa51768f7..ca63a044bb 100644
--- a/src/core/lib/support/mpscq.h
+++ b/src/core/lib/support/mpscq.h
@@ -23,6 +23,10 @@
#include <stdbool.h>
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Multiple-producer single-consumer lock free queue, based upon the
// implementation from Dmitry Vyukov here:
// http://www.1024cores.net/home/lock-free-algorithms/queues/intrusive-mpsc-node-based-queue
@@ -50,4 +54,8 @@ gpr_mpscq_node *gpr_mpscq_pop(gpr_mpscq *q);
// Pop a node; sets *empty to true if the queue is empty, or false if it is not
gpr_mpscq_node *gpr_mpscq_pop_and_check_end(gpr_mpscq *q, bool *empty);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_MPSCQ_H */
diff --git a/src/core/lib/support/murmur_hash.h b/src/core/lib/support/murmur_hash.h
index 7510b4d09c..a4c642e49f 100644
--- a/src/core/lib/support/murmur_hash.h
+++ b/src/core/lib/support/murmur_hash.h
@@ -23,7 +23,15 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* compute the hash of key (length len) */
uint32_t gpr_murmur_hash3(const void *key, size_t len, uint32_t seed);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_MURMUR_HASH_H */
diff --git a/src/core/lib/support/stack_lockfree.h b/src/core/lib/support/stack_lockfree.h
index 6324211b72..706f63fbf6 100644
--- a/src/core/lib/support/stack_lockfree.h
+++ b/src/core/lib/support/stack_lockfree.h
@@ -21,6 +21,10 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct gpr_stack_lockfree gpr_stack_lockfree;
/* This stack must specify the maximum number of entries to track.
@@ -35,4 +39,8 @@ int gpr_stack_lockfree_push(gpr_stack_lockfree *, int entry);
/* Returns -1 on empty or the actual entry number */
int gpr_stack_lockfree_pop(gpr_stack_lockfree *stack);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_STACK_LOCKFREE_H */
diff --git a/src/core/lib/support/string_windows.h b/src/core/lib/support/string_windows.h
index 7c7f31e7aa..6771647581 100644
--- a/src/core/lib/support/string_windows.h
+++ b/src/core/lib/support/string_windows.h
@@ -21,6 +21,10 @@
#include <grpc/support/port_platform.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef GPR_WINDOWS
/* These allocate new strings using gpr_malloc to convert from and to utf-8. */
@@ -29,4 +33,8 @@ LPSTR gpr_tchar_to_char(LPCTSTR input);
#endif /* GPR_WINDOWS */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_STRING_WINDOWS_H */
diff --git a/src/core/lib/support/time_precise.h b/src/core/lib/support/time_precise.h
index aa28d6d7c4..cb15cdf919 100644
--- a/src/core/lib/support/time_precise.h
+++ b/src/core/lib/support/time_precise.h
@@ -21,7 +21,15 @@
#include <grpc/support/time.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void gpr_precise_clock_init(void);
void gpr_precise_clock_now(gpr_timespec *clk);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_TIME_PRECISE_H */