diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
commit | 6c26b16fe06b1cc75b4dac372f4f51f6b7d1bfc0 (patch) | |
tree | 5d9b7bbdcf125bfc103b67778349ea075b049bb4 /src/core/lib/transport | |
parent | 75122c23578e24417dcf64081c737571a9fc2dbc (diff) |
Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes
Diffstat (limited to 'src/core/lib/transport')
-rw-r--r-- | src/core/lib/transport/bdp_estimator.cc | 2 | ||||
-rw-r--r-- | src/core/lib/transport/status_conversion.cc | 5 | ||||
-rw-r--r-- | src/core/lib/transport/transport.cc | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/core/lib/transport/bdp_estimator.cc b/src/core/lib/transport/bdp_estimator.cc index 4e279b4d94..d2b6e5db25 100644 --- a/src/core/lib/transport/bdp_estimator.cc +++ b/src/core/lib/transport/bdp_estimator.cc @@ -79,7 +79,7 @@ grpc_millis BdpEstimator::CompletePing() { } ping_state_ = PingState::UNSCHEDULED; accumulator_ = 0; - return ExecCtx::Get()->Now() + inter_ping_delay_; + return grpc_core::ExecCtx::Get()->Now() + inter_ping_delay_; } } // namespace grpc_core diff --git a/src/core/lib/transport/status_conversion.cc b/src/core/lib/transport/status_conversion.cc index 61470b8c78..46cba4292b 100644 --- a/src/core/lib/transport/status_conversion.cc +++ b/src/core/lib/transport/status_conversion.cc @@ -46,8 +46,9 @@ grpc_status_code grpc_http2_error_to_grpc_status(grpc_http2_error_code error, case GRPC_HTTP2_CANCEL: /* http2 cancel translates to STATUS_CANCELLED iff deadline hasn't been * exceeded */ - return ExecCtx::Get()->Now() > deadline ? GRPC_STATUS_DEADLINE_EXCEEDED - : GRPC_STATUS_CANCELLED; + return grpc_core::ExecCtx::Get()->Now() > deadline + ? GRPC_STATUS_DEADLINE_EXCEEDED + : GRPC_STATUS_CANCELLED; case GRPC_HTTP2_ENHANCE_YOUR_CALM: return GRPC_STATUS_RESOURCE_EXHAUSTED; case GRPC_HTTP2_INADEQUATE_SECURITY: diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc index ca80a7404d..ed2f02de55 100644 --- a/src/core/lib/transport/transport.cc +++ b/src/core/lib/transport/transport.cc @@ -62,7 +62,8 @@ void grpc_stream_unref(grpc_stream_refcount* refcount, const char* reason) { void grpc_stream_unref(grpc_stream_refcount* refcount) { #endif if (gpr_unref(&refcount->refs)) { - if (ExecCtx::Get()->flags() & GRPC_EXEC_CTX_FLAG_THREAD_RESOURCE_LOOP) { + if (grpc_core::ExecCtx::Get()->flags() & + GRPC_EXEC_CTX_FLAG_THREAD_RESOURCE_LOOP) { /* Ick. The thread we're running on MAY be owned (indirectly) by a call-stack. If that's the case, destroying the call-stack MAY try to destroy the |