aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-09-16 07:35:37 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-09-16 07:35:37 -0700
commitabf03aed93e95c934143bcb986add21ed8ca239f (patch)
tree4e290c0e0046ae8fd13a2c2fab46f5e69ab6dbf0 /src/cpp
parent311e7badb80cceac466b57f03094844a2c289cf4 (diff)
parentd2f7268bc702d0bf2083b9dedb2ec07544b83dd2 (diff)
Merge remote-tracking branch 'upstream/master' into max_send_size_filter
Diffstat (limited to 'src/cpp')
-rw-r--r--src/cpp/client/client_context.cc1
-rw-r--r--src/cpp/common/channel_filter.h2
-rw-r--r--src/cpp/common/core_codegen.cc27
3 files changed, 26 insertions, 4 deletions
diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc
index 74bb7b0d1c..5b6aaa777b 100644
--- a/src/cpp/client/client_context.cc
+++ b/src/cpp/client/client_context.cc
@@ -36,6 +36,7 @@
#include <grpc/compression.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc++/security/credentials.h>
diff --git a/src/cpp/common/channel_filter.h b/src/cpp/common/channel_filter.h
index ec2af63afd..6f5af3dec3 100644
--- a/src/cpp/common/channel_filter.h
+++ b/src/cpp/common/channel_filter.h
@@ -36,7 +36,7 @@
#include <grpc++/impl/codegen/config.h>
#include <grpc/grpc.h>
-#include <grpc/impl/codegen/alloc.h>
+#include <grpc/support/alloc.h>
#include <functional>
#include <vector>
diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc
index 3d6780bcb8..ce02202976 100644
--- a/src/cpp/common/core_codegen.cc
+++ b/src/cpp/common/core_codegen.cc
@@ -39,15 +39,19 @@
#include <grpc/byte_buffer.h>
#include <grpc/byte_buffer_reader.h>
#include <grpc/grpc.h>
-#include <grpc/impl/codegen/alloc.h>
-#include <grpc/impl/codegen/byte_buffer.h>
-#include <grpc/impl/codegen/log.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/slice.h>
#include <grpc/support/slice_buffer.h>
+#include <grpc/support/sync.h>
#include "src/core/lib/profiling/timers.h"
+extern "C" {
+struct grpc_byte_buffer;
+}
+
namespace grpc {
grpc_completion_queue* CoreCodegen::grpc_completion_queue_create(
@@ -70,6 +74,19 @@ void* CoreCodegen::gpr_malloc(size_t size) { return ::gpr_malloc(size); }
void CoreCodegen::gpr_free(void* p) { return ::gpr_free(p); }
+void CoreCodegen::gpr_mu_init(gpr_mu* mu) { ::gpr_mu_init(mu); };
+void CoreCodegen::gpr_mu_destroy(gpr_mu* mu) { ::gpr_mu_destroy(mu); }
+void CoreCodegen::gpr_mu_lock(gpr_mu* mu) { ::gpr_mu_lock(mu); }
+void CoreCodegen::gpr_mu_unlock(gpr_mu* mu) { ::gpr_mu_unlock(mu); }
+void CoreCodegen::gpr_cv_init(gpr_cv* cv) { ::gpr_cv_init(cv); }
+void CoreCodegen::gpr_cv_destroy(gpr_cv* cv) { ::gpr_cv_destroy(cv); }
+int CoreCodegen::gpr_cv_wait(gpr_cv* cv, gpr_mu* mu,
+ gpr_timespec abs_deadline) {
+ return ::gpr_cv_wait(cv, mu, abs_deadline);
+}
+void CoreCodegen::gpr_cv_signal(gpr_cv* cv) { ::gpr_cv_signal(cv); }
+void CoreCodegen::gpr_cv_broadcast(gpr_cv* cv) { ::gpr_cv_broadcast(cv); }
+
void CoreCodegen::grpc_byte_buffer_destroy(grpc_byte_buffer* bb) {
::grpc_byte_buffer_destroy(bb);
}
@@ -128,6 +145,10 @@ gpr_timespec CoreCodegen::gpr_inf_future(gpr_clock_type type) {
return ::gpr_inf_future(type);
}
+gpr_timespec CoreCodegen::gpr_time_0(gpr_clock_type type) {
+ return ::gpr_time_0(type);
+}
+
void CoreCodegen::assert_fail(const char* failed_assertion) {
gpr_log(GPR_ERROR, "assertion failed: %s", failed_assertion);
abort();