aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/surface
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/surface')
-rw-r--r--src/core/lib/surface/alarm.cc6
-rw-r--r--src/core/lib/surface/byte_buffer.cc2
-rw-r--r--src/core/lib/surface/byte_buffer_reader.cc4
-rw-r--r--src/core/lib/surface/call.cc8
-rw-r--r--src/core/lib/surface/call_details.cc2
-rw-r--r--src/core/lib/surface/channel.cc10
-rw-r--r--src/core/lib/surface/channel_ping.cc2
-rw-r--r--src/core/lib/surface/completion_queue.cc24
-rw-r--r--src/core/lib/surface/init.cc4
-rw-r--r--src/core/lib/surface/lame_client.cc2
-rw-r--r--src/core/lib/surface/server.cc12
11 files changed, 38 insertions, 38 deletions
diff --git a/src/core/lib/surface/alarm.cc b/src/core/lib/surface/alarm.cc
index 7aee100f3f..8dcfb1ddb5 100644
--- a/src/core/lib/surface/alarm.cc
+++ b/src/core/lib/surface/alarm.cc
@@ -47,7 +47,7 @@ static void alarm_ref(grpc_alarm* alarm) { gpr_ref(&alarm->refs); }
static void alarm_unref(grpc_alarm* alarm) {
if (gpr_unref(&alarm->refs)) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
if (alarm->cq != NULL) {
GRPC_CQ_INTERNAL_UNREF(alarm->cq, "alarm");
}
@@ -117,7 +117,7 @@ grpc_alarm* grpc_alarm_create(void* reserved) {
void grpc_alarm_set(grpc_alarm* alarm, grpc_completion_queue* cq,
gpr_timespec deadline, void* tag, void* reserved) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_CQ_INTERNAL_REF(cq, "alarm");
alarm->cq = cq;
@@ -129,7 +129,7 @@ void grpc_alarm_set(grpc_alarm* alarm, grpc_completion_queue* cq,
}
void grpc_alarm_cancel(grpc_alarm* alarm, void* reserved) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_timer_cancel(&alarm->alarm);
}
diff --git a/src/core/lib/surface/byte_buffer.cc b/src/core/lib/surface/byte_buffer.cc
index 6a9b13bb41..03097c6896 100644
--- a/src/core/lib/surface/byte_buffer.cc
+++ b/src/core/lib/surface/byte_buffer.cc
@@ -71,7 +71,7 @@ grpc_byte_buffer* grpc_byte_buffer_copy(grpc_byte_buffer* bb) {
void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) {
if (!bb) return;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
switch (bb->type) {
case GRPC_BB_RAW:
grpc_slice_buffer_destroy_internal(&bb->data.raw.slice_buffer);
diff --git a/src/core/lib/surface/byte_buffer_reader.cc b/src/core/lib/surface/byte_buffer_reader.cc
index 9a9e26ecdc..c5f8df3dda 100644
--- a/src/core/lib/surface/byte_buffer_reader.cc
+++ b/src/core/lib/surface/byte_buffer_reader.cc
@@ -42,7 +42,7 @@ static int is_compressed(grpc_byte_buffer* buffer) {
int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
grpc_byte_buffer* buffer) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice_buffer decompressed_slices_buffer;
reader->buffer_in = buffer;
switch (reader->buffer_in->type) {
@@ -110,7 +110,7 @@ grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader* reader) {
grpc_slice out_slice = GRPC_SLICE_MALLOC(input_size);
uint8_t* const outbuf = GRPC_SLICE_START_PTR(out_slice); /* just an alias */
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
while (grpc_byte_buffer_reader_next(reader, &in_slice) != 0) {
const size_t slice_length = GRPC_SLICE_LENGTH(in_slice);
memcpy(&(outbuf[bytes_read]), GRPC_SLICE_START_PTR(in_slice), slice_length);
diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc
index bbb7a39e29..cb858785f2 100644
--- a/src/core/lib/surface/call.cc
+++ b/src/core/lib/surface/call.cc
@@ -561,7 +561,7 @@ void grpc_call_unref(grpc_call* c) {
if (!gpr_unref(&c->ext_ref)) return;
child_call* cc = c->child;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_TIMER_BEGIN("grpc_call_unref", 0);
GRPC_API_TRACE("grpc_call_unref(c=%p)", 1, (c));
@@ -602,7 +602,7 @@ void grpc_call_unref(grpc_call* c) {
grpc_call_error grpc_call_cancel(grpc_call* call, void* reserved) {
GRPC_API_TRACE("grpc_call_cancel(call=%p, reserved=%p)", 2, (call, reserved));
GPR_ASSERT(!reserved);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
cancel_with_error(call, STATUS_FROM_API_OVERRIDE, GRPC_ERROR_CANCELLED);
return GRPC_CALL_OK;
@@ -652,7 +652,7 @@ grpc_call_error grpc_call_cancel_with_status(grpc_call* c,
grpc_status_code status,
const char* description,
void* reserved) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_API_TRACE(
"grpc_call_cancel_with_status("
"c=%p, status=%d, description=%s, reserved=%p)",
@@ -2034,7 +2034,7 @@ done_with_error:
grpc_call_error grpc_call_start_batch(grpc_call* call, const grpc_op* ops,
size_t nops, void* tag, void* reserved) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_call_error err;
GRPC_API_TRACE(
diff --git a/src/core/lib/surface/call_details.cc b/src/core/lib/surface/call_details.cc
index 03ce7f88fb..7d81ba9e22 100644
--- a/src/core/lib/surface/call_details.cc
+++ b/src/core/lib/surface/call_details.cc
@@ -34,7 +34,7 @@ void grpc_call_details_init(grpc_call_details* cd) {
void grpc_call_details_destroy(grpc_call_details* cd) {
GRPC_API_TRACE("grpc_call_details_destroy(cd=%p)", 1, (cd));
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_slice_unref_internal(cd->method);
grpc_slice_unref_internal(cd->host);
}
diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc
index 7725351f74..80ba47676e 100644
--- a/src/core/lib/surface/channel.cc
+++ b/src/core/lib/surface/channel.cc
@@ -248,7 +248,7 @@ char* grpc_channel_get_target(grpc_channel* channel) {
void grpc_channel_get_info(grpc_channel* channel,
const grpc_channel_info* channel_info) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_element* elem =
grpc_channel_stack_element(CHANNEL_STACK_FROM_CHANNEL(channel), 0);
elem->filter->get_channel_info(elem, channel_info);
@@ -296,7 +296,7 @@ grpc_call* grpc_channel_create_call(grpc_channel* channel,
grpc_slice method, const grpc_slice* host,
gpr_timespec deadline, void* reserved) {
GPR_ASSERT(!reserved);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_call* call = grpc_channel_create_call_internal(
channel, parent_call, propagation_mask, cq, NULL,
grpc_mdelem_from_slices(GRPC_MDSTR_PATH, grpc_slice_ref_internal(method)),
@@ -329,7 +329,7 @@ void* grpc_channel_register_call(grpc_channel* channel, const char* method,
"grpc_channel_register_call(channel=%p, method=%s, host=%s, reserved=%p)",
4, (channel, method, host, reserved));
GPR_ASSERT(!reserved);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
rc->path = grpc_mdelem_from_slices(
GRPC_MDSTR_PATH,
@@ -364,7 +364,7 @@ grpc_call* grpc_channel_create_registered_call(
registered_call_handle, deadline.tv_sec, deadline.tv_nsec,
(int)deadline.clock_type, reserved));
GPR_ASSERT(!reserved);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_call* call = grpc_channel_create_call_internal(
channel, parent_call, propagation_mask, completion_queue, NULL,
GRPC_MDELEM_REF(rc->path), GRPC_MDELEM_REF(rc->authority),
@@ -407,7 +407,7 @@ static void destroy_channel(void* arg, grpc_error* error) {
void grpc_channel_destroy(grpc_channel* channel) {
grpc_transport_op* op = grpc_make_transport_op(NULL);
grpc_channel_element* elem;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_API_TRACE("grpc_channel_destroy(channel=%p)", 1, (channel));
op->disconnect_with_error =
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel Destroyed");
diff --git a/src/core/lib/surface/channel_ping.cc b/src/core/lib/surface/channel_ping.cc
index 06cdbf6c73..545b8fe6ee 100644
--- a/src/core/lib/surface/channel_ping.cc
+++ b/src/core/lib/surface/channel_ping.cc
@@ -51,7 +51,7 @@ void grpc_channel_ping(grpc_channel* channel, grpc_completion_queue* cq,
ping_result* pr = (ping_result*)gpr_malloc(sizeof(*pr));
grpc_channel_element* top_elem =
grpc_channel_stack_element(grpc_channel_get_channel_stack(channel), 0);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_ASSERT(reserved == NULL);
pr->tag = tag;
pr->cq = cq;
diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc
index 0b0a8d070d..24c502881a 100644
--- a/src/core/lib/surface/completion_queue.cc
+++ b/src/core/lib/surface/completion_queue.cc
@@ -124,7 +124,7 @@ static grpc_error* non_polling_poller_work(grpc_pollset* pollset,
while (!npp->shutdown && !w.kicked &&
!gpr_cv_wait(&w.cv, &npp->mu, deadline_ts))
;
- ExecCtx::Get()->InvalidateNow();
+ grpc_core::ExecCtx::Get()->InvalidateNow();
if (&w == npp->root) {
npp->root = w.next;
if (&w == npp->root) {
@@ -359,7 +359,7 @@ int grpc_completion_queue_thread_local_cache_flush(grpc_completion_queue* cq,
if (storage != NULL &&
(grpc_completion_queue*)gpr_tls_get(&g_cached_cq) == cq) {
*tag = storage->tag;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
*ok = (storage->next & (uintptr_t)(1)) == 1;
storage->done(storage->done_arg, storage);
ret = 1;
@@ -395,7 +395,7 @@ static bool cq_event_queue_push(grpc_cq_event_queue* q, grpc_cq_completion* c) {
static grpc_cq_completion* cq_event_queue_pop(grpc_cq_event_queue* q) {
grpc_cq_completion* c = NULL;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
if (gpr_spinlock_trylock(&q->queue_lock)) {
GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES();
@@ -440,7 +440,7 @@ grpc_completion_queue* grpc_completion_queue_create_internal(
const cq_poller_vtable* poller_vtable =
&g_poller_vtable_by_poller_type[polling_type];
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_STATS_INC_CQS_CREATED();
cq = (grpc_completion_queue*)gpr_zalloc(sizeof(grpc_completion_queue) +
@@ -790,7 +790,7 @@ typedef struct {
bool first_loop;
} cq_is_finished_arg;
-class ExecCtxNext : public ExecCtx {
+class ExecCtxNext : public grpc_core::ExecCtx {
public:
ExecCtxNext(void* arg) : ExecCtx(0), check_ready_to_finish_arg_(arg) {}
@@ -818,7 +818,7 @@ class ExecCtxNext : public ExecCtx {
return true;
}
}
- return !a->first_loop && a->deadline < ExecCtx::Get()->Now();
+ return !a->first_loop && a->deadline < grpc_core::ExecCtx::Get()->Now();
}
private:
@@ -929,7 +929,7 @@ static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline,
}
if (!is_finished_arg.first_loop &&
- ExecCtx::Get()->Now() >= deadline_millis) {
+ grpc_core::ExecCtx::Get()->Now() >= deadline_millis) {
memset(&ret, 0, sizeof(ret));
ret.type = GRPC_QUEUE_TIMEOUT;
dump_pending_tags(cq);
@@ -1045,7 +1045,7 @@ static void del_plucker(grpc_completion_queue* cq, void* tag,
GPR_UNREACHABLE_CODE(return );
}
-class ExecCtxPluck : public ExecCtx {
+class ExecCtxPluck : public grpc_core::ExecCtx {
public:
ExecCtxPluck(void* arg) : ExecCtx(0), check_ready_to_finish_arg_(arg) {}
@@ -1079,7 +1079,7 @@ class ExecCtxPluck : public ExecCtx {
}
gpr_mu_unlock(cq->mu);
}
- return !a->first_loop && a->deadline < ExecCtx::Get()->Now();
+ return !a->first_loop && a->deadline < grpc_core::ExecCtx::Get()->Now();
}
private:
@@ -1169,7 +1169,7 @@ static grpc_event cq_pluck(grpc_completion_queue* cq, void* tag,
break;
}
if (!is_finished_arg.first_loop &&
- ExecCtx::Get()->Now() >= deadline_millis) {
+ grpc_core::ExecCtx::Get()->Now() >= deadline_millis) {
del_plucker(cq, tag, &worker);
gpr_mu_unlock(cq->mu);
memset(&ret, 0, sizeof(ret));
@@ -1250,7 +1250,7 @@ static void cq_shutdown_pluck(grpc_completion_queue* cq) {
/* Shutdown simply drops a ref that we reserved at creation time; if we drop
to zero here, then enter shutdown mode and wake up any waiters */
void grpc_completion_queue_shutdown(grpc_completion_queue* cq) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GPR_TIMER_BEGIN("grpc_completion_queue_shutdown", 0);
GRPC_API_TRACE("grpc_completion_queue_shutdown(cq=%p)", 1, (cq));
cq->vtable->shutdown(cq);
@@ -1263,7 +1263,7 @@ void grpc_completion_queue_destroy(grpc_completion_queue* cq) {
GPR_TIMER_BEGIN("grpc_completion_queue_destroy", 0);
grpc_completion_queue_shutdown(cq);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_CQ_INTERNAL_UNREF(cq, "destroy");
GPR_TIMER_END("grpc_completion_queue_destroy", 0);
diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc
index 20e17a7f60..fdbf926f77 100644
--- a/src/core/lib/surface/init.cc
+++ b/src/core/lib/surface/init.cc
@@ -116,7 +116,7 @@ void grpc_init(void) {
int i;
gpr_once_init(&g_basic_init, do_basic_init);
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_mu_lock(&g_init_mu);
if (++g_initializations == 1) {
gpr_time_init();
@@ -175,7 +175,7 @@ void grpc_init(void) {
void grpc_shutdown(void) {
int i;
GRPC_API_TRACE("grpc_shutdown(void)", 0, ());
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
gpr_mu_lock(&g_init_mu);
if (--g_initializations == 0) {
grpc_executor_shutdown();
diff --git a/src/core/lib/surface/lame_client.cc b/src/core/lib/surface/lame_client.cc
index da081e68cb..3bbdd21285 100644
--- a/src/core/lib/surface/lame_client.cc
+++ b/src/core/lib/surface/lame_client.cc
@@ -156,7 +156,7 @@ extern "C" const grpc_channel_filter grpc_lame_filter = {
grpc_channel* grpc_lame_client_channel_create(const char* target,
grpc_status_code error_code,
const char* error_message) {
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
grpc_channel_element* elem;
grpc_channel* channel =
grpc_channel_create(target, NULL, GRPC_CLIENT_LAME_CHANNEL, NULL);
diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc
index 0d4435d556..835e495495 100644
--- a/src/core/lib/surface/server.cc
+++ b/src/core/lib/surface/server.cc
@@ -1022,7 +1022,7 @@ static void start_listeners(void* s, grpc_error* error) {
void grpc_server_start(grpc_server* server) {
size_t i;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_API_TRACE("grpc_server_start(server=%p)", 1, (server));
@@ -1168,7 +1168,7 @@ void grpc_server_shutdown_and_notify(grpc_server* server,
listener* l;
shutdown_tag* sdt;
channel_broadcaster broadcaster;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_API_TRACE("grpc_server_shutdown_and_notify(server=%p, cq=%p, tag=%p)", 3,
(server, cq, tag));
@@ -1227,7 +1227,7 @@ void grpc_server_shutdown_and_notify(grpc_server* server,
void grpc_server_cancel_all_calls(grpc_server* server) {
channel_broadcaster broadcaster;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_API_TRACE("grpc_server_cancel_all_calls(server=%p)", 1, (server));
@@ -1242,7 +1242,7 @@ void grpc_server_cancel_all_calls(grpc_server* server) {
void grpc_server_destroy(grpc_server* server) {
listener* l;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
GRPC_API_TRACE("grpc_server_destroy(server=%p)", 1, (server));
@@ -1324,7 +1324,7 @@ grpc_call_error grpc_server_request_call(
grpc_completion_queue* cq_bound_to_call,
grpc_completion_queue* cq_for_notification, void* tag) {
grpc_call_error error;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
requested_call* rc = (requested_call*)gpr_malloc(sizeof(*rc));
GRPC_STATS_INC_SERVER_REQUESTED_CALLS();
GRPC_API_TRACE(
@@ -1371,7 +1371,7 @@ grpc_call_error grpc_server_request_registered_call(
grpc_completion_queue* cq_bound_to_call,
grpc_completion_queue* cq_for_notification, void* tag) {
grpc_call_error error;
- ExecCtx _local_exec_ctx;
+ grpc_core::ExecCtx _local_exec_ctx;
requested_call* rc = (requested_call*)gpr_malloc(sizeof(*rc));
registered_method* rm = (registered_method*)rmp;
GRPC_STATS_INC_SERVER_REQUESTED_CALLS();