diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 7420ea1f3d0..7963ea75e77 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -49,6 +49,10 @@ extern grpc_tracer_flag grpc_trace_operation_failures; extern grpc_tracer_flag grpc_trace_pending_tags; #endif +#ifdef __cplusplus +extern "C" { +#endif + typedef struct grpc_cq_completion { gpr_mpscq_node node; @@ -108,4 +112,8 @@ int grpc_get_cq_poll_num(grpc_completion_queue *cc); grpc_completion_queue *grpc_completion_queue_create_internal( grpc_cq_completion_type completion_type, grpc_cq_polling_type polling_type); +#ifdef __cplusplus +} +#endif + #endif /* GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_H */ diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index bebe1b9b1e2..5ae6b54f89d 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -46,6 +46,7 @@ #include #include +#include "src/core/lib/surface/completion_queue.h" #include "src/proto/grpc/testing/payloads.pb.h" #include "src/proto/grpc/testing/services.grpc.pb.h" @@ -54,10 +55,6 @@ #include "test/cpp/qps/usage_timer.h" #include "test/cpp/util/create_test_channel.h" -extern "C" { -#include "src/core/lib/surface/completion_queue.h" -} - namespace grpc { namespace testing { diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 007770421ae..a03dd1a695b 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -38,16 +38,13 @@ #include #include +#include "src/core/lib/surface/completion_queue.h" #include "src/proto/grpc/testing/control.pb.h" #include "src/proto/grpc/testing/messages.pb.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/cpp/qps/usage_timer.h" -extern "C" { -#include "src/core/lib/surface/completion_queue.h" -} - namespace grpc { namespace testing {