aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-09-21 12:57:30 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2017-10-02 16:23:34 -0700
commit53a47f09e2fe9755608eac9308a90d232fb1551f (patch)
treee0d723a311d5467d327a7f7ca1daebd79b8c4fea /src/core/lib/iomgr
parenta7e6d65a4864422854117149a6e98ff80e492fa9 (diff)
Changes for C to C++. Adding extern C to header files for compatibility.
Diffstat (limited to 'src/core/lib/iomgr')
-rw-r--r--src/core/lib/iomgr/iomgr_uv.h8
-rw-r--r--src/core/lib/iomgr/network_status_tracker.c1
-rw-r--r--src/core/lib/iomgr/wakeup_fd_cv.h4
-rw-r--r--src/core/lib/iomgr/wakeup_fd_pipe.c1
-rw-r--r--src/core/lib/iomgr/wakeup_fd_pipe.h8
-rw-r--r--src/core/lib/iomgr/wakeup_fd_posix.c1
6 files changed, 21 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/iomgr_uv.h b/src/core/lib/iomgr/iomgr_uv.h
index 3b4daaa73b..bc42ca8c1c 100644
--- a/src/core/lib/iomgr/iomgr_uv.h
+++ b/src/core/lib/iomgr/iomgr_uv.h
@@ -23,10 +23,18 @@
#include <grpc/support/thd.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* The thread ID of the thread on which grpc was initialized. Used to verify
* that all calls into libuv are made on that same thread */
extern gpr_thd_id g_init_thread;
+#ifdef __cplusplus
+}
+#endif
+
#ifdef GRPC_UV_THREAD_CHECK
#define GRPC_UV_ASSERT_SAME_THREAD() \
GPR_ASSERT(gpr_thd_currentid() == g_init_thread)
diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c
index 4e5c1d5408..fe5659160c 100644
--- a/src/core/lib/iomgr/network_status_tracker.c
+++ b/src/core/lib/iomgr/network_status_tracker.c
@@ -17,6 +17,7 @@
*/
#include "src/core/lib/iomgr/endpoint.h"
+#include "src/core/lib/iomgr/network_status_tracker.h"
void grpc_network_status_shutdown(void) {}
diff --git a/src/core/lib/iomgr/wakeup_fd_cv.h b/src/core/lib/iomgr/wakeup_fd_cv.h
index 34bc42fd7f..8f57de8152 100644
--- a/src/core/lib/iomgr/wakeup_fd_cv.h
+++ b/src/core/lib/iomgr/wakeup_fd_cv.h
@@ -66,8 +66,10 @@ typedef struct cv_fd_table {
grpc_poll_function_type poll;
} cv_fd_table;
+extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable;
+
#ifdef __cplusplus
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H */
diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c
index 4189488f8a..c9c390b587 100644
--- a/src/core/lib/iomgr/wakeup_fd_pipe.c
+++ b/src/core/lib/iomgr/wakeup_fd_pipe.c
@@ -21,6 +21,7 @@
#ifdef GRPC_POSIX_WAKEUP_FD
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
+#include "src/core/lib/iomgr/wakeup_fd_pipe.h"
#include <errno.h>
#include <string.h>
diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.h b/src/core/lib/iomgr/wakeup_fd_pipe.h
index f860406bda..c4c95ab358 100644
--- a/src/core/lib/iomgr/wakeup_fd_pipe.h
+++ b/src/core/lib/iomgr/wakeup_fd_pipe.h
@@ -21,6 +21,14 @@
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_PIPE_H */
diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c
index 25daa7d3fb..9af96d314b 100644
--- a/src/core/lib/iomgr/wakeup_fd_posix.c
+++ b/src/core/lib/iomgr/wakeup_fd_posix.c
@@ -25,7 +25,6 @@
#include "src/core/lib/iomgr/wakeup_fd_pipe.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
-extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable;
static const grpc_wakeup_fd_vtable *wakeup_fd_vtable = NULL;
int grpc_allow_specialized_wakeup_fd = 1;