diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-29 19:07:44 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-29 19:07:44 -0800 |
commit | c354269ba7bd1f6dfe9c86ba18f38fc8e346dcfc (patch) | |
tree | bcc5b75945a13ad9c2e805b66989206ebfd02d6f | |
parent | 26e934245d2af33f613f932f290315c5c9feca27 (diff) |
Remove _ prefixed variable names
158 files changed, 497 insertions, 497 deletions
diff --git a/src/core/ext/filters/client_channel/channel_connectivity.cc b/src/core/ext/filters/client_channel/channel_connectivity.cc index 1d5386643a..20693ba419 100644 --- a/src/core/ext/filters/client_channel/channel_connectivity.cc +++ b/src/core/ext/filters/client_channel/channel_connectivity.cc @@ -33,7 +33,7 @@ grpc_connectivity_state grpc_channel_check_connectivity_state( /* forward through to the underlying client channel */ grpc_channel_element* client_channel_elem = grpc_channel_stack_last_element(grpc_channel_get_channel_stack(channel)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_connectivity_state state; GRPC_API_TRACE( "grpc_channel_check_connectivity_state(channel=%p, try_to_connect=%d)", 2, @@ -198,7 +198,7 @@ void grpc_channel_watch_connectivity_state( gpr_timespec deadline, grpc_completion_queue* cq, void* tag) { grpc_channel_element* client_channel_elem = grpc_channel_stack_last_element(grpc_channel_get_channel_stack(channel)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; state_watcher* w = (state_watcher*)gpr_malloc(sizeof(*w)); GRPC_API_TRACE( diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc index d4b7f0b6c9..3a870b2d06 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc @@ -213,7 +213,7 @@ static void on_hostbyname_done_cb(void* arg, int status, int timeouts, static void on_srv_query_done_cb(void* arg, int status, int timeouts, unsigned char* abuf, int alen) { grpc_ares_request* r = (grpc_ares_request*)arg; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_DEBUG, "on_query_srv_done_cb"); if (status == ARES_SUCCESS) { gpr_log(GPR_DEBUG, "on_query_srv_done_cb ARES_SUCCESS"); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc index 9cf7bf884b..6a1b70964d 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc @@ -80,7 +80,7 @@ static grpc_client_channel_factory client_channel_factory = { grpc_channel* grpc_insecure_channel_create(const char* target, const grpc_channel_args* args, void* reserved) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE( "grpc_insecure_channel_create(target=%s, args=%p, reserved=%p)", 3, (target, args, reserved)); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc index bdd8d93bd3..6236551e24 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc @@ -37,7 +37,7 @@ grpc_channel* grpc_insecure_channel_create_from_fd( const char* target, int fd, const grpc_channel_args* args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE("grpc_insecure_channel_create(target=%p, fd=%d, args=%p)", 3, (target, fd, args)); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc index e0264cadc5..27c5b96a4c 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc @@ -190,7 +190,7 @@ grpc_channel* grpc_secure_channel_create(grpc_channel_credentials* creds, const char* target, const grpc_channel_args* args, void* reserved) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE( "grpc_secure_channel_create(creds=%p, target=%s, args=%p, " "reserved=%p)", diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc index 826886c961..52c42d056c 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc @@ -26,7 +26,7 @@ #include "src/core/lib/surface/server.h" int grpc_server_add_insecure_http2_port(grpc_server* server, const char* addr) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; int port_num = 0; GRPC_API_TRACE("grpc_server_add_insecure_http2_port(server=%p, addr=%s)", 2, (server, addr)); diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc index 56789ab53d..210939e6af 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc @@ -38,7 +38,7 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server* server, void* reserved, int fd) { GPR_ASSERT(reserved == nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; char* name; gpr_asprintf(&name, "fd:%d", fd); diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc index 7b426c18fb..723af97ff0 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc @@ -36,7 +36,7 @@ int grpc_server_add_secure_http2_port(grpc_server* server, const char* addr, grpc_server_credentials* creds) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_error* err = GRPC_ERROR_NONE; grpc_server_security_connector* sc = nullptr; int port_num = 0; diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc index 8e1dcc542e..40a30e4a31 100644 --- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc +++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc @@ -49,6 +49,6 @@ GRPCAPI grpc_channel* grpc_cronet_secure_channel_create( grpc_transport* ct = grpc_create_cronet_transport(engine, target, args, reserved); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; return grpc_channel_create(target, args, GRPC_CLIENT_DIRECT_CHANNEL, ct); } diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index f9f47a4a12..c9fd94176b 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -398,7 +398,7 @@ static void execute_from_storage(stream_obj* s) { */ static void on_failed(bidirectional_stream* stream, int net_error) { CRONET_LOG(GPR_DEBUG, "on_failed(%p, %d)", stream, net_error); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; stream_obj* s = (stream_obj*)stream->annotation; gpr_mu_lock(&s->mu); @@ -424,7 +424,7 @@ static void on_failed(bidirectional_stream* stream, int net_error) { */ static void on_canceled(bidirectional_stream* stream) { CRONET_LOG(GPR_DEBUG, "on_canceled(%p)", stream); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; stream_obj* s = (stream_obj*)stream->annotation; gpr_mu_lock(&s->mu); @@ -450,7 +450,7 @@ static void on_canceled(bidirectional_stream* stream) { */ static void on_succeeded(bidirectional_stream* stream) { CRONET_LOG(GPR_DEBUG, "on_succeeded(%p)", stream); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; stream_obj* s = (stream_obj*)stream->annotation; gpr_mu_lock(&s->mu); @@ -468,7 +468,7 @@ static void on_succeeded(bidirectional_stream* stream) { */ static void on_stream_ready(bidirectional_stream* stream) { CRONET_LOG(GPR_DEBUG, "W: on_stream_ready(%p)", stream); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; stream_obj* s = (stream_obj*)stream->annotation; grpc_cronet_transport* t = (grpc_cronet_transport*)s->curr_ct; gpr_mu_lock(&s->mu); @@ -498,7 +498,7 @@ static void on_response_headers_received( bidirectional_stream* stream, const bidirectional_stream_header_array* headers, const char* negotiated_protocol) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; CRONET_LOG(GPR_DEBUG, "R: on_response_headers_received(%p, %p, %s)", stream, headers, negotiated_protocol); stream_obj* s = (stream_obj*)stream->annotation; @@ -550,7 +550,7 @@ static void on_response_headers_received( Cronet callback */ static void on_write_completed(bidirectional_stream* stream, const char* data) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; stream_obj* s = (stream_obj*)stream->annotation; CRONET_LOG(GPR_DEBUG, "W: on_write_completed(%p, %s)", stream, data); gpr_mu_lock(&s->mu); @@ -568,7 +568,7 @@ static void on_write_completed(bidirectional_stream* stream, const char* data) { */ static void on_read_completed(bidirectional_stream* stream, char* data, int count) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; stream_obj* s = (stream_obj*)stream->annotation; CRONET_LOG(GPR_DEBUG, "R: on_read_completed(%p, %p, %d)", stream, data, count); @@ -610,7 +610,7 @@ static void on_read_completed(bidirectional_stream* stream, char* data, static void on_response_trailers_received( bidirectional_stream* stream, const bidirectional_stream_header_array* trailers) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; CRONET_LOG(GPR_DEBUG, "R: on_response_trailers_received(%p,%p)", stream, trailers); stream_obj* s = (stream_obj*)stream->annotation; diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index 18e77b9b1c..d816a5d1a7 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -1096,7 +1096,7 @@ static grpc_endpoint* get_endpoint(grpc_transport* t) { return nullptr; } static void do_nothing(void* arg, grpc_error* error) {} void grpc_inproc_transport_init(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_CLOSURE_INIT(&do_nothing_closure, do_nothing, nullptr, grpc_schedule_on_exec_ctx); g_empty_slice = grpc_slice_from_static_buffer(nullptr, 0); @@ -1160,7 +1160,7 @@ grpc_channel* grpc_inproc_channel_create(grpc_server* server, GRPC_API_TRACE("grpc_inproc_channel_create(server=%p, args=%p)", 2, (server, args)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; const grpc_channel_args* server_args = grpc_server_get_channel_args(server); @@ -1191,7 +1191,7 @@ grpc_channel* grpc_inproc_channel_create(grpc_server* server, } void grpc_inproc_transport_shutdown(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_unref_internal(g_empty_slice); grpc_slice_unref_internal(g_fake_path_key); grpc_slice_unref_internal(g_fake_path_value); diff --git a/src/core/lib/compression/stream_compression_gzip.cc b/src/core/lib/compression/stream_compression_gzip.cc index 6c4397759f..9d829b31db 100644 --- a/src/core/lib/compression/stream_compression_gzip.cc +++ b/src/core/lib/compression/stream_compression_gzip.cc @@ -40,7 +40,7 @@ static bool gzip_flate(grpc_stream_compression_context_gzip* ctx, /* Full flush is not allowed when inflating. */ GPR_ASSERT(!(ctx->flate == inflate && (flush == Z_FINISH))); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; int r; bool eoc = false; size_t original_max_output_size = max_output_size; diff --git a/src/core/lib/iomgr/endpoint_pair_posix.cc b/src/core/lib/iomgr/endpoint_pair_posix.cc index 65db4a9675..0b4aefd1b7 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.cc +++ b/src/core/lib/iomgr/endpoint_pair_posix.cc @@ -54,7 +54,7 @@ grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char* name, char* final_name; create_sockets(sv); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_asprintf(&final_name, "%s:client", name); p.client = grpc_tcp_create(grpc_fd_create(sv[1], final_name), args, diff --git a/src/core/lib/iomgr/endpoint_pair_windows.cc b/src/core/lib/iomgr/endpoint_pair_windows.cc index afd91c9932..cc07ac0708 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.cc +++ b/src/core/lib/iomgr/endpoint_pair_windows.cc @@ -72,7 +72,7 @@ grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( SOCKET sv[2]; grpc_endpoint_pair p; create_sockets(sv); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; p.client = grpc_tcp_create(grpc_winsocket_create(sv[1], "endpoint:client"), channel_args, "endpoint:server"); p.server = grpc_tcp_create(grpc_winsocket_create(sv[0], "endpoint:server"), diff --git a/src/core/lib/iomgr/executor.cc b/src/core/lib/iomgr/executor.cc index d2fb772765..d9b0c1daf0 100644 --- a/src/core/lib/iomgr/executor.cc +++ b/src/core/lib/iomgr/executor.cc @@ -143,7 +143,7 @@ static void executor_thread(void* arg) { thread_state* ts = (thread_state*)arg; gpr_tls_set(&g_this_thread_state, (intptr_t)ts); - grpc_core::ExecCtx _local_exec_ctx(0); + grpc_core::ExecCtx exec_ctx(0); size_t subtract_depth = 0; for (;;) { diff --git a/src/core/lib/iomgr/iocp_windows.cc b/src/core/lib/iomgr/iocp_windows.cc index f5c6297438..0b6e6823b3 100644 --- a/src/core/lib/iomgr/iocp_windows.cc +++ b/src/core/lib/iomgr/iocp_windows.cc @@ -113,7 +113,7 @@ void grpc_iocp_kick(void) { } void grpc_iocp_flush(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_iocp_work_status work_status; do { @@ -123,7 +123,7 @@ void grpc_iocp_flush(void) { } void grpc_iocp_shutdown(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (gpr_atm_acq_load(&g_custom_events)) { grpc_iocp_work(GRPC_MILLIS_INF_FUTURE); grpc_core::ExecCtx::Get()->Flush(); diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc index 27e9376272..dacf08ea9e 100644 --- a/src/core/lib/iomgr/iomgr.cc +++ b/src/core/lib/iomgr/iomgr.cc @@ -46,7 +46,7 @@ static int g_shutdown; static grpc_iomgr_object g_root_object; void grpc_iomgr_init() { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_shutdown = 0; gpr_mu_init(&g_mu); gpr_cv_init(&g_rcv); diff --git a/src/core/lib/iomgr/iomgr_uv.cc b/src/core/lib/iomgr/iomgr_uv.cc index 95b06e2ca5..9614c2e664 100644 --- a/src/core/lib/iomgr/iomgr_uv.cc +++ b/src/core/lib/iomgr/iomgr_uv.cc @@ -29,7 +29,7 @@ gpr_thd_id g_init_thread; void grpc_iomgr_platform_init(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_pollset_global_init(); grpc_executor_set_threading(false); diff --git a/src/core/lib/iomgr/resolve_address_uv.cc b/src/core/lib/iomgr/resolve_address_uv.cc index 54adf9b9f6..3eab04f3de 100644 --- a/src/core/lib/iomgr/resolve_address_uv.cc +++ b/src/core/lib/iomgr/resolve_address_uv.cc @@ -114,7 +114,7 @@ static grpc_error* handle_addrinfo_result(int status, struct addrinfo* result, static void getaddrinfo_callback(uv_getaddrinfo_t* req, int status, struct addrinfo* res) { request* r = (request*)req->data; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_error* error; int retry_status; char* port = r->port; diff --git a/src/core/lib/iomgr/resource_quota.cc b/src/core/lib/iomgr/resource_quota.cc index 55d559c466..cabe28e4e6 100644 --- a/src/core/lib/iomgr/resource_quota.cc +++ b/src/core/lib/iomgr/resource_quota.cc @@ -621,7 +621,7 @@ void grpc_resource_quota_unref_internal(grpc_resource_quota* resource_quota) { /* Public API */ void grpc_resource_quota_unref(grpc_resource_quota* resource_quota) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_quota_unref_internal(resource_quota); } @@ -646,7 +646,7 @@ double grpc_resource_quota_get_memory_pressure( /* Public API */ void grpc_resource_quota_resize(grpc_resource_quota* resource_quota, size_t size) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; rq_resize_args* a = (rq_resize_args*)gpr_malloc(sizeof(*a)); a->resource_quota = grpc_resource_quota_ref_internal(resource_quota); a->size = (int64_t)size; diff --git a/src/core/lib/iomgr/tcp_client_uv.cc b/src/core/lib/iomgr/tcp_client_uv.cc index 0ba074500b..0cb688cf16 100644 --- a/src/core/lib/iomgr/tcp_client_uv.cc +++ b/src/core/lib/iomgr/tcp_client_uv.cc @@ -76,7 +76,7 @@ static void uv_tc_on_alarm(void* acp, grpc_error* error) { static void uv_tc_on_connect(uv_connect_t* req, int status) { grpc_uv_tcp_connect* connect = (grpc_uv_tcp_connect*)req->data; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_error* error = GRPC_ERROR_NONE; int done; grpc_closure* closure = connect->closure; diff --git a/src/core/lib/iomgr/tcp_server_uv.cc b/src/core/lib/iomgr/tcp_server_uv.cc index 2181b12b23..55f16126b6 100644 --- a/src/core/lib/iomgr/tcp_server_uv.cc +++ b/src/core/lib/iomgr/tcp_server_uv.cc @@ -137,7 +137,7 @@ static void finish_shutdown(grpc_tcp_server* s) { static void handle_close_callback(uv_handle_t* handle) { grpc_tcp_listener* sp = (grpc_tcp_listener*)handle->data; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; sp->server->open_ports--; if (sp->server->open_ports == 0 && sp->server->shutdown) { finish_shutdown(sp->server); @@ -174,7 +174,7 @@ void grpc_tcp_server_unref(grpc_tcp_server* s) { GRPC_UV_ASSERT_SAME_THREAD(); if (gpr_unref(&s->refs)) { /* Complete shutdown_starting work before destroying. */ - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_CLOSURE_LIST_SCHED(&s->shutdown_starting); grpc_core::ExecCtx::Get()->Flush(); tcp_server_destroy(s); @@ -223,7 +223,7 @@ static void finish_accept(grpc_tcp_listener* sp) { static void on_connect(uv_stream_t* server, int status) { grpc_tcp_listener* sp = (grpc_tcp_listener*)server->data; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; if (status < 0) { switch (status) { diff --git a/src/core/lib/iomgr/tcp_uv.cc b/src/core/lib/iomgr/tcp_uv.cc index d41ddaf428..2c26b60511 100644 --- a/src/core/lib/iomgr/tcp_uv.cc +++ b/src/core/lib/iomgr/tcp_uv.cc @@ -111,14 +111,14 @@ static void tcp_ref(grpc_tcp* tcp) { gpr_ref(&tcp->refcount); } #endif static void uv_close_callback(uv_handle_t* handle) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_tcp* tcp = (grpc_tcp*)handle->data; TCP_UNREF(tcp, "destroy"); } static void alloc_uv_buf(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_tcp* tcp = (grpc_tcp*)handle->data; (void)suggested_size; /* Before calling uv_read_start, we allocate a buffer with exactly one slice @@ -151,7 +151,7 @@ static void call_read_cb(grpc_tcp* tcp, grpc_error* error) { static void read_callback(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { grpc_error* error; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_tcp* tcp = (grpc_tcp*)stream->data; grpc_slice_buffer garbage; if (nread == 0) { @@ -228,7 +228,7 @@ static void uv_endpoint_read(grpc_endpoint* ep, grpc_slice_buffer* read_slices, static void write_callback(uv_write_t* req, int status) { grpc_tcp* tcp = (grpc_tcp*)req->data; grpc_error* error; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_closure* cb = tcp->write_cb; tcp->write_cb = NULL; TCP_UNREF(tcp, "write"); @@ -372,7 +372,7 @@ grpc_endpoint* grpc_tcp_create(uv_tcp_t* handle, grpc_resource_quota* resource_quota, char* peer_string) { grpc_tcp* tcp = (grpc_tcp*)gpr_malloc(sizeof(grpc_tcp)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; if (grpc_tcp_trace.enabled()) { gpr_log(GPR_DEBUG, "Creating TCP endpoint %p", tcp); diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc index 0e1fa0c049..e11e9156c3 100644 --- a/src/core/lib/iomgr/timer_manager.cc +++ b/src/core/lib/iomgr/timer_manager.cc @@ -98,7 +98,7 @@ static void start_timer_thread_and_unlock(void) { } void grpc_timer_manager_tick() { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_millis next = GRPC_MILLIS_INF_FUTURE; grpc_timer_check(&next); } @@ -273,7 +273,7 @@ static void timer_thread_cleanup(completed_thread* ct) { static void timer_thread(void* completed_thread_ptr) { // this threads exec_ctx: we try to run things through to completion here // since it's easy to spin up new threads - grpc_core::ExecCtx _local_exec_ctx(0); + grpc_core::ExecCtx exec_ctx(0); timer_main_loop(); timer_thread_cleanup((completed_thread*)completed_thread_ptr); diff --git a/src/core/lib/iomgr/timer_uv.cc b/src/core/lib/iomgr/timer_uv.cc index 879890603c..5d238da089 100644 --- a/src/core/lib/iomgr/timer_uv.cc +++ b/src/core/lib/iomgr/timer_uv.cc @@ -42,7 +42,7 @@ static void stop_uv_timer(uv_timer_t* handle) { void run_expired_timer(uv_timer_t* handle) { grpc_timer* timer = (grpc_timer*)handle->data; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_UV_ASSERT_SAME_THREAD(); GPR_ASSERT(timer->pending); timer->pending = 0; diff --git a/src/core/lib/security/context/security_context.cc b/src/core/lib/security/context/security_context.cc index d4efdac583..0371027994 100644 --- a/src/core/lib/security/context/security_context.cc +++ b/src/core/lib/security/context/security_context.cc @@ -36,7 +36,7 @@ grpc_core::DebugOnlyTraceFlag grpc_trace_auth_context_refcount( grpc_call_error grpc_call_set_credentials(grpc_call* call, grpc_call_credentials* creds) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_client_security_context* ctx = nullptr; GRPC_API_TRACE("grpc_call_set_credentials(call=%p, creds=%p)", 2, (call, creds)); @@ -85,7 +85,7 @@ grpc_client_security_context* grpc_client_security_context_create(void) { } void grpc_client_security_context_destroy(void* ctx) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_client_security_context* c = (grpc_client_security_context*)ctx; grpc_call_credentials_unref(c->creds); GRPC_AUTH_CONTEXT_UNREF(c->auth_context, "client_security_context"); diff --git a/src/core/lib/security/credentials/credentials.cc b/src/core/lib/security/credentials/credentials.cc index d8a98fa3f0..48b459e1be 100644 --- a/src/core/lib/security/credentials/credentials.cc +++ b/src/core/lib/security/credentials/credentials.cc @@ -72,7 +72,7 @@ void grpc_channel_credentials_unref(grpc_channel_credentials* creds) { void grpc_channel_credentials_release(grpc_channel_credentials* creds) { GRPC_API_TRACE("grpc_channel_credentials_release(creds=%p)", 1, (creds)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_credentials_unref(creds); } @@ -94,7 +94,7 @@ void grpc_call_credentials_unref(grpc_call_credentials* creds) { void grpc_call_credentials_release(grpc_call_credentials* creds) { GRPC_API_TRACE("grpc_call_credentials_release(creds=%p)", 1, (creds)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_call_credentials_unref(creds); } @@ -211,7 +211,7 @@ void grpc_server_credentials_unref(grpc_server_credentials* creds) { void grpc_server_credentials_release(grpc_server_credentials* creds) { GRPC_API_TRACE("grpc_server_credentials_release(creds=%p)", 1, (creds)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_server_credentials_unref(creds); } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index 072dffe035..03d52850d9 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -221,7 +221,7 @@ grpc_channel_credentials* grpc_google_default_credentials_create(void) { grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Failed to create Google credentials"); grpc_error* err; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE("grpc_google_default_credentials_create(void)", 0, ()); @@ -291,7 +291,7 @@ end: } void grpc_flush_cached_google_default_credentials(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_once_init(&g_once, init_default_credentials); gpr_mu_lock(&g_state_mu); if (default_credentials != nullptr) { diff --git a/src/core/lib/security/credentials/iam/iam_credentials.cc b/src/core/lib/security/credentials/iam/iam_credentials.cc index 3b01137ed9..75acb2a58e 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.cc +++ b/src/core/lib/security/credentials/iam/iam_credentials.cc @@ -54,7 +54,7 @@ static grpc_call_credentials_vtable iam_vtable = { grpc_call_credentials* grpc_google_iam_credentials_create( const char* token, const char* authority_selector, void* reserved) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE( "grpc_iam_credentials_create(token=%s, authority_selector=%s, " "reserved=%p)", diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.cc b/src/core/lib/security/credentials/jwt/jwt_credentials.cc index 3eaedeea4e..2404e860e4 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.cc +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.cc @@ -181,7 +181,7 @@ grpc_call_credentials* grpc_service_account_jwt_access_credentials_create( gpr_free(clean_json); } GPR_ASSERT(reserved == nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_call_credentials* creds = grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key_create_from_string(json_key), token_lifetime); diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc index dc67a20e6f..39339f07d7 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc @@ -347,7 +347,7 @@ static verifier_cb_ctx* verifier_cb_ctx_create( grpc_jwt_claims* claims, const char* audience, grpc_slice signature, const char* signed_jwt, size_t signed_jwt_len, void* user_data, grpc_jwt_verification_done_cb cb) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; verifier_cb_ctx* ctx = (verifier_cb_ctx*)gpr_zalloc(sizeof(verifier_cb_ctx)); ctx->verifier = verifier; ctx->pollent = grpc_polling_entity_create_from_pollset(pollset); diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 0fe368d3f2..e243ea52c6 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -515,7 +515,7 @@ grpc_call_credentials* grpc_access_token_credentials_create( gpr_ref_init(&c->base.refcount, 1); char* token_md_value; gpr_asprintf(&token_md_value, "Bearer %s", access_token); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; c->access_token_md = grpc_mdelem_from_slices( grpc_slice_from_static_string(GRPC_AUTHORIZATION_METADATA_KEY), grpc_slice_from_copied_string(token_md_value)); diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc index a75ae033b9..203ba58c67 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc @@ -115,8 +115,8 @@ static void plugin_md_request_metadata_ready(void* request, grpc_status_code status, const char* error_details) { /* called from application code */ - grpc_core::ExecCtx _local_exec_ctx(GRPC_EXEC_CTX_FLAG_IS_FINISHED | - GRPC_EXEC_CTX_FLAG_THREAD_RESOURCE_LOOP); + grpc_core::ExecCtx exec_ctx(GRPC_EXEC_CTX_FLAG_IS_FINISHED | + GRPC_EXEC_CTX_FLAG_THREAD_RESOURCE_LOOP); grpc_plugin_credentials_pending_request* r = (grpc_plugin_credentials_pending_request*)request; if (grpc_plugin_credentials_trace.enabled()) { diff --git a/src/core/lib/security/transport/security_handshaker.cc b/src/core/lib/security/transport/security_handshaker.cc index 25a1e59ace..7623fbfd5b 100644 --- a/src/core/lib/security/transport/security_handshaker.cc +++ b/src/core/lib/security/transport/security_handshaker.cc @@ -271,7 +271,7 @@ static void on_handshake_next_done_grpc_wrapper( security_handshaker* h = (security_handshaker*)user_data; // This callback will be invoked by TSI in a non-grpc thread, so it's // safe to create our own exec_ctx here. - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_mu_lock(&h->mu); grpc_error* error = on_handshake_next_done_locked( h, result, bytes_to_send, bytes_to_send_size, handshaker_result); diff --git a/src/core/lib/security/transport/server_auth_filter.cc b/src/core/lib/security/transport/server_auth_filter.cc index 3566ddf64e..73653f2a66 100644 --- a/src/core/lib/security/transport/server_auth_filter.cc +++ b/src/core/lib/security/transport/server_auth_filter.cc @@ -118,7 +118,7 @@ static void on_md_processing_done( grpc_status_code status, const char* error_details) { grpc_call_element* elem = (grpc_call_element*)user_data; call_data* calld = (call_data*)elem->call_data; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; // If the call was not cancelled while we were in flight, process the result. if (gpr_atm_full_cas(&calld->state, (gpr_atm)STATE_INIT, (gpr_atm)STATE_DONE)) { diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc index 7ac6204716..1eb15290eb 100644 --- a/src/core/lib/slice/slice.cc +++ b/src/core/lib/slice/slice.cc @@ -67,7 +67,7 @@ grpc_slice grpc_slice_ref(grpc_slice slice) { /* Public API */ void grpc_slice_unref(grpc_slice slice) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_unref_internal(slice); } diff --git a/src/core/lib/slice/slice_buffer.cc b/src/core/lib/slice/slice_buffer.cc index dbe8d48343..33ec2af683 100644 --- a/src/core/lib/slice/slice_buffer.cc +++ b/src/core/lib/slice/slice_buffer.cc @@ -73,7 +73,7 @@ void grpc_slice_buffer_destroy_internal(grpc_slice_buffer* sb) { } void grpc_slice_buffer_destroy(grpc_slice_buffer* sb) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_buffer_destroy_internal(sb); } @@ -172,7 +172,7 @@ void grpc_slice_buffer_reset_and_unref_internal(grpc_slice_buffer* sb) { } void grpc_slice_buffer_reset_and_unref(grpc_slice_buffer* sb) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_buffer_reset_and_unref_internal(sb); } diff --git a/src/core/lib/surface/alarm.cc b/src/core/lib/surface/alarm.cc index 9a13a7b323..f6ea016c33 100644 --- a/src/core/lib/surface/alarm.cc +++ b/src/core/lib/surface/alarm.cc @@ -45,7 +45,7 @@ static void alarm_ref(grpc_alarm* alarm) { gpr_ref(&alarm->refs); } static void alarm_unref(grpc_alarm* alarm) { if (gpr_unref(&alarm->refs)) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; if (alarm->cq != nullptr) { GRPC_CQ_INTERNAL_UNREF(alarm->cq, "alarm"); } @@ -115,7 +115,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) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_CQ_INTERNAL_REF(cq, "alarm"); alarm->cq = cq; @@ -127,7 +127,7 @@ void grpc_alarm_set(grpc_alarm* alarm, grpc_completion_queue* cq, } void grpc_alarm_cancel(grpc_alarm* alarm, void* reserved) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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 b706f5ba9b..e4c2a4a4c2 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; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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 c5f8df3dda..81a48e95fc 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) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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 */ - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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 e4c8f01505..a457aaa7a2 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -560,7 +560,7 @@ void grpc_call_unref(grpc_call* c) { if (!gpr_unref(&c->ext_ref)) return; child_call* cc = c->child; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_TIMER_BEGIN("grpc_call_unref", 0); GRPC_API_TRACE("grpc_call_unref(c=%p)", 1, (c)); @@ -601,7 +601,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); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; cancel_with_error(call, STATUS_FROM_API_OVERRIDE, GRPC_ERROR_CANCELLED); return GRPC_CALL_OK; @@ -651,7 +651,7 @@ grpc_call_error grpc_call_cancel_with_status(grpc_call* c, grpc_status_code status, const char* description, void* reserved) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE( "grpc_call_cancel_with_status(" "c=%p, status=%d, description=%s, reserved=%p)", @@ -2038,7 +2038,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) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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 7d81ba9e22..cd0b14586a 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)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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 b44096fc32..cf5e8c2150 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) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_call* call = grpc_channel_create_call_internal( channel, parent_call, propagation_mask, cq, nullptr, 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); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_call* call = grpc_channel_create_call_internal( channel, parent_call, propagation_mask, completion_queue, nullptr, 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(nullptr); grpc_channel_element* elem; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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 c44307df8d..616ba9e0ac 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); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(reserved == nullptr); 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 958318f814..12385b7130 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -353,7 +353,7 @@ int grpc_completion_queue_thread_local_cache_flush(grpc_completion_queue* cq, if (storage != nullptr && (grpc_completion_queue*)gpr_tls_get(&g_cached_cq) == cq) { *tag = storage->tag; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; *ok = (storage->next & (uintptr_t)(1)) == 1; storage->done(storage->done_arg, storage); ret = 1; @@ -389,7 +389,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 = nullptr; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; if (gpr_spinlock_trylock(&q->queue_lock)) { GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES(); @@ -434,7 +434,7 @@ grpc_completion_queue* grpc_completion_queue_create_internal( const cq_poller_vtable* poller_vtable = &g_poller_vtable_by_poller_type[polling_type]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_STATS_INC_CQS_CREATED(); cq = (grpc_completion_queue*)gpr_zalloc(sizeof(grpc_completion_queue) + @@ -868,7 +868,7 @@ static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline, nullptr, nullptr, true}; - ExecCtxNext _local_exec_ctx(&is_finished_arg); + ExecCtxNext exec_ctx(&is_finished_arg); for (;;) { grpc_millis iteration_deadline = deadline_millis; @@ -1111,7 +1111,7 @@ static grpc_event cq_pluck(grpc_completion_queue* cq, void* tag, nullptr, tag, true}; - ExecCtxPluck _local_exec_ctx(&is_finished_arg); + ExecCtxPluck exec_ctx(&is_finished_arg); for (;;) { if (is_finished_arg.stolen_completion != nullptr) { gpr_mu_unlock(cq->mu); @@ -1240,7 +1240,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) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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); @@ -1253,7 +1253,7 @@ void grpc_completion_queue_destroy(grpc_completion_queue* cq) { GPR_TIMER_BEGIN("grpc_completion_queue_destroy", 0); grpc_completion_queue_shutdown(cq); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx 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 e6ff475a90..f96d8eba6c 100644 --- a/src/core/lib/surface/init.cc +++ b/src/core/lib/surface/init.cc @@ -157,7 +157,7 @@ void grpc_shutdown(void) { gpr_mu_lock(&g_init_mu); if (--g_initializations == 0) { { - grpc_core::ExecCtx _local_exec_ctx(0); + grpc_core::ExecCtx exec_ctx(0); { grpc_executor_shutdown(); grpc_timer_manager_set_threading( diff --git a/src/core/lib/surface/lame_client.cc b/src/core/lib/surface/lame_client.cc index d79f9a9ab2..011f5eae8b 100644 --- a/src/core/lib/surface/lame_client.cc +++ b/src/core/lib/surface/lame_client.cc @@ -154,7 +154,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) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_element* elem; grpc_channel* channel = grpc_channel_create(target, nullptr, GRPC_CLIENT_LAME_CHANNEL, nullptr); diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index e003b5410b..e9c92b04dc 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -1015,7 +1015,7 @@ static void start_listeners(void* s, grpc_error* error) { void grpc_server_start(grpc_server* server) { size_t i; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE("grpc_server_start(server=%p)", 1, (server)); @@ -1161,7 +1161,7 @@ void grpc_server_shutdown_and_notify(grpc_server* server, listener* l; shutdown_tag* sdt; channel_broadcaster broadcaster; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE("grpc_server_shutdown_and_notify(server=%p, cq=%p, tag=%p)", 3, (server, cq, tag)); @@ -1220,7 +1220,7 @@ void grpc_server_shutdown_and_notify(grpc_server* server, void grpc_server_cancel_all_calls(grpc_server* server) { channel_broadcaster broadcaster; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE("grpc_server_cancel_all_calls(server=%p)", 1, (server)); @@ -1235,7 +1235,7 @@ void grpc_server_cancel_all_calls(grpc_server* server) { void grpc_server_destroy(grpc_server* server) { listener* l; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE("grpc_server_destroy(server=%p)", 1, (server)); @@ -1317,7 +1317,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; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; requested_call* rc = (requested_call*)gpr_malloc(sizeof(*rc)); GRPC_STATS_INC_SERVER_REQUESTED_CALLS(); GRPC_API_TRACE( @@ -1364,7 +1364,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; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; requested_call* rc = (requested_call*)gpr_malloc(sizeof(*rc)); registered_method* rm = (registered_method*)rmp; GRPC_STATS_INC_SERVER_REQUESTED_CALLS(); diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 82d687c530..f198413498 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -67,7 +67,7 @@ ChannelArguments::ChannelArguments(const ChannelArguments& other) } ChannelArguments::~ChannelArguments() { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; for (auto it = args_.begin(); it != args_.end(); ++it) { if (it->type == GRPC_ARG_POINTER) { it->value.pointer.vtable->destroy(it->value.pointer.p); @@ -95,7 +95,7 @@ void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) { } grpc_arg mutator_arg = grpc_socket_mutator_to_arg(mutator); bool replaced = false; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; for (auto it = args_.begin(); it != args_.end(); ++it) { if (it->type == mutator_arg.type && grpc::string(it->key) == grpc::string(mutator_arg.key)) { diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm index 7a09e8f395..d130971364 100644 --- a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm +++ b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm @@ -110,7 +110,7 @@ static void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { static void cronet_init_client_simple_ssl_secure_fullstack( grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; stream_engine *cronetEngine = [Cronet getGlobalEngine]; grpc_channel_args *new_client_args = grpc_channel_args_copy(client_args); diff --git a/test/core/backoff/backoff_test.cc b/test/core/backoff/backoff_test.cc index 2cd97d8055..d3115fe1dd 100644 --- a/test/core/backoff/backoff_test.cc +++ b/test/core/backoff/backoff_test.cc @@ -33,7 +33,7 @@ static void test_constant_backoff(void) { const grpc_millis max_backoff = 1000; grpc_backoff_init(&backoff, initial_backoff, multiplier, jitter, min_connect_timeout, max_backoff); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_backoff_result next_deadlines = grpc_backoff_begin(&backoff); GPR_ASSERT(next_deadlines.current_deadline - grpc_core::ExecCtx::Get()->Now() == @@ -62,7 +62,7 @@ static void test_min_connect(void) { const grpc_millis max_backoff = 1000; grpc_backoff_init(&backoff, initial_backoff, multiplier, jitter, min_connect_timeout, max_backoff); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_backoff_result next = grpc_backoff_begin(&backoff); // Because the min_connect_timeout > initial_backoff, current_deadline is used // as the deadline for the current attempt. @@ -85,7 +85,7 @@ static void test_no_jitter_backoff(void) { min_connect_timeout, max_backoff); // x_1 = 2 // x_n = 2**i + x_{i-1} ( = 2**(n+1) - 2 ) - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx::Get()->TestOnlySetNow(0); grpc_backoff_result next_deadlines = grpc_backoff_begin(&backoff); GPR_ASSERT(next_deadlines.current_deadline == @@ -141,7 +141,7 @@ static void test_jitter_backoff(void) { backoff.rng_state = 0; // force consistent PRNG - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_backoff_result next_deadlines = grpc_backoff_begin(&backoff); GPR_ASSERT(next_deadlines.current_deadline - grpc_core::ExecCtx::Get()->Now() == diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc index 267933ff62..f63a32ea5b 100644 --- a/test/core/bad_client/bad_client.cc +++ b/test/core/bad_client/bad_client.cc @@ -57,7 +57,7 @@ static void done_write(void* arg, grpc_error* error) { static void server_setup_transport(void* ts, grpc_transport* transport) { thd_args* a = (thd_args*)ts; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_server_setup_transport(a->server, transport, nullptr, grpc_server_get_channel_args(a->server)); } @@ -80,7 +80,7 @@ void grpc_run_bad_client_test( grpc_slice_from_copied_buffer(client_payload, client_payload_length); grpc_slice_buffer outgoing; grpc_closure done_write_closure; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_completion_queue* shutdown_cq; if (client_payload_length < 4 * 1024) { diff --git a/test/core/channel/channel_args_test.cc b/test/core/channel/channel_args_test.cc index 99a6566a1c..4a8195e984 100644 --- a/test/core/channel/channel_args_test.cc +++ b/test/core/channel/channel_args_test.cc @@ -26,7 +26,7 @@ #include "test/core/util/test_config.h" static void test_create(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_arg arg_int; grpc_arg arg_string; @@ -59,7 +59,7 @@ static void test_create(void) { } static void test_set_compression_algorithm(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args* ch_args; ch_args = @@ -73,7 +73,7 @@ static void test_set_compression_algorithm(void) { } static void test_compression_algorithm_states(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args *ch_args, *ch_args_wo_gzip, *ch_args_wo_gzip_deflate; unsigned states_bitset; size_t i; @@ -134,7 +134,7 @@ static void test_set_socket_mutator(void) { GPR_ASSERT(ch_args->args[0].type == GRPC_ARG_POINTER); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(ch_args); } } diff --git a/test/core/channel/channel_stack_test.cc b/test/core/channel/channel_stack_test.cc index 93ddd0fee5..ef43facd6e 100644 --- a/test/core/channel/channel_stack_test.cc +++ b/test/core/channel/channel_stack_test.cc @@ -95,7 +95,7 @@ static void test_create_channel_stack(void) { grpc_channel_args chan_args; int* channel_data; int* call_data; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice path = grpc_slice_from_static_string("/service/method"); arg.type = GRPC_ARG_INTEGER; diff --git a/test/core/channel/minimal_stack_is_minimal_test.cc b/test/core/channel/minimal_stack_is_minimal_test.cc index 2373bc6329..3495f603e4 100644 --- a/test/core/channel/minimal_stack_is_minimal_test.cc +++ b/test/core/channel/minimal_stack_is_minimal_test.cc @@ -125,7 +125,7 @@ static int check_stack(const char* file, int line, const char* transport_name, grpc_channel_stack_builder_set_transport(builder, &fake_transport); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_stack_builder_set_channel_arguments(builder, channel_args); GPR_ASSERT(grpc_channel_init_create_stack( builder, (grpc_channel_stack_type)channel_stack_type)); @@ -210,7 +210,7 @@ static int check_stack(const char* file, int line, const char* transport_name, gpr_free(expect); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_stack_builder_destroy(builder); grpc_channel_args_destroy(channel_args); } diff --git a/test/core/client_channel/lb_policies_test.cc b/test/core/client_channel/lb_policies_test.cc index 590f934657..847ea0066b 100644 --- a/test/core/client_channel/lb_policies_test.cc +++ b/test/core/client_channel/lb_policies_test.cc @@ -651,7 +651,7 @@ static void test_get_channel_info() { grpc_channel_args* args = grpc_channel_args_copy_and_add(nullptr, &arg, 1); channel = grpc_insecure_channel_create("ipv4:127.0.0.1:1234", args, nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(args); } // Ensures that resolver returns. @@ -958,7 +958,7 @@ static void verify_rebirth_round_robin(const servers_fixture* f, } int main(int argc, char** argv) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; test_spec* spec; size_t i; const size_t NUM_ITERS = 10; diff --git a/test/core/client_channel/parse_address_test.cc b/test/core/client_channel/parse_address_test.cc index 21c86d01f1..6d56961d84 100644 --- a/test/core/client_channel/parse_address_test.cc +++ b/test/core/client_channel/parse_address_test.cc @@ -34,7 +34,7 @@ #ifdef GRPC_HAVE_UNIX_SOCKET static void test_grpc_parse_unix(const char* uri_text, const char* pathname) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_uri* uri = grpc_uri_parse(uri_text, 0); grpc_resolved_address addr; @@ -54,7 +54,7 @@ static void test_grpc_parse_unix(const char* uri_text, const char* pathname) {} static void test_grpc_parse_ipv4(const char* uri_text, const char* host, unsigned short port) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_uri* uri = grpc_uri_parse(uri_text, 0); grpc_resolved_address addr; char ntop_buf[INET_ADDRSTRLEN]; @@ -72,7 +72,7 @@ static void test_grpc_parse_ipv4(const char* uri_text, const char* host, static void test_grpc_parse_ipv6(const char* uri_text, const char* host, unsigned short port, uint32_t scope_id) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_uri* uri = grpc_uri_parse(uri_text, 0); grpc_resolved_address addr; char ntop_buf[INET6_ADDRSTRLEN]; diff --git a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc index f6d7731a6d..18a795fbcb 100644 --- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc +++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc @@ -105,7 +105,7 @@ static bool wait_loop(int deadline_seconds, gpr_event* ev) { if (gpr_event_wait(ev, grpc_timeout_seconds_to_deadline(1))) return true; deadline_seconds--; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_timer_check(nullptr); } return false; @@ -148,7 +148,7 @@ int main(int argc, char** argv) { grpc_channel_args* result = (grpc_channel_args*)1; { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolver* resolver = create_resolver("dns:test"); gpr_event ev1; gpr_event_init(&ev1); diff --git a/test/core/client_channel/resolvers/dns_resolver_test.cc b/test/core/client_channel/resolvers/dns_resolver_test.cc index 63d1287521..80667908ef 100644 --- a/test/core/client_channel/resolvers/dns_resolver_test.cc +++ b/test/core/client_channel/resolvers/dns_resolver_test.cc @@ -28,7 +28,7 @@ static grpc_combiner* g_combiner; static void test_succeeds(grpc_resolver_factory* factory, const char* string) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_uri* uri = grpc_uri_parse(string, 0); grpc_resolver_args args; grpc_resolver* resolver; @@ -45,7 +45,7 @@ static void test_succeeds(grpc_resolver_factory* factory, const char* string) { } static void test_fails(grpc_resolver_factory* factory, const char* string) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_uri* uri = grpc_uri_parse(string, 0); grpc_resolver_args args; grpc_resolver* resolver; @@ -80,7 +80,7 @@ int main(int argc, char** argv) { grpc_resolver_factory_unref(dns); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_COMBINER_UNREF(g_combiner, "test"); } grpc_shutdown(); diff --git a/test/core/client_channel/resolvers/fake_resolver_test.cc b/test/core/client_channel/resolvers/fake_resolver_test.cc index ecfe43f9b7..d85cbb1d03 100644 --- a/test/core/client_channel/resolvers/fake_resolver_test.cc +++ b/test/core/client_channel/resolvers/fake_resolver_test.cc @@ -72,7 +72,7 @@ void on_resolution_cb(void* arg, grpc_error* error) { } static void test_fake_resolver() { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_combiner* combiner = grpc_combiner_create(); // Create resolver. grpc_fake_resolver_response_generator* response_generator = diff --git a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc index f3711c151e..4d16a77924 100644 --- a/test/core/client_channel/resolvers/sockaddr_resolver_test.cc +++ b/test/core/client_channel/resolvers/sockaddr_resolver_test.cc @@ -41,7 +41,7 @@ void on_resolution_cb(void* arg, grpc_error* error) { } static void test_succeeds(grpc_resolver_factory* factory, const char* string) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_uri* uri = grpc_uri_parse(string, 0); grpc_resolver_args args; grpc_resolver* resolver; @@ -68,7 +68,7 @@ static void test_succeeds(grpc_resolver_factory* factory, const char* string) { } static void test_fails(grpc_resolver_factory* factory, const char* string) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_uri* uri = grpc_uri_parse(string, 0); grpc_resolver_args args; grpc_resolver* resolver; @@ -111,7 +111,7 @@ int main(int argc, char** argv) { grpc_resolver_factory_unref(ipv6); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_COMBINER_UNREF(g_combiner, "test"); } grpc_shutdown(); diff --git a/test/core/client_channel/uri_fuzzer_test.cc b/test/core/client_channel/uri_fuzzer_test.cc index 8f1f5e2eda..ee38453166 100644 --- a/test/core/client_channel/uri_fuzzer_test.cc +++ b/test/core/client_channel/uri_fuzzer_test.cc @@ -37,7 +37,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_uri* x; if ((x = grpc_uri_parse(s, 1))) { grpc_uri_destroy(x); diff --git a/test/core/client_channel/uri_parser_test.cc b/test/core/client_channel/uri_parser_test.cc index 33cf82d17c..254bfddfb3 100644 --- a/test/core/client_channel/uri_parser_test.cc +++ b/test/core/client_channel/uri_parser_test.cc @@ -29,7 +29,7 @@ static void test_succeeds(const char* uri_text, const char* scheme, const char* authority, const char* path, const char* query, const char* fragment) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_uri* uri = grpc_uri_parse(uri_text, 0); GPR_ASSERT(uri); GPR_ASSERT(0 == strcmp(scheme, uri->scheme)); @@ -42,13 +42,13 @@ static void test_succeeds(const char* uri_text, const char* scheme, } static void test_fails(const char* uri_text) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(nullptr == grpc_uri_parse(uri_text, 0)); } static void test_query_parts() { { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; const char* uri_text = "http://foo/path?a&b=B&c=&#frag"; grpc_uri* uri = grpc_uri_parse(uri_text, 0); GPR_ASSERT(uri); @@ -82,7 +82,7 @@ static void test_query_parts() { } { /* test the current behavior of multiple query part values */ - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; const char* uri_text = "http://auth/path?foo=bar=baz&foobar=="; grpc_uri* uri = grpc_uri_parse(uri_text, 0); GPR_ASSERT(uri); @@ -100,7 +100,7 @@ static void test_query_parts() { } { /* empty query */ - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; const char* uri_text = "http://foo/path"; grpc_uri* uri = grpc_uri_parse(uri_text, 0); GPR_ASSERT(uri); diff --git a/test/core/compression/algorithm_test.cc b/test/core/compression/algorithm_test.cc index b0613c4b7d..9e811e9af1 100644 --- a/test/core/compression/algorithm_test.cc +++ b/test/core/compression/algorithm_test.cc @@ -39,7 +39,7 @@ static void test_algorithm_mesh(void) { grpc_compression_algorithm parsed; grpc_slice mdstr; grpc_mdelem mdelem; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT( grpc_compression_algorithm_name((grpc_compression_algorithm)i, &name)); GPR_ASSERT(grpc_compression_algorithm_parse( @@ -61,7 +61,7 @@ static void test_algorithm_mesh(void) { } static void test_algorithm_failure(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice mdstr; gpr_log(GPR_DEBUG, "test_algorithm_failure"); diff --git a/test/core/compression/message_compress_test.cc b/test/core/compression/message_compress_test.cc index 0145b4f402..6ca07b70c4 100644 --- a/test/core/compression/message_compress_test.cc +++ b/test/core/compression/message_compress_test.cc @@ -70,7 +70,7 @@ static void assert_passthrough(grpc_slice value, grpc_split_slices_to_buffer(uncompressed_split_mode, &value, 1, &input); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; was_compressed = grpc_msg_compress(algorithm, &input, &compressed_raw); } GPR_ASSERT(input.count > 0); @@ -90,7 +90,7 @@ static void assert_passthrough(grpc_slice value, grpc_split_slice_buffer(compressed_split_mode, &compressed_raw, &compressed); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_msg_decompress( was_compressed ? algorithm : GRPC_COMPRESS_NONE, &compressed, &output)); } @@ -152,7 +152,7 @@ static void test_tiny_data_compress(void) { for (int i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) { if (i == GRPC_COMPRESS_NONE) continue; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(0 == grpc_msg_compress(static_cast<grpc_compression_algorithm>(i), &input, &output)); @@ -176,7 +176,7 @@ static void test_bad_decompression_data_crc(void) { grpc_slice_buffer_init(&output); grpc_slice_buffer_add(&input, create_test_value(ONE_MB_A)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; /* compress it */ grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &corrupted); /* corrupt the output by smashing the CRC */ @@ -205,7 +205,7 @@ static void test_bad_decompression_data_trailing_garbage(void) { "\x78\xda\x63\x60\x60\x60\x00\x00\x00\x04\x00\x01\x99", 13)); /* try (and fail) to decompress the invalid compresed buffer */ - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); grpc_slice_buffer_destroy(&input); @@ -222,7 +222,7 @@ static void test_bad_decompression_data_stream(void) { grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4)); /* try (and fail) to decompress the invalid compresed buffer */ - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); grpc_slice_buffer_destroy(&input); @@ -239,7 +239,7 @@ static void test_bad_compression_algorithm(void) { grpc_slice_buffer_add( &input, grpc_slice_from_copied_string("Never gonna give you up")); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; was_compressed = grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); GPR_ASSERT(0 == was_compressed); @@ -263,7 +263,7 @@ static void test_bad_decompression_algorithm(void) { grpc_slice_buffer_add(&input, grpc_slice_from_copied_string( "I'm not really compressed but it doesn't matter")); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; was_decompressed = grpc_msg_decompress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); GPR_ASSERT(0 == was_decompressed); diff --git a/test/core/debug/stats_test.cc b/test/core/debug/stats_test.cc index 1623e7c8a4..e60e54b2fd 100644 --- a/test/core/debug/stats_test.cc +++ b/test/core/debug/stats_test.cc @@ -49,7 +49,7 @@ TEST(StatsTest, IncCounters) { for (int i = 0; i < GRPC_STATS_COUNTER_COUNT; i++) { Snapshot snapshot; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_STATS_INC_COUNTER((grpc_stats_counters)i); EXPECT_EQ(snapshot.delta().counters[i], 1); @@ -59,7 +59,7 @@ TEST(StatsTest, IncCounters) { TEST(StatsTest, IncSpecificCounter) { Snapshot snapshot; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_STATS_INC_SYSCALL_POLL(); EXPECT_EQ(snapshot.delta().counters[GRPC_STATS_COUNTER_SYSCALL_POLL], 1); @@ -92,7 +92,7 @@ TEST_P(HistogramTest, IncHistogram) { for (auto j : test_values) { Snapshot snapshot; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_stats_inc_histogram[kHistogram](j); auto delta = snapshot.delta(); diff --git a/test/core/end2end/bad_server_response_test.cc b/test/core/end2end/bad_server_response_test.cc index b65ba522ac..1ce0dc5bf8 100644 --- a/test/core/end2end/bad_server_response_test.cc +++ b/test/core/end2end/bad_server_response_test.cc @@ -269,7 +269,7 @@ static void run_test(const char* response_payload, grpc_status_code expected_status, const char* expected_detail) { test_tcp_server test_server; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_event ev; grpc_init(); diff --git a/test/core/end2end/connection_refused_test.cc b/test/core/end2end/connection_refused_test.cc index 9904c1384c..ca6d17e7c8 100644 --- a/test/core/end2end/connection_refused_test.cc +++ b/test/core/end2end/connection_refused_test.cc @@ -133,7 +133,7 @@ static void run_test(bool wait_for_ready, bool use_service_config) { grpc_metadata_array_destroy(&trailing_metadata_recv); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; if (args != nullptr) grpc_channel_args_destroy(args); } diff --git a/test/core/end2end/fixtures/h2_census.cc b/test/core/end2end/fixtures/h2_census.cc index 60aafc3b94..75c80aa1ff 100644 --- a/test/core/end2end/fixtures/h2_census.cc +++ b/test/core/end2end/fixtures/h2_census.cc @@ -75,7 +75,7 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f, grpc_insecure_channel_create(ffd->localaddr, client_args, nullptr); GPR_ASSERT(f->client); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(client_args); } } @@ -91,7 +91,7 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f, server_args = grpc_channel_args_copy_and_add(server_args, &arg, 1); f->server = grpc_server_create(server_args, nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(server_args); } grpc_server_register_completion_queue(f->server, f->cq, nullptr); diff --git a/test/core/end2end/fixtures/h2_compress.cc b/test/core/end2end/fixtures/h2_compress.cc index 040c041f38..5b9181586c 100644 --- a/test/core/end2end/fixtures/h2_compress.cc +++ b/test/core/end2end/fixtures/h2_compress.cc @@ -66,7 +66,7 @@ void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture* f, fullstack_compression_fixture_data* ffd = static_cast<fullstack_compression_fixture_data*>(f->fixture_data); if (ffd->client_args_compression != nullptr) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(ffd->client_args_compression); } ffd->client_args_compression = grpc_channel_args_set_compression_algorithm( @@ -80,7 +80,7 @@ void chttp2_init_server_fullstack_compression(grpc_end2end_test_fixture* f, fullstack_compression_fixture_data* ffd = static_cast<fullstack_compression_fixture_data*>(f->fixture_data); if (ffd->server_args_compression != nullptr) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(ffd->server_args_compression); } ffd->server_args_compression = grpc_channel_args_set_compression_algorithm( @@ -95,7 +95,7 @@ void chttp2_init_server_fullstack_compression(grpc_end2end_test_fixture* f, } void chttp2_tear_down_fullstack_compression(grpc_end2end_test_fixture* f) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; fullstack_compression_fixture_data* ffd = static_cast<fullstack_compression_fixture_data*>(f->fixture_data); grpc_channel_args_destroy(ffd->client_args_compression); diff --git a/test/core/end2end/fixtures/h2_fd.cc b/test/core/end2end/fixtures/h2_fd.cc index 85f5061ee8..9157ab04d0 100644 --- a/test/core/end2end/fixtures/h2_fd.cc +++ b/test/core/end2end/fixtures/h2_fd.cc @@ -68,7 +68,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f, grpc_channel_args* client_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; sp_fixture_data* sfd = static_cast<sp_fixture_data*>(f->fixture_data); GPR_ASSERT(!f->client); @@ -79,7 +79,7 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f, static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f, grpc_channel_args* server_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; sp_fixture_data* sfd = static_cast<sp_fixture_data*>(f->fixture_data); GPR_ASSERT(!f->server); f->server = grpc_server_create(server_args, nullptr); diff --git a/test/core/end2end/fixtures/h2_full+workarounds.cc b/test/core/end2end/fixtures/h2_full+workarounds.cc index 2f9a9d4c4b..237841d185 100644 --- a/test/core/end2end/fixtures/h2_full+workarounds.cc +++ b/test/core/end2end/fixtures/h2_full+workarounds.cc @@ -72,7 +72,7 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f, void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f, grpc_channel_args* server_args) { int i; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; fullstack_fixture_data* ffd = static_cast<fullstack_fixture_data*>(f->fixture_data); grpc_arg args[GRPC_MAX_WORKAROUND_ID]; diff --git a/test/core/end2end/fixtures/h2_load_reporting.cc b/test/core/end2end/fixtures/h2_load_reporting.cc index 61853740ab..fda5f4b052 100644 --- a/test/core/end2end/fixtures/h2_load_reporting.cc +++ b/test/core/end2end/fixtures/h2_load_reporting.cc @@ -78,7 +78,7 @@ void chttp2_init_server_load_reporting(grpc_end2end_test_fixture* f, server_args = grpc_channel_args_copy_and_add(server_args, &arg, 1); f->server = grpc_server_create(server_args, nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(server_args); } grpc_server_register_completion_queue(f->server, f->cq, nullptr); diff --git a/test/core/end2end/fixtures/h2_oauth2.cc b/test/core/end2end/fixtures/h2_oauth2.cc index 40ca2a77fb..5fed4434de 100644 --- a/test/core/end2end/fixtures/h2_oauth2.cc +++ b/test/core/end2end/fixtures/h2_oauth2.cc @@ -143,7 +143,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture* f) { static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack( grpc_end2end_test_fixture* f, grpc_channel_args* client_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_credentials* ssl_creds = grpc_ssl_credentials_create(test_root_cert, nullptr, nullptr); grpc_call_credentials* oauth2_creds = grpc_md_only_test_credentials_create( diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.cc b/test/core/end2end/fixtures/h2_sockpair+trace.cc index 574b755539..447bb91d0c 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.cc +++ b/test/core/end2end/fixtures/h2_sockpair+trace.cc @@ -50,7 +50,7 @@ static void server_setup_transport(void* ts, grpc_transport* transport) { grpc_end2end_test_fixture* f = static_cast<grpc_end2end_test_fixture*>(ts); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data); grpc_endpoint_add_to_pollset(sfd->server, grpc_cq_pollset(f->cq)); grpc_server_setup_transport(f->server, transport, nullptr, @@ -87,7 +87,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f, grpc_channel_args* client_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data); grpc_transport* transport; sp_client_setup cs; @@ -101,7 +101,7 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f, static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f, grpc_channel_args* server_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data); grpc_transport* transport; GPR_ASSERT(!f->server); diff --git a/test/core/end2end/fixtures/h2_sockpair.cc b/test/core/end2end/fixtures/h2_sockpair.cc index 304d0dd1fa..c1f8ee0b64 100644 --- a/test/core/end2end/fixtures/h2_sockpair.cc +++ b/test/core/end2end/fixtures/h2_sockpair.cc @@ -44,7 +44,7 @@ static void server_setup_transport(void* ts, grpc_transport* transport) { grpc_end2end_test_fixture* f = static_cast<grpc_end2end_test_fixture*>(ts); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data); grpc_endpoint_add_to_pollset(sfd->server, grpc_cq_pollset(f->cq)); grpc_server_setup_transport(f->server, transport, nullptr, @@ -81,7 +81,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f, grpc_channel_args* client_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data); grpc_transport* transport; sp_client_setup cs; @@ -95,7 +95,7 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f, static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f, grpc_channel_args* server_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data); grpc_transport* transport; GPR_ASSERT(!f->server); diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.cc b/test/core/end2end/fixtures/h2_sockpair_1byte.cc index 0b5ae3abe4..55b847bdae 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.cc +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.cc @@ -44,7 +44,7 @@ static void server_setup_transport(void* ts, grpc_transport* transport) { grpc_end2end_test_fixture* f = static_cast<grpc_end2end_test_fixture*>(ts); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data); grpc_endpoint_add_to_pollset(sfd->server, grpc_cq_pollset(f->cq)); grpc_server_setup_transport(f->server, transport, nullptr, @@ -92,7 +92,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f, grpc_channel_args* client_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data); grpc_transport* transport; sp_client_setup cs; @@ -106,7 +106,7 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture* f, static void chttp2_init_server_socketpair(grpc_end2end_test_fixture* f, grpc_channel_args* server_args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_pair* sfd = static_cast<grpc_endpoint_pair*>(f->fixture_data); grpc_transport* transport; GPR_ASSERT(!f->server); diff --git a/test/core/end2end/fixtures/h2_ssl.cc b/test/core/end2end/fixtures/h2_ssl.cc index 4d6fed14e0..9a0680c40e 100644 --- a/test/core/end2end/fixtures/h2_ssl.cc +++ b/test/core/end2end/fixtures/h2_ssl.cc @@ -110,7 +110,7 @@ static void chttp2_init_client_simple_ssl_secure_fullstack( grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(new_client_args); } } diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.cc b/test/core/end2end/fixtures/h2_ssl_proxy.cc index aee1388a56..5ddbdefc8c 100644 --- a/test/core/end2end/fixtures/h2_ssl_proxy.cc +++ b/test/core/end2end/fixtures/h2_ssl_proxy.cc @@ -66,7 +66,7 @@ static grpc_channel* create_proxy_client(const char* target, grpc_secure_channel_create(ssl_creds, target, new_client_args, nullptr); grpc_channel_credentials_release(ssl_creds); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(new_client_args); } return channel; @@ -147,7 +147,7 @@ static void chttp2_init_client_simple_ssl_secure_fullstack( grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(new_client_args); } } diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index c49a866a6c..539bbe4134 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -457,7 +457,7 @@ static void on_accept(void* arg, grpc_endpoint* endpoint, static void thread_main(void* arg) { grpc_end2end_http_proxy* proxy = (grpc_end2end_http_proxy*)arg; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; do { gpr_ref(&proxy->users); grpc_pollset_worker* worker = nullptr; @@ -473,7 +473,7 @@ static void thread_main(void* arg) { grpc_end2end_http_proxy* grpc_end2end_http_proxy_create( grpc_channel_args* args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_end2end_http_proxy* proxy = (grpc_end2end_http_proxy*)gpr_malloc(sizeof(*proxy)); memset(proxy, 0, sizeof(*proxy)); @@ -518,7 +518,7 @@ static void destroy_pollset(void* arg, grpc_error* error) { void grpc_end2end_http_proxy_destroy(grpc_end2end_http_proxy* proxy) { gpr_unref(&proxy->users); // Signal proxy thread to shutdown. - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_thd_join(proxy->thd); grpc_tcp_server_shutdown_listeners(proxy->server); grpc_tcp_server_unref(proxy->server); diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc index ce916bd341..40e9f33ff1 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.cc +++ b/test/core/end2end/fuzzers/api_fuzzer.cc @@ -748,7 +748,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_init(); grpc_timer_manager_set_threading(false); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_executor_set_threading(false); } grpc_resolve_address = my_resolve_address; @@ -842,7 +842,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { g_channel = grpc_insecure_channel_create(target_uri, args, nullptr); GPR_ASSERT(g_channel != nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(args); } gpr_free(target_uri); @@ -869,7 +869,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { g_server = grpc_server_create(args, nullptr); GPR_ASSERT(g_server != nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(args); } grpc_server_register_completion_queue(g_server, cq, nullptr); @@ -1199,7 +1199,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_secure_channel_create(creds, target_uri, args, nullptr); GPR_ASSERT(g_channel != nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(args); } gpr_free(target_uri); diff --git a/test/core/end2end/fuzzers/client_fuzzer.cc b/test/core/end2end/fuzzers/client_fuzzer.cc index e2fb13936a..2d3fc7a074 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.cc +++ b/test/core/end2end/fuzzers/client_fuzzer.cc @@ -44,7 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (leak_check) grpc_memory_counters_init(); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_executor_set_threading(false); grpc_resource_quota* resource_quota = diff --git a/test/core/end2end/fuzzers/server_fuzzer.cc b/test/core/end2end/fuzzers/server_fuzzer.cc index 4506ff5c0b..db25160e2b 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.cc +++ b/test/core/end2end/fuzzers/server_fuzzer.cc @@ -42,7 +42,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (leak_check) grpc_memory_counters_init(); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_executor_set_threading(false); grpc_resource_quota* resource_quota = diff --git a/test/core/end2end/h2_ssl_cert_test.cc b/test/core/end2end/h2_ssl_cert_test.cc index 177731669e..d50d1f4d81 100644 --- a/test/core/end2end/h2_ssl_cert_test.cc +++ b/test/core/end2end/h2_ssl_cert_test.cc @@ -181,7 +181,7 @@ typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype; grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); \ chttp2_init_client_secure_fullstack(f, new_client_args, ssl_creds); \ { \ - grpc_core::ExecCtx _local_exec_ctx; \ + grpc_core::ExecCtx exec_ctx; \ grpc_channel_args_destroy(new_client_args); \ } \ } diff --git a/test/core/end2end/tests/cancel_after_accept.cc b/test/core/end2end/tests/cancel_after_accept.cc index 5ce45b4c61..f59caf7e35 100644 --- a/test/core/end2end/tests/cancel_after_accept.cc +++ b/test/core/end2end/tests/cancel_after_accept.cc @@ -245,7 +245,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, grpc_call_unref(s); if (args != nullptr) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(args); } diff --git a/test/core/end2end/tests/cancel_after_round_trip.cc b/test/core/end2end/tests/cancel_after_round_trip.cc index 9bd92b06e3..b10b93978d 100644 --- a/test/core/end2end/tests/cancel_after_round_trip.cc +++ b/test/core/end2end/tests/cancel_after_round_trip.cc @@ -278,7 +278,7 @@ static void test_cancel_after_round_trip(grpc_end2end_test_config config, grpc_call_unref(s); if (args != nullptr) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(args); } diff --git a/test/core/end2end/tests/compressed_payload.cc b/test/core/end2end/tests/compressed_payload.cc index 93a06c9dfc..944edc7a70 100644 --- a/test/core/end2end/tests/compressed_payload.cc +++ b/test/core/end2end/tests/compressed_payload.cc @@ -129,7 +129,7 @@ static void request_for_disabled_algorithm( server_args = grpc_channel_args_set_compression_algorithm(nullptr, GRPC_COMPRESS_NONE); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; server_args = grpc_channel_args_compression_algorithm_set_state( &server_args, algorithm_to_disable, false); } @@ -256,7 +256,7 @@ static void request_for_disabled_algorithm( grpc_byte_buffer_destroy(request_payload_recv); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(client_args); grpc_channel_args_destroy(server_args); } @@ -537,7 +537,7 @@ static void request_with_payload_template( cq_verifier_destroy(cqv); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(client_args); grpc_channel_args_destroy(server_args); } diff --git a/test/core/end2end/tests/load_reporting_hook.cc b/test/core/end2end/tests/load_reporting_hook.cc index 13e3af7ac5..e056bd547b 100644 --- a/test/core/end2end/tests/load_reporting_hook.cc +++ b/test/core/end2end/tests/load_reporting_hook.cc @@ -300,7 +300,7 @@ static void test_load_reporting_hook(grpc_end2end_test_config config) { &trailing_lr_metadata); end_test(&f); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(lr_server_args); } config.tear_down_data(&f); diff --git a/test/core/end2end/tests/max_message_length.cc b/test/core/end2end/tests/max_message_length.cc index 06243be75b..e581f1fc20 100644 --- a/test/core/end2end/tests/max_message_length.cc +++ b/test/core/end2end/tests/max_message_length.cc @@ -173,7 +173,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, f = begin_test(config, "test_max_request_message_length", client_args, server_args); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; if (client_args != nullptr) grpc_channel_args_destroy(client_args); if (server_args != nullptr) grpc_channel_args_destroy(server_args); } @@ -363,7 +363,7 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, f = begin_test(config, "test_max_response_message_length", client_args, server_args); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; if (client_args != nullptr) grpc_channel_args_destroy(client_args); if (server_args != nullptr) grpc_channel_args_destroy(server_args); } diff --git a/test/core/end2end/tests/stream_compression_compressed_payload.cc b/test/core/end2end/tests/stream_compression_compressed_payload.cc index 4f09df25db..ec3050ad45 100644 --- a/test/core/end2end/tests/stream_compression_compressed_payload.cc +++ b/test/core/end2end/tests/stream_compression_compressed_payload.cc @@ -129,7 +129,7 @@ static void request_for_disabled_algorithm( server_args = grpc_channel_args_set_stream_compression_algorithm( nullptr, GRPC_STREAM_COMPRESS_NONE); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; server_args = grpc_channel_args_stream_compression_algorithm_set_state( &server_args, algorithm_to_disable, false); } @@ -257,7 +257,7 @@ static void request_for_disabled_algorithm( grpc_byte_buffer_destroy(request_payload_recv); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(client_args); grpc_channel_args_destroy(server_args); } @@ -545,7 +545,7 @@ static void request_with_payload_template( cq_verifier_destroy(cqv); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(client_args); grpc_channel_args_destroy(server_args); } diff --git a/test/core/end2end/tests/stream_compression_payload.cc b/test/core/end2end/tests/stream_compression_payload.cc index 6a8c9cdcb2..b95e6528cd 100644 --- a/test/core/end2end/tests/stream_compression_payload.cc +++ b/test/core/end2end/tests/stream_compression_payload.cc @@ -277,7 +277,7 @@ static void test_invoke_request_response_with_payload( end_test(&f); config.tear_down_data(&f); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(client_args); grpc_channel_args_destroy(server_args); } diff --git a/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc b/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc index 3e1a532af5..2a8799ee67 100644 --- a/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc +++ b/test/core/end2end/tests/stream_compression_ping_pong_streaming.cc @@ -275,7 +275,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, end_test(&f); config.tear_down_data(&f); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(client_args); grpc_channel_args_destroy(server_args); } diff --git a/test/core/end2end/tests/workaround_cronet_compression.cc b/test/core/end2end/tests/workaround_cronet_compression.cc index 8c5c9e834f..d4decce0aa 100644 --- a/test/core/end2end/tests/workaround_cronet_compression.cc +++ b/test/core/end2end/tests/workaround_cronet_compression.cc @@ -142,7 +142,7 @@ static void request_with_payload_template( nullptr, default_server_channel_compression_algorithm); if (user_agent_override) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args* client_args_old = client_args; grpc_arg arg; arg.key = const_cast<char*>(GRPC_ARG_PRIMARY_USER_AGENT_STRING); @@ -350,7 +350,7 @@ static void request_with_payload_template( cq_verifier_destroy(cqv); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(client_args); grpc_channel_args_destroy(server_args); } diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index ed5c03558f..259e3aa463 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -60,7 +60,7 @@ static void on_finish(void* arg, grpc_error* error) { static void test_get(int port) { grpc_httpcli_request req; char* host; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_done = 0; gpr_log(GPR_INFO, "test_get"); @@ -99,7 +99,7 @@ static void test_get(int port) { static void test_post(int port) { grpc_httpcli_request req; char* host; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_done = 0; gpr_log(GPR_INFO, "test_post"); @@ -146,7 +146,7 @@ int main(int argc, char** argv) { grpc_init(); { grpc_closure destroyed; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; char* me = argv[0]; char* lslash = strrchr(me, '/'); char* args[4]; diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc index 418afb6992..adf69f1b16 100644 --- a/test/core/http/httpscli_test.cc +++ b/test/core/http/httpscli_test.cc @@ -60,7 +60,7 @@ static void on_finish(void* arg, grpc_error* error) { static void test_get(int port) { grpc_httpcli_request req; char* host; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_done = 0; gpr_log(GPR_INFO, "test_get"); @@ -100,7 +100,7 @@ static void test_get(int port) { static void test_post(int port) { grpc_httpcli_request req; char* host; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_done = 0; gpr_log(GPR_INFO, "test_post"); @@ -195,7 +195,7 @@ int main(int argc, char** argv) { test_post(port); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_httpcli_context_destroy(&g_context); GRPC_CLOSURE_INIT(&destroyed, destroy_pops, &g_pops, grpc_schedule_on_exec_ctx); diff --git a/test/core/iomgr/combiner_test.cc b/test/core/iomgr/combiner_test.cc index faa5c3dcbc..cbcbe7feff 100644 --- a/test/core/iomgr/combiner_test.cc +++ b/test/core/iomgr/combiner_test.cc @@ -28,7 +28,7 @@ static void test_no_op(void) { gpr_log(GPR_DEBUG, "test_no_op"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_COMBINER_UNREF(grpc_combiner_create(), "test_no_op"); } @@ -42,7 +42,7 @@ static void test_execute_one(void) { grpc_combiner* lock = grpc_combiner_create(); gpr_event done; gpr_event_init(&done); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(set_event_to_true, &done, grpc_combiner_scheduler(lock)), GRPC_ERROR_NONE); @@ -72,7 +72,7 @@ static void check_one(void* a, grpc_error* error) { static void execute_many_loop(void* a) { thd_args* args = static_cast<thd_args*>(a); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; size_t n = 1; for (size_t i = 0; i < 10; i++) { for (size_t j = 0; j < 10000; j++) { @@ -112,7 +112,7 @@ static void test_execute_many(void) { gpr_inf_future(GPR_CLOCK_REALTIME)) != nullptr); gpr_thd_join(thds[i]); } - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_COMBINER_UNREF(lock, "test_execute_many"); } @@ -133,7 +133,7 @@ static void test_execute_finally(void) { gpr_log(GPR_DEBUG, "test_execute_finally"); grpc_combiner* lock = grpc_combiner_create(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_event_init(&got_in_finally); GRPC_CLOSURE_SCHED( GRPC_CLOSURE_CREATE(add_finally, lock, grpc_combiner_scheduler(lock)), diff --git a/test/core/iomgr/endpoint_pair_test.cc b/test/core/iomgr/endpoint_pair_test.cc index d895a270ad..90dd40d9c4 100644 --- a/test/core/iomgr/endpoint_pair_test.cc +++ b/test/core/iomgr/endpoint_pair_test.cc @@ -32,7 +32,7 @@ static void clean_up(void) {} static grpc_endpoint_test_fixture create_fixture_endpoint_pair( size_t slice_size) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_test_fixture f; grpc_arg a[1]; a[0].key = const_cast<char*>(GRPC_ARG_TCP_READ_CHUNK_SIZE); @@ -62,7 +62,7 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size())); grpc_pollset_init(g_pollset, &g_mu); grpc_endpoint_tests(configs[0], g_pollset, g_mu); diff --git a/test/core/iomgr/endpoint_tests.cc b/test/core/iomgr/endpoint_tests.cc index c011ab96d9..8ccae52067 100644 --- a/test/core/iomgr/endpoint_tests.cc +++ b/test/core/iomgr/endpoint_tests.cc @@ -173,7 +173,7 @@ static void read_and_write_test(grpc_endpoint_test_config config, struct read_and_write_test_state state; grpc_endpoint_test_fixture f = begin_test(config, "read_and_write_test", slice_size); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_millis deadline = grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20)); gpr_log(GPR_DEBUG, @@ -277,7 +277,7 @@ static void multiple_shutdown_test(grpc_endpoint_test_config config) { grpc_slice_buffer slice_buffer; grpc_slice_buffer_init(&slice_buffer); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_endpoint_add_to_pollset(f.client_ep, g_pollset); grpc_endpoint_read(f.client_ep, &slice_buffer, GRPC_CLOSURE_CREATE(inc_on_failure, &fail_count, diff --git a/test/core/iomgr/ev_epollsig_linux_test.cc b/test/core/iomgr/ev_epollsig_linux_test.cc index 45c96ce12d..750bbf89d4 100644 --- a/test/core/iomgr/ev_epollsig_linux_test.cc +++ b/test/core/iomgr/ev_epollsig_linux_test.cc @@ -130,7 +130,7 @@ static void test_pollset_cleanup(test_pollset* pollsets, int num_pollsets) { #define NUM_POLLSETS 4 static void test_add_fd_to_pollset() { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; test_fd tfds[NUM_FDS]; int fds[NUM_FDS]; test_pollset pollsets[NUM_POLLSETS]; @@ -231,7 +231,7 @@ static __thread int thread_wakeups = 0; static void test_threading_loop(void* arg) { threading_shared* shared = static_cast<threading_shared*>(arg); while (thread_wakeups < 1000000) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_pollset_worker* worker; gpr_mu_lock(shared->mu); GPR_ASSERT(GRPC_LOG_IF_ERROR( @@ -271,7 +271,7 @@ static void test_threading(void) { shared.wakeup_desc = grpc_fd_create(fd.read_fd, "wakeup"); shared.wakeups = 0; { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_pollset_add_fd(shared.pollset, shared.wakeup_desc); grpc_fd_notify_on_read( shared.wakeup_desc, @@ -286,7 +286,7 @@ static void test_threading(void) { fd.read_fd = 0; grpc_wakeup_fd_destroy(&fd); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_fd_shutdown(shared.wakeup_desc, GRPC_ERROR_CANCELLED); grpc_fd_orphan(shared.wakeup_desc, nullptr, nullptr, false /* already_closed */, "done"); @@ -302,7 +302,7 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; poll_strategy = grpc_get_poll_strategy_name(); if (poll_strategy != nullptr && strcmp(poll_strategy, "epollsig") == 0) { diff --git a/test/core/iomgr/fd_conservation_posix_test.cc b/test/core/iomgr/fd_conservation_posix_test.cc index f4c8e5a21f..aaa14010f8 100644 --- a/test/core/iomgr/fd_conservation_posix_test.cc +++ b/test/core/iomgr/fd_conservation_posix_test.cc @@ -32,7 +32,7 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; /* set max # of file descriptors to a low value, and verify we can create and destroy many more than this number diff --git a/test/core/iomgr/fd_posix_test.cc b/test/core/iomgr/fd_posix_test.cc index 8eda76cf9b..cf75517538 100644 --- a/test/core/iomgr/fd_posix_test.cc +++ b/test/core/iomgr/fd_posix_test.cc @@ -246,7 +246,7 @@ static int server_start(server* sv) { static void server_wait_and_shutdown(server* sv) { gpr_mu_lock(g_mu); while (!sv->done) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_pollset_worker* worker = nullptr; GPR_ASSERT(GRPC_LOG_IF_ERROR( "pollset_work", @@ -362,7 +362,7 @@ static void client_wait_and_shutdown(client* cl) { gpr_mu_lock(g_mu); while (!cl->done) { grpc_pollset_worker* worker = nullptr; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(GRPC_LOG_IF_ERROR( "pollset_work", grpc_pollset_work(g_pollset, &worker, GRPC_MILLIS_INF_FUTURE))); @@ -380,7 +380,7 @@ static void test_grpc_fd(void) { server sv; client cl; int port; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; server_init(&sv); port = server_start(&sv); @@ -436,7 +436,7 @@ static void test_grpc_fd_change(void) { ssize_t result; grpc_closure first_closure; grpc_closure second_closure; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_CLOSURE_INIT(&first_closure, first_read_callback, &a, grpc_schedule_on_exec_ctx); @@ -516,7 +516,7 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size())); grpc_pollset_init(g_pollset, &g_mu); test_grpc_fd(); diff --git a/test/core/iomgr/pollset_set_test.cc b/test/core/iomgr/pollset_set_test.cc index cf9c82b482..f27079134b 100644 --- a/test/core/iomgr/pollset_set_test.cc +++ b/test/core/iomgr/pollset_set_test.cc @@ -199,7 +199,7 @@ static void pollset_set_test_basic() { * | * +---> FD9 (Added after PS2 is added to PSS0) */ - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_pollset_worker* worker; grpc_millis deadline; @@ -301,7 +301,7 @@ void pollset_set_test_dup_fds() { * | +--> FD2 * +---> FD1 */ - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_pollset_worker* worker; grpc_millis deadline; @@ -371,7 +371,7 @@ void pollset_set_test_empty_pollset() { * | * +---> FD2 */ - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_pollset_worker* worker; grpc_millis deadline; @@ -424,7 +424,7 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; const char* poll_strategy = grpc_get_poll_strategy_name(); if (poll_strategy != nullptr && diff --git a/test/core/iomgr/resolve_address_posix_test.cc b/test/core/iomgr/resolve_address_posix_test.cc index 45a5e5a0b1..d37d79fed3 100644 --- a/test/core/iomgr/resolve_address_posix_test.cc +++ b/test/core/iomgr/resolve_address_posix_test.cc @@ -81,7 +81,7 @@ static void actually_poll(void* argsp) { args_struct* args = static_cast<args_struct*>(argsp); grpc_millis deadline = n_sec_deadline(10); while (true) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; bool done = gpr_atm_acq_load(&args->done_atm) != 0; if (done) { break; @@ -120,7 +120,7 @@ static void must_fail(void* argsp, grpc_error* err) { } static void test_unix_socket(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); poll_pollset_until_request_done(&args); @@ -132,7 +132,7 @@ static void test_unix_socket(void) { } static void test_unix_socket_path_name_too_long(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); const char prefix[] = "unix:/path/name"; @@ -158,7 +158,7 @@ int main(int argc, char** argv) { grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; test_unix_socket(); test_unix_socket_path_name_too_long(); } diff --git a/test/core/iomgr/resolve_address_test.cc b/test/core/iomgr/resolve_address_test.cc index e6986f332b..a0dc484f3e 100644 --- a/test/core/iomgr/resolve_address_test.cc +++ b/test/core/iomgr/resolve_address_test.cc @@ -74,7 +74,7 @@ static grpc_millis n_sec_deadline(int seconds) { } static void poll_pollset_until_request_done(args_struct* args) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_millis deadline = n_sec_deadline(10); while (true) { bool done = gpr_atm_acq_load(&args->done_atm) != 0; @@ -115,7 +115,7 @@ static void must_fail(void* argsp, grpc_error* err) { } static void test_localhost(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); grpc_resolve_address( @@ -128,7 +128,7 @@ static void test_localhost(void) { } static void test_default_port(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); grpc_resolve_address( @@ -141,7 +141,7 @@ static void test_default_port(void) { } static void test_non_numeric_default_port(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); grpc_resolve_address( @@ -154,7 +154,7 @@ static void test_non_numeric_default_port(void) { } static void test_missing_default_port(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); grpc_resolve_address( @@ -167,7 +167,7 @@ static void test_missing_default_port(void) { } static void test_ipv6_with_port(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); grpc_resolve_address( @@ -187,7 +187,7 @@ static void test_ipv6_without_port(void) { }; unsigned i; for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); grpc_resolve_address( @@ -207,7 +207,7 @@ static void test_invalid_ip_addresses(void) { }; unsigned i; for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); grpc_resolve_address( @@ -226,7 +226,7 @@ static void test_unparseable_hostports(void) { }; unsigned i; for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; args_struct args; args_init(&args); grpc_resolve_address( @@ -243,7 +243,7 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; test_localhost(); test_default_port(); test_non_numeric_default_port(); diff --git a/test/core/iomgr/resource_quota_test.cc b/test/core/iomgr/resource_quota_test.cc index 7d793937b2..ae26f72701 100644 --- a/test/core/iomgr/resource_quota_test.cc +++ b/test/core/iomgr/resource_quota_test.cc @@ -84,7 +84,7 @@ grpc_closure* make_unused_reclaimer(grpc_closure* then) { } static void destroy_user(grpc_resource_user* usr) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_unref(usr); } @@ -117,11 +117,11 @@ static void test_instant_alloc_then_free(void) { grpc_resource_quota_resize(q, 1024 * 1024); grpc_resource_user* usr = grpc_resource_user_create(q, "usr"); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, NULL); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); } grpc_resource_quota_unref(q); @@ -135,7 +135,7 @@ static void test_instant_alloc_free_pair(void) { grpc_resource_quota_resize(q, 1024 * 1024); grpc_resource_user* usr = grpc_resource_user_create(q, "usr"); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, NULL); grpc_resource_user_free(usr, 1024); } @@ -152,14 +152,14 @@ static void test_simple_async_alloc(void) { { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != nullptr); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); } grpc_resource_quota_unref(q); @@ -175,7 +175,7 @@ static void test_async_alloc_blocked_by_size(void) { gpr_event ev; gpr_event_init(&ev); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait( @@ -186,7 +186,7 @@ static void test_async_alloc_blocked_by_size(void) { nullptr); ; { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); } grpc_resource_quota_unref(q); @@ -202,7 +202,7 @@ static void test_scavenge(void) { { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr1, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != @@ -210,13 +210,13 @@ static void test_scavenge(void) { ; } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr1, 1024); } { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr2, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != @@ -224,7 +224,7 @@ static void test_scavenge(void) { ; } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr2, 1024); } grpc_resource_quota_unref(q); @@ -241,7 +241,7 @@ static void test_scavenge_blocked(void) { gpr_event ev; { gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr1, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != @@ -250,14 +250,14 @@ static void test_scavenge_blocked(void) { } { gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr2, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait( &ev, grpc_timeout_milliseconds_to_deadline(100)) == nullptr); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr1, 1024); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != @@ -265,7 +265,7 @@ static void test_scavenge_blocked(void) { ; } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr2, 1024); } grpc_resource_quota_unref(q); @@ -282,7 +282,7 @@ static void test_blocked_until_scheduled_reclaim(void) { { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != @@ -292,14 +292,14 @@ static void test_blocked_until_scheduled_reclaim(void) { gpr_event reclaim_done; gpr_event_init(&reclaim_done); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_post_reclaimer( usr, false, make_reclaimer(usr, 1024, set_event(&reclaim_done))); } { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&reclaim_done, @@ -309,7 +309,7 @@ static void test_blocked_until_scheduled_reclaim(void) { ; } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); } grpc_resource_quota_unref(q); @@ -326,7 +326,7 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr1, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != @@ -336,14 +336,14 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { gpr_event reclaim_done; gpr_event_init(&reclaim_done); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_post_reclaimer( usr1, false, make_reclaimer(usr1, 1024, set_event(&reclaim_done))); } { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr2, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&reclaim_done, @@ -353,7 +353,7 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { ; } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr2, 1024); } grpc_resource_quota_unref(q); @@ -370,7 +370,7 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) { { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != @@ -380,14 +380,14 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) { gpr_event reclaim_done; gpr_event_init(&reclaim_done); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_post_reclaimer( usr, true, make_reclaimer(usr, 1024, set_event(&reclaim_done))); } { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&reclaim_done, @@ -397,7 +397,7 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) { ; } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); } grpc_resource_quota_unref(q); @@ -415,7 +415,7 @@ static void test_unused_reclaim_is_cancelled(void) { gpr_event destructive_done; gpr_event_init(&destructive_done); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_post_reclaimer( usr, false, make_unused_reclaimer(set_event(&benign_done))); grpc_resource_user_post_reclaimer( @@ -449,7 +449,7 @@ static void test_benign_reclaim_is_preferred(void) { { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != @@ -457,7 +457,7 @@ static void test_benign_reclaim_is_preferred(void) { ; } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_post_reclaimer( usr, false, make_reclaimer(usr, 1024, set_event(&benign_done))); grpc_resource_user_post_reclaimer( @@ -473,7 +473,7 @@ static void test_benign_reclaim_is_preferred(void) { { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&benign_done, @@ -485,7 +485,7 @@ static void test_benign_reclaim_is_preferred(void) { nullptr); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); } grpc_resource_quota_unref(q); @@ -509,7 +509,7 @@ static void test_multiple_reclaims_can_be_triggered(void) { { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&ev, grpc_timeout_seconds_to_deadline(5)) != @@ -517,7 +517,7 @@ static void test_multiple_reclaims_can_be_triggered(void) { ; } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_post_reclaimer( usr, false, make_reclaimer(usr, 512, set_event(&benign_done))); grpc_resource_user_post_reclaimer( @@ -533,7 +533,7 @@ static void test_multiple_reclaims_can_be_triggered(void) { { gpr_event ev; gpr_event_init(&ev); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&ev)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&benign_done, @@ -545,7 +545,7 @@ static void test_multiple_reclaims_can_be_triggered(void) { ; } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); } grpc_resource_quota_unref(q); @@ -564,16 +564,16 @@ static void test_resource_user_stays_allocated_until_memory_released(void) { grpc_resource_quota_resize(q, 1024 * 1024); grpc_resource_user* usr = grpc_resource_user_create(q, "usr"); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, NULL); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_quota_unref(q); grpc_resource_user_unref(usr); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); } } @@ -594,7 +594,7 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( gpr_event reclaimer_cancelled; gpr_event_init(&reclaimer_cancelled); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_post_reclaimer( usr, false, make_unused_reclaimer(set_event(&reclaimer_cancelled))); grpc_core::ExecCtx::Get()->Flush(); @@ -605,7 +605,7 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( { gpr_event allocated; gpr_event_init(&allocated); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&allocated)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&allocated, @@ -615,7 +615,7 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( nullptr); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_unref(usr); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&reclaimer_cancelled, @@ -623,7 +623,7 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( nullptr); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&reclaimer_cancelled, @@ -643,7 +643,7 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { { gpr_event allocated; gpr_event_init(&allocated); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&allocated)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&allocated, @@ -653,7 +653,7 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { gpr_event reclaimer_done; gpr_event_init(&reclaimer_done); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_post_reclaimer( usr, false, make_reclaimer(usr, 1024, set_event(&reclaimer_done))); grpc_core::ExecCtx::Get()->Flush(); @@ -664,7 +664,7 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { { gpr_event allocated; gpr_event_init(&allocated); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc(usr, 1024, set_event(&allocated)); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(gpr_event_wait(&allocated, @@ -675,7 +675,7 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { } } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_free(usr, 1024); } destroy_user(usr); @@ -699,14 +699,14 @@ static void test_one_slice(void) { { const int start_allocs = num_allocs; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc_slices(&alloc, 1024, 1, &buffer); grpc_core::ExecCtx::Get()->Flush(); assert_counter_becomes(&num_allocs, start_allocs + 1); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_buffer_destroy_internal(&buffer); } destroy_user(usr); @@ -731,20 +731,20 @@ static void test_one_slice_deleted_late(void) { { const int start_allocs = num_allocs; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc_slices(&alloc, 1024, 1, &buffer); grpc_core::ExecCtx::Get()->Flush(); assert_counter_becomes(&num_allocs, start_allocs + 1); } { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_unref(usr); } grpc_resource_quota_unref(q); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_buffer_destroy_internal(&buffer); } } @@ -773,7 +773,7 @@ static void test_negative_rq_free_pool(void) { { const int start_allocs = num_allocs; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_alloc_slices(&alloc, 1024, 1, &buffer); grpc_core::ExecCtx::Get()->Flush(); assert_counter_becomes(&num_allocs, start_allocs + 1); @@ -786,13 +786,13 @@ static void test_negative_rq_free_pool(void) { GPR_ASSERT(grpc_resource_quota_get_memory_pressure(q) > 1 - eps); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_user_unref(usr); } grpc_resource_quota_unref(q); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_buffer_destroy_internal(&buffer); } } diff --git a/test/core/iomgr/tcp_client_posix_test.cc b/test/core/iomgr/tcp_client_posix_test.cc index 0cdf30590e..40a050ed9f 100644 --- a/test/core/iomgr/tcp_client_posix_test.cc +++ b/test/core/iomgr/tcp_client_posix_test.cc @@ -53,7 +53,7 @@ static grpc_millis test_deadline(void) { static void finish_connection() { gpr_mu_lock(g_mu); g_connections_complete++; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT( GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, nullptr))); @@ -83,7 +83,7 @@ void test_succeeds(void) { int r; int connections_complete_before; grpc_closure done; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_DEBUG, "test_succeeds"); @@ -139,7 +139,7 @@ void test_fails(void) { struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; int connections_complete_before; grpc_closure done; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_DEBUG, "test_fails"); @@ -192,7 +192,7 @@ int main(int argc, char** argv) { grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_pollset_set = grpc_pollset_set_create(); g_pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size())); grpc_pollset_init(g_pollset, &g_mu); diff --git a/test/core/iomgr/tcp_client_uv_test.cc b/test/core/iomgr/tcp_client_uv_test.cc index 344478ea97..0c6250ed7f 100644 --- a/test/core/iomgr/tcp_client_uv_test.cc +++ b/test/core/iomgr/tcp_client_uv_test.cc @@ -87,7 +87,7 @@ void test_succeeds(void) { uv_tcp_t* svr_handle = static_cast<uv_tcp_t*>(gpr_malloc(sizeof(uv_tcp_t))); int connections_complete_before; grpc_closure done; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_DEBUG, "test_succeeds"); @@ -136,7 +136,7 @@ void test_fails(void) { struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; int connections_complete_before; grpc_closure done; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_DEBUG, "test_fails"); @@ -186,7 +186,7 @@ static void destroy_pollset(void* p, grpc_error* error) { int main(int argc, char** argv) { grpc_closure destroyed; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_test_init(argc, argv); grpc_init(); g_pollset = static_cast<grpc_pollset*>(gpr_malloc(grpc_pollset_size())); diff --git a/test/core/iomgr/tcp_posix_test.cc b/test/core/iomgr/tcp_posix_test.cc index b42fb588eb..f4acba8302 100644 --- a/test/core/iomgr/tcp_posix_test.cc +++ b/test/core/iomgr/tcp_posix_test.cc @@ -163,7 +163,7 @@ static void read_test(size_t num_bytes, size_t slice_size) { size_t written_bytes; grpc_millis deadline = grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_INFO, "Read test of size %" PRIuPTR ", slice size %" PRIuPTR, num_bytes, slice_size); @@ -213,7 +213,7 @@ static void large_read_test(size_t slice_size) { ssize_t written_bytes; grpc_millis deadline = grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_INFO, "Start large read test, slice size %" PRIuPTR, slice_size); @@ -301,7 +301,7 @@ void drain_socket_blocking(int fd, size_t num_bytes, size_t read_size) { int flags; int current = 0; int i; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; flags = fcntl(fd, F_GETFL, 0); GPR_ASSERT(fcntl(fd, F_SETFL, flags & ~O_NONBLOCK) == 0); @@ -348,7 +348,7 @@ static void write_test(size_t num_bytes, size_t slice_size) { grpc_closure write_done_closure; grpc_millis deadline = grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_INFO, "Start write test with %" PRIuPTR " bytes, slice size %" PRIuPTR, @@ -411,7 +411,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { int fd; grpc_millis deadline = grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_closure fd_released_cb; int fd_released_done = 0; GRPC_CLOSURE_INIT(&fd_released_cb, &on_fd_released, &fd_released_done, @@ -507,7 +507,7 @@ static grpc_endpoint_test_fixture create_fixture_tcp_socketpair( size_t slice_size) { int sv[2]; grpc_endpoint_test_fixture f; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; create_sockets(sv); grpc_resource_quota* resource_quota = @@ -541,7 +541,7 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_pollset = (grpc_pollset*)gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); grpc_endpoint_tests(configs[0], g_pollset, g_mu); diff --git a/test/core/iomgr/tcp_server_posix_test.cc b/test/core/iomgr/tcp_server_posix_test.cc index 28fc3601ad..3c9ca2109e 100644 --- a/test/core/iomgr/tcp_server_posix_test.cc +++ b/test/core/iomgr/tcp_server_posix_test.cc @@ -163,14 +163,14 @@ static void on_connect(void* arg, grpc_endpoint* tcp, grpc_pollset* pollset, } static void test_no_op(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_tcp_server* s; GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(nullptr, nullptr, &s)); grpc_tcp_server_unref(s); } static void test_no_op_with_start(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_tcp_server* s; GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(nullptr, nullptr, &s)); LOG_TEST("test_no_op_with_start"); @@ -179,7 +179,7 @@ static void test_no_op_with_start(void) { } static void test_no_op_with_port(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; grpc_tcp_server* s; @@ -198,7 +198,7 @@ static void test_no_op_with_port(void) { } static void test_no_op_with_port_and_start(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; grpc_tcp_server* s; @@ -282,7 +282,7 @@ static grpc_error* tcp_connect(const test_addr* remote, static void test_connect(size_t num_connects, const grpc_channel_args* channel_args, test_addrs* dst_addrs, bool test_dst_addrs) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; grpc_resolved_address resolved_addr1; struct sockaddr_storage* const addr = @@ -436,7 +436,7 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size())); grpc_pollset_init(g_pollset, &g_mu); diff --git a/test/core/iomgr/tcp_server_uv_test.cc b/test/core/iomgr/tcp_server_uv_test.cc index 07b1fb1579..35d62b51b7 100644 --- a/test/core/iomgr/tcp_server_uv_test.cc +++ b/test/core/iomgr/tcp_server_uv_test.cc @@ -115,14 +115,14 @@ static void on_connect(void* arg, grpc_endpoint* tcp, grpc_pollset* pollset, } static void test_no_op(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_tcp_server* s; GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s)); grpc_tcp_server_unref(s); } static void test_no_op_with_start(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_tcp_server* s; GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s)); LOG_TEST("test_no_op_with_start"); @@ -131,7 +131,7 @@ static void test_no_op_with_start(void) { } static void test_no_op_with_port(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; grpc_tcp_server* s; @@ -150,7 +150,7 @@ static void test_no_op_with_port(void) { } static void test_no_op_with_port_and_start(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; grpc_tcp_server* s; @@ -214,7 +214,7 @@ static void tcp_connect(const struct sockaddr* remote, socklen_t remote_len, /* Tests a tcp server with multiple ports. */ static void test_connect(unsigned n) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; grpc_resolved_address resolved_addr1; struct sockaddr_storage* addr = (struct sockaddr_storage*)resolved_addr.addr; @@ -284,7 +284,7 @@ static void destroy_pollset(void* p, grpc_error* error) { int main(int argc, char** argv) { grpc_closure destroyed; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_test_init(argc, argv); grpc_init(); g_pollset = static_cast<grpc_pollset*>(gpr_malloc(grpc_pollset_size())); diff --git a/test/core/iomgr/timer_list_test.cc b/test/core/iomgr/timer_list_test.cc index 7ab4c4415c..deb8c4d87e 100644 --- a/test/core/iomgr/timer_list_test.cc +++ b/test/core/iomgr/timer_list_test.cc @@ -45,7 +45,7 @@ static void cb(void* arg, grpc_error* error) { static void add_test(void) { int i; grpc_timer timers[20]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_INFO, "add_test"); @@ -109,7 +109,7 @@ static void add_test(void) { /* Cleaning up a list with pending timers. */ void destruction_test(void) { grpc_timer timers[5]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_INFO, "destruction_test"); diff --git a/test/core/iomgr/udp_server_test.cc b/test/core/iomgr/udp_server_test.cc index 379c50c09d..7f662f0683 100644 --- a/test/core/iomgr/udp_server_test.cc +++ b/test/core/iomgr/udp_server_test.cc @@ -127,13 +127,13 @@ static test_socket_factory* test_socket_factory_create(void) { } static void test_no_op(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_udp_server* s = grpc_udp_server_create(nullptr); grpc_udp_server_destroy(s, nullptr); } static void test_no_op_with_start(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_udp_server* s = grpc_udp_server_create(nullptr); LOG_TEST("test_no_op_with_start"); grpc_udp_server_start(s, nullptr, 0, nullptr); @@ -142,7 +142,7 @@ static void test_no_op_with_start(void) { static void test_no_op_with_port(void) { g_number_of_orphan_calls = 0; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; grpc_udp_server* s = grpc_udp_server_create(nullptr); @@ -162,7 +162,7 @@ static void test_no_op_with_port(void) { static void test_no_op_with_port_and_socket_factory(void) { g_number_of_orphan_calls = 0; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; @@ -194,7 +194,7 @@ static void test_no_op_with_port_and_socket_factory(void) { static void test_no_op_with_port_and_start(void) { g_number_of_orphan_calls = 0; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; grpc_udp_server* s = grpc_udp_server_create(nullptr); @@ -216,7 +216,7 @@ static void test_no_op_with_port_and_start(void) { } static void test_receive(int number_of_clients) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; struct sockaddr_storage* addr = (struct sockaddr_storage*)resolved_addr.addr; int clifd, svrfd; @@ -294,7 +294,7 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size())); grpc_pollset_init(g_pollset, &g_mu); diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 7d0a24a459..ecc61928f5 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -148,7 +148,7 @@ static grpc_httpcli_response http_response(int status, const char* body) { /* -- Tests. -- */ static void test_empty_md_array(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_credentials_mdelem_array md_array; memset(&md_array, 0, sizeof(md_array)); GPR_ASSERT(md_array.md == nullptr); @@ -157,7 +157,7 @@ static void test_empty_md_array(void) { } static void test_add_to_empty_md_array(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_credentials_mdelem_array md_array; memset(&md_array, 0, sizeof(md_array)); const char* key = "hello"; @@ -172,7 +172,7 @@ static void test_add_to_empty_md_array(void) { } static void test_add_abunch_to_md_array(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_credentials_mdelem_array md_array; memset(&md_array, 0, sizeof(md_array)); const char* key = "hello"; @@ -191,7 +191,7 @@ static void test_add_abunch_to_md_array(void) { } static void test_oauth2_token_fetcher_creds_parsing_ok(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -208,7 +208,7 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) { } static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -220,7 +220,7 @@ static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) { } static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = http_response(200, ""); @@ -231,7 +231,7 @@ static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) { } static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -246,7 +246,7 @@ static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) { } static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = http_response(200, @@ -260,7 +260,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) { } static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -276,7 +276,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) { static void test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime( void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -378,7 +378,7 @@ static void run_request_metadata_test(grpc_call_credentials* creds, } static void test_google_iam_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = {{GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, test_google_iam_authorization_token}, {GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, @@ -395,7 +395,7 @@ static void test_google_iam_creds(void) { } static void test_access_token_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = {{GRPC_AUTHORIZATION_METADATA_KEY, "Bearer blah"}}; request_metadata_state* state = make_request_metadata_state(GRPC_ERROR_NONE, emd, GPR_ARRAY_SIZE(emd)); @@ -419,7 +419,7 @@ static grpc_security_status check_channel_oauth2_create_security_connector( } static void test_channel_oauth2_composite_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args* new_args; grpc_channel_credentials_vtable vtable = { nullptr, check_channel_oauth2_create_security_connector, nullptr}; @@ -439,7 +439,7 @@ static void test_channel_oauth2_composite_creds(void) { } static void test_oauth2_google_iam_composite_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {GRPC_AUTHORIZATION_METADATA_KEY, test_oauth2_bearer_token}, {GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, @@ -492,7 +492,7 @@ check_channel_oauth2_google_iam_create_security_connector( } static void test_channel_oauth2_google_iam_composite_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args* new_args; grpc_channel_credentials_vtable vtable = { nullptr, check_channel_oauth2_google_iam_create_security_connector, @@ -570,7 +570,7 @@ static int httpcli_get_should_not_be_called(const grpc_httpcli_request* request, } static void test_compute_engine_creds_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; grpc_call_credentials* creds = @@ -599,7 +599,7 @@ static void test_compute_engine_creds_success(void) { } static void test_compute_engine_creds_failure(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Error occured when fetching oauth2 token."), @@ -659,7 +659,7 @@ static int refresh_token_httpcli_post_failure( } static void test_refresh_token_creds_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, @@ -688,7 +688,7 @@ static void test_refresh_token_creds_success(void) { } static void test_refresh_token_creds_failure(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Error occured when fetching oauth2 token."), @@ -791,7 +791,7 @@ static void test_jwt_creds_lifetime(void) { static void test_jwt_creds_success(void) { char* json_key_string = test_json_key_str(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; char* expected_md_value; @@ -833,7 +833,7 @@ static void test_jwt_creds_success(void) { static void test_jwt_creds_signing_failure(void) { char* json_key_string = test_json_key_str(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; request_metadata_state* state = make_request_metadata_state( @@ -865,7 +865,7 @@ static void set_google_default_creds_env_var_with_file_contents( } static void test_google_default_creds_auth_key(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_service_account_jwt_access_credentials* jwt; grpc_composite_channel_credentials* creds; char* json_key = test_json_key_str(); @@ -886,7 +886,7 @@ static void test_google_default_creds_auth_key(void) { } static void test_google_default_creds_refresh_token(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_google_refresh_token_credentials* refresh; grpc_composite_channel_credentials* creds; grpc_flush_cached_google_default_credentials(); @@ -921,7 +921,7 @@ static int default_creds_gce_detection_httpcli_get_success_override( static char* null_well_known_creds_path_getter(void) { return nullptr; } static void test_google_default_creds_gce(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; request_metadata_state* state = @@ -1056,7 +1056,7 @@ static void plugin_destroy(void* state) { static void test_metadata_plugin_success(void) { plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; request_metadata_state* md_state = make_request_metadata_state( @@ -1079,7 +1079,7 @@ static void test_metadata_plugin_success(void) { static void test_metadata_plugin_failure(void) { plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; char* expected_error; @@ -1121,7 +1121,7 @@ static void test_get_well_known_google_credentials_file_path(void) { } static void test_channel_creds_duplicate_without_call_creds(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_credentials* channel_creds = grpc_fake_transport_security_credentials_create(); diff --git a/test/core/security/json_token_test.cc b/test/core/security/json_token_test.cc index 57e2f4c978..aac9cc0029 100644 --- a/test/core/security/json_token_test.cc +++ b/test/core/security/json_token_test.cc @@ -207,7 +207,7 @@ static void test_parse_json_key_failure_no_private_key(void) { static grpc_json* parse_json_part_from_jwt(const char* str, size_t len, char** scratchpad) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; char* b64; char* decoded; grpc_json* json; @@ -327,7 +327,7 @@ static void check_jwt_claim(grpc_json* claim, const char* expected_audience, static void check_jwt_signature(const char* b64_signature, RSA* rsa_key, const char* signed_data, size_t signed_data_size) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; EVP_MD_CTX* md_ctx = EVP_MD_CTX_create(); EVP_PKEY* key = EVP_PKEY_new(); diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc index ec14fec697..e219260b1d 100644 --- a/test/core/security/jwt_verifier_test.cc +++ b/test/core/security/jwt_verifier_test.cc @@ -209,7 +209,7 @@ static void test_claims_success(void) { grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != nullptr); GPR_ASSERT(grpc_jwt_claims_json(claims) == json); @@ -231,7 +231,7 @@ static void test_expired_claims_failure(void) { gpr_timespec exp_exp = {120, 0, GPR_CLOCK_REALTIME}; gpr_timespec exp_nbf = {60, 0, GPR_CLOCK_REALTIME}; GPR_ASSERT(json != nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != nullptr); GPR_ASSERT(grpc_jwt_claims_json(claims) == json); @@ -252,7 +252,7 @@ static void test_invalid_claims_failure(void) { grpc_slice s = grpc_slice_from_copied_string(invalid_claims); grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == nullptr); } @@ -262,7 +262,7 @@ static void test_bad_audience_claims_failure(void) { grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != nullptr); GPR_ASSERT(grpc_jwt_claims_check(claims, "https://bar.com") == @@ -276,7 +276,7 @@ static void test_bad_subject_claims_failure(void) { grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != nullptr); GPR_ASSERT(grpc_jwt_claims_check(claims, "https://foo.com") == @@ -350,7 +350,7 @@ static void on_verification_success(void* user_data, } static void test_jwt_verifier_google_email_issuer_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_google_email_issuer); @@ -383,7 +383,7 @@ static int httpcli_get_custom_keys_for_email( } static void test_jwt_verifier_custom_email_issuer_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(&custom_mapping, 1); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_custom_email_issuer); @@ -430,7 +430,7 @@ static int httpcli_get_openid_config(const grpc_httpcli_request* request, } static void test_jwt_verifier_url_issuer_success(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_url_issuer); @@ -469,7 +469,7 @@ static int httpcli_get_bad_json(const grpc_httpcli_request* request, } static void test_jwt_verifier_url_issuer_bad_config(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_url_issuer); @@ -492,7 +492,7 @@ static void test_jwt_verifier_url_issuer_bad_config(void) { } static void test_jwt_verifier_bad_json_key(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_google_email_issuer); @@ -521,7 +521,7 @@ static void corrupt_jwt_sig(char* jwt) { char* last_dot = strrchr(jwt, '.'); GPR_ASSERT(last_dot != nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; sig = grpc_base64_decode(last_dot + 1, 1); } GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); @@ -543,7 +543,7 @@ static void on_verification_bad_signature(void* user_data, } static void test_jwt_verifier_bad_signature(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); char* jwt = nullptr; char* key_str = json_key_str(json_key_str_part3_for_url_issuer); @@ -583,7 +583,7 @@ static void on_verification_bad_format(void* user_data, } static void test_jwt_verifier_bad_format(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(nullptr, 0); grpc_httpcli_set_override(httpcli_get_should_not_be_called, httpcli_post_should_not_be_called); diff --git a/test/core/security/oauth2_utils.cc b/test/core/security/oauth2_utils.cc index 7551d7df85..0d3a1279af 100644 --- a/test/core/security/oauth2_utils.cc +++ b/test/core/security/oauth2_utils.cc @@ -69,7 +69,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials( grpc_call_credentials* creds) { oauth2_request request; memset(&request, 0, sizeof(request)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_closure do_nothing_closure; grpc_auth_metadata_context null_ctx = {"", "", nullptr, nullptr}; diff --git a/test/core/security/print_google_default_creds_token.cc b/test/core/security/print_google_default_creds_token.cc index 7089b9808a..b3742f58a8 100644 --- a/test/core/security/print_google_default_creds_token.cc +++ b/test/core/security/print_google_default_creds_token.cc @@ -62,7 +62,7 @@ static void on_metadata_response(void* arg, grpc_error* error) { int main(int argc, char** argv) { int result = 0; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; synchronizer sync; grpc_channel_credentials* creds = nullptr; const char* service_url = "https://test.foo.google.com/Foo"; diff --git a/test/core/security/secure_endpoint_test.cc b/test/core/security/secure_endpoint_test.cc index c8f4f32538..38c78fed42 100644 --- a/test/core/security/secure_endpoint_test.cc +++ b/test/core/security/secure_endpoint_test.cc @@ -38,7 +38,7 @@ static grpc_pollset* g_pollset; static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( size_t slice_size, grpc_slice* leftover_slices, size_t leftover_nslices, bool use_zero_copy_protector) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; tsi_frame_protector* fake_read_protector = tsi_create_fake_frame_protector(nullptr); tsi_frame_protector* fake_write_protector = @@ -172,7 +172,7 @@ static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) { grpc_slice_buffer incoming; grpc_slice s = grpc_slice_from_copied_string("hello world 12345678900987654321"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; int n = 0; grpc_closure done_closure; gpr_log(GPR_INFO, "Start test left over"); @@ -209,7 +209,7 @@ int main(int argc, char** argv) { grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; g_pollset = (grpc_pollset*)gpr_zalloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); grpc_endpoint_tests(configs[0], g_pollset, g_mu); diff --git a/test/core/security/ssl_server_fuzzer.cc b/test/core/security/ssl_server_fuzzer.cc index 9cf73fa871..7056cfe581 100644 --- a/test/core/security/ssl_server_fuzzer.cc +++ b/test/core/security/ssl_server_fuzzer.cc @@ -56,7 +56,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (leak_check) grpc_memory_counters_init(); grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resource_quota* resource_quota = grpc_resource_quota_create("ssl_server_fuzzer"); diff --git a/test/core/security/verify_jwt.cc b/test/core/security/verify_jwt.cc index 1bd92bbc97..e039970c67 100644 --- a/test/core/security/verify_jwt.cc +++ b/test/core/security/verify_jwt.cc @@ -76,7 +76,7 @@ int main(int argc, char** argv) { gpr_cmdline* cl; const char* jwt = nullptr; const char* aud = nullptr; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_init(); cl = gpr_cmdline_create("JWT verifier tool"); diff --git a/test/core/slice/b64_test.cc b/test/core/slice/b64_test.cc index e0c7ed361d..94785fd1e2 100644 --- a/test/core/slice/b64_test.cc +++ b/test/core/slice/b64_test.cc @@ -45,7 +45,7 @@ static void test_simple_encode_decode_b64(int url_safe, int multiline) { const char* hello = "hello"; char* hello_b64 = grpc_base64_encode(hello, strlen(hello), url_safe, multiline); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice hello_slice = grpc_base64_decode(hello_b64, url_safe); GPR_ASSERT(GRPC_SLICE_LENGTH(hello_slice) == strlen(hello)); GPR_ASSERT(strncmp((const char*)GRPC_SLICE_START_PTR(hello_slice), hello, @@ -65,7 +65,7 @@ static void test_full_range_encode_decode_b64(int url_safe, int multiline) { /* Try all the different paddings. */ for (i = 0; i < 3; i++) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; b64 = grpc_base64_encode(orig, sizeof(orig) - i, url_safe, multiline); orig_decoded = grpc_base64_decode(b64, url_safe); GPR_ASSERT(GRPC_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i)); @@ -116,7 +116,7 @@ static void test_url_safe_unsafe_mismatch_failure(void) { int url_safe = 1; for (i = 0; i < sizeof(orig); i++) orig[i] = (uint8_t)i; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; b64 = grpc_base64_encode(orig, sizeof(orig), url_safe, 0); orig_decoded = grpc_base64_decode(b64, !url_safe); GPR_ASSERT(GRPC_SLICE_IS_EMPTY(orig_decoded)); @@ -165,7 +165,7 @@ static void test_rfc4648_test_vectors(void) { static void test_unpadded_decode(void) { grpc_slice decoded; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; decoded = grpc_base64_decode("Zm9vYmFy", 0); GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "foobar") == 0); diff --git a/test/core/slice/slice_hash_table_test.cc b/test/core/slice/slice_hash_table_test.cc index 1cbb241a98..9fad9a614e 100644 --- a/test/core/slice/slice_hash_table_test.cc +++ b/test/core/slice/slice_hash_table_test.cc @@ -119,7 +119,7 @@ static void test_slice_hash_table() { check_values(test_entries, num_entries, table); check_non_existent_value("XX", table); // Clean up. - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_hash_table_unref(table); } @@ -146,7 +146,7 @@ static void test_slice_hash_table_eq() { create_table_from_entries(test_entries_b, num_entries_b, value_cmp_fn); GPR_ASSERT(grpc_slice_hash_table_cmp(table_a, table_b) == 0); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_hash_table_unref(table_a); grpc_slice_hash_table_unref(table_b); } @@ -217,7 +217,7 @@ static void test_slice_hash_table_not_eq() { create_table_from_entries(test_entries_h, num_entries_h, pointer_cmp_fn); GPR_ASSERT(grpc_slice_hash_table_cmp(table_g, table_h) != 0); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_slice_hash_table_unref(table_a); grpc_slice_hash_table_unref(table_b_larger); grpc_slice_hash_table_unref(table_b_smaller); diff --git a/test/core/surface/byte_buffer_reader_test.cc b/test/core/surface/byte_buffer_reader_test.cc index b762fed941..94a8615b3c 100644 --- a/test/core/surface/byte_buffer_reader_test.cc +++ b/test/core/surface/byte_buffer_reader_test.cc @@ -132,7 +132,7 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, memset(GRPC_SLICE_START_PTR(input_slice), 'a', input_size); grpc_slice_buffer_add(&sliceb_in, input_slice); /* takes ownership */ { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_msg_compress(algorithm, &sliceb_in, &sliceb_out)); } diff --git a/test/core/surface/channel_create_test.cc b/test/core/surface/channel_create_test.cc index 65fac9daa3..37247f89d0 100644 --- a/test/core/surface/channel_create_test.cc +++ b/test/core/surface/channel_create_test.cc @@ -35,7 +35,7 @@ void test_unknown_scheme_target(void) { chan = grpc_insecure_channel_create("blah://blah", nullptr, nullptr); GPR_ASSERT(chan != nullptr); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_element* elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0); GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client")); diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc index 3452f78a3b..fefbb3c185 100644 --- a/test/core/surface/completion_queue_test.cc +++ b/test/core/surface/completion_queue_test.cc @@ -137,7 +137,7 @@ static void test_cq_end_op(void) { attr.version = 1; attr.cq_completion_type = GRPC_CQ_NEXT; for (size_t i = 0; i < GPR_ARRAY_SIZE(polling_types); i++) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; attr.cq_polling_type = polling_types[i]; cc = grpc_completion_queue_create( grpc_completion_queue_factory_lookup(&attr), &attr, nullptr); @@ -172,7 +172,7 @@ static void test_cq_tls_cache_full(void) { attr.version = 1; attr.cq_completion_type = GRPC_CQ_NEXT; for (size_t i = 0; i < GPR_ARRAY_SIZE(polling_types); i++) { - grpc_core::ExecCtx _local_exec_ctx; // Reset exec_ctx + grpc_core::ExecCtx exec_ctx; // Reset exec_ctx attr.cq_polling_type = polling_types[i]; cc = grpc_completion_queue_create( grpc_completion_queue_factory_lookup(&attr), &attr, nullptr); @@ -212,7 +212,7 @@ static void test_cq_tls_cache_empty(void) { attr.version = 1; attr.cq_completion_type = GRPC_CQ_NEXT; for (size_t i = 0; i < GPR_ARRAY_SIZE(polling_types); i++) { - grpc_core::ExecCtx _local_exec_ctx; // Reset exec_ctx + grpc_core::ExecCtx exec_ctx; // Reset exec_ctx attr.cq_polling_type = polling_types[i]; cc = grpc_completion_queue_create( grpc_completion_queue_factory_lookup(&attr), &attr, nullptr); @@ -293,7 +293,7 @@ static void test_pluck(void) { attr.version = 1; attr.cq_completion_type = GRPC_CQ_PLUCK; for (size_t pidx = 0; pidx < GPR_ARRAY_SIZE(polling_types); pidx++) { - grpc_core::ExecCtx _local_exec_ctx; // reset exec_ctx + grpc_core::ExecCtx exec_ctx; // reset exec_ctx attr.cq_polling_type = polling_types[pidx]; cc = grpc_completion_queue_create( grpc_completion_queue_factory_lookup(&attr), &attr, nullptr); diff --git a/test/core/surface/completion_queue_threading_test.cc b/test/core/surface/completion_queue_threading_test.cc index 8867ba88c3..ba9491fc41 100644 --- a/test/core/surface/completion_queue_threading_test.cc +++ b/test/core/surface/completion_queue_threading_test.cc @@ -80,7 +80,7 @@ static void test_too_many_plucks(void) { gpr_thd_id thread_ids[GPR_ARRAY_SIZE(tags)]; struct thread_state thread_states[GPR_ARRAY_SIZE(tags)]; gpr_thd_options thread_options = gpr_thd_options_default(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; unsigned i, j; LOG_TEST("test_too_many_plucks"); @@ -158,7 +158,7 @@ static void producer_thread(void* arg) { gpr_log(GPR_INFO, "producer %d phase 2", opt->id); for (i = 0; i < TEST_THREAD_EVENTS; i++) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_cq_end_op(opt->cc, (void*)(intptr_t)1, GRPC_ERROR_NONE, free_completion, nullptr, static_cast<grpc_cq_completion*>( diff --git a/test/core/surface/concurrent_connectivity_test.cc b/test/core/surface/concurrent_connectivity_test.cc index f21086847b..0bebac216a 100644 --- a/test/core/surface/concurrent_connectivity_test.cc +++ b/test/core/surface/concurrent_connectivity_test.cc @@ -117,7 +117,7 @@ static void on_connect(void* vargs, grpc_endpoint* tcp, void bad_server_thread(void* vargs) { struct server_thread_args* args = (struct server_thread_args*)vargs; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_resolved_address resolved_addr; struct sockaddr_storage* addr = (struct sockaddr_storage*)resolved_addr.addr; int port; @@ -225,7 +225,7 @@ int run_concurrent_connectivity_test() { gpr_atm_rel_store(&args.stop, 1); gpr_thd_join(server); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_pollset_shutdown( args.pollset, GRPC_CLOSURE_CREATE(done_pollset_shutdown, args.pollset, grpc_schedule_on_exec_ctx)); diff --git a/test/core/surface/lame_client_test.cc b/test/core/surface/lame_client_test.cc index 258ee6a831..4bf40569e6 100644 --- a/test/core/surface/lame_client_test.cc +++ b/test/core/surface/lame_client_test.cc @@ -44,7 +44,7 @@ void test_transport_op(grpc_channel* channel) { grpc_transport_op* op; grpc_channel_element* elem; grpc_connectivity_state state = GRPC_CHANNEL_IDLE; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_CLOSURE_INIT(&transport_op_cb, verify_connectivity, &state, grpc_schedule_on_exec_ctx); diff --git a/test/core/surface/num_external_connectivity_watchers_test.cc b/test/core/surface/num_external_connectivity_watchers_test.cc index 4052f19f51..9cdd299ae3 100644 --- a/test/core/surface/num_external_connectivity_watchers_test.cc +++ b/test/core/surface/num_external_connectivity_watchers_test.cc @@ -178,7 +178,7 @@ static grpc_channel* secure_test_create_channel(const char* addr) { grpc_channel* channel = grpc_secure_channel_create(ssl_creds, addr, new_client_args, nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(new_client_args); } grpc_channel_credentials_release(ssl_creds); diff --git a/test/core/surface/secure_channel_create_test.cc b/test/core/surface/secure_channel_create_test.cc index 62c2d92885..fa22cd6873 100644 --- a/test/core/surface/secure_channel_create_test.cc +++ b/test/core/surface/secure_channel_create_test.cc @@ -37,7 +37,7 @@ void test_unknown_scheme_target(void) { grpc_channel_element* elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0); GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client")); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_CHANNEL_INTERNAL_UNREF(chan, "test"); grpc_channel_credentials_unref(creds); } @@ -55,7 +55,7 @@ void test_security_connector_already_in_arg(void) { grpc_channel_element* elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0); GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client")); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_CHANNEL_INTERNAL_UNREF(chan, "test"); } @@ -65,7 +65,7 @@ void test_null_creds(void) { grpc_channel_element* elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(chan), 0); GPR_ASSERT(0 == strcmp(elem->filter->name, "lame-client")); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GRPC_CHANNEL_INTERNAL_UNREF(chan, "test"); } diff --git a/test/core/surface/sequential_connectivity_test.cc b/test/core/surface/sequential_connectivity_test.cc index e7ae97908c..b2d9b428f0 100644 --- a/test/core/surface/sequential_connectivity_test.cc +++ b/test/core/surface/sequential_connectivity_test.cc @@ -156,7 +156,7 @@ static grpc_channel* secure_test_create_channel(const char* addr) { grpc_channel* channel = grpc_secure_channel_create(ssl_creds, addr, new_client_args, nullptr); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_channel_args_destroy(new_client_args); } grpc_channel_credentials_release(ssl_creds); diff --git a/test/core/transport/bdp_estimator_test.cc b/test/core/transport/bdp_estimator_test.cc index 168807adde..fb7fc4cab2 100644 --- a/test/core/transport/bdp_estimator_test.cc +++ b/test/core/transport/bdp_estimator_test.cc @@ -58,7 +58,7 @@ namespace { void AddSamples(BdpEstimator* estimator, int64_t* samples, size_t n) { estimator->AddIncomingBytes(1234567); inc_time(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; estimator->SchedulePing(); estimator->StartPing(); for (size_t i = 0; i < n; i++) { diff --git a/test/core/transport/byte_stream_test.cc b/test/core/transport/byte_stream_test.cc index a0dbc79158..2aab6e9262 100644 --- a/test/core/transport/byte_stream_test.cc +++ b/test/core/transport/byte_stream_test.cc @@ -37,7 +37,7 @@ static void not_called_closure(void* arg, grpc_error* error) { static void test_slice_buffer_stream_basic(void) { gpr_log(GPR_DEBUG, "test_slice_buffer_stream_basic"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; // Create and populate slice buffer. grpc_slice_buffer buffer; grpc_slice_buffer_init(&buffer); @@ -71,7 +71,7 @@ static void test_slice_buffer_stream_basic(void) { static void test_slice_buffer_stream_shutdown(void) { gpr_log(GPR_DEBUG, "test_slice_buffer_stream_shutdown"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; // Create and populate slice buffer. grpc_slice_buffer buffer; grpc_slice_buffer_init(&buffer); @@ -117,7 +117,7 @@ static void test_slice_buffer_stream_shutdown(void) { static void test_caching_byte_stream_basic(void) { gpr_log(GPR_DEBUG, "test_caching_byte_stream_basic"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; // Create and populate slice buffer byte stream. grpc_slice_buffer buffer; grpc_slice_buffer_init(&buffer); @@ -156,7 +156,7 @@ static void test_caching_byte_stream_basic(void) { static void test_caching_byte_stream_reset(void) { gpr_log(GPR_DEBUG, "test_caching_byte_stream_reset"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; // Create and populate slice buffer byte stream. grpc_slice_buffer buffer; grpc_slice_buffer_init(&buffer); @@ -202,7 +202,7 @@ static void test_caching_byte_stream_reset(void) { static void test_caching_byte_stream_shared_cache(void) { gpr_log(GPR_DEBUG, "test_caching_byte_stream_shared_cache"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; // Create and populate slice buffer byte stream. grpc_slice_buffer buffer; grpc_slice_buffer_init(&buffer); diff --git a/test/core/transport/chttp2/bin_decoder_test.cc b/test/core/transport/chttp2/bin_decoder_test.cc index 4b65d7d3ca..6d70a4261b 100644 --- a/test/core/transport/chttp2/bin_decoder_test.cc +++ b/test/core/transport/chttp2/bin_decoder_test.cc @@ -79,7 +79,7 @@ static grpc_slice base64_decode_with_length(const char* s, int main(int argc, char** argv) { grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; /* ENCODE_AND_DECODE tests grpc_chttp2_base64_decode_with_length(), which takes encoded base64 strings without pad chars, but output length is diff --git a/test/core/transport/chttp2/hpack_encoder_test.cc b/test/core/transport/chttp2/hpack_encoder_test.cc index 2772aef3c4..d2dbd4a798 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.cc +++ b/test/core/transport/chttp2/hpack_encoder_test.cc @@ -257,7 +257,7 @@ static void test_interned_key_indexed() { static void run_test(void (*test)(), const char* name) { gpr_log(GPR_INFO, "RUN TEST: %s", name); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hpack_compressor_init(&g_compressor); test(); grpc_chttp2_hpack_compressor_destroy(&g_compressor); diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc index dcec8b2230..9a195daee0 100644 --- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc +++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc @@ -38,7 +38,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_init(); grpc_chttp2_hpack_parser parser; { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hpack_parser_init(&parser); parser.on_header = onhdr; GRPC_ERROR_UNREF(grpc_chttp2_hpack_parser_parse( diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc index 52900c5419..9d3456a873 100644 --- a/test/core/transport/chttp2/hpack_parser_test.cc +++ b/test/core/transport/chttp2/hpack_parser_test.cc @@ -62,7 +62,7 @@ static void test_vector(grpc_chttp2_hpack_parser* parser, grpc_slice_unref(input); for (i = 0; i < nslices; i++) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_chttp2_hpack_parser_parse(parser, slices[i]) == GRPC_ERROR_NONE); } @@ -79,7 +79,7 @@ static void test_vector(grpc_chttp2_hpack_parser* parser, static void test_vectors(grpc_slice_split_mode mode) { grpc_chttp2_hpack_parser parser; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hpack_parser_init(&parser); /* D.2.1 */ diff --git a/test/core/transport/chttp2/hpack_table_test.cc b/test/core/transport/chttp2/hpack_table_test.cc index 97e1a02621..3f3cb2ee9d 100644 --- a/test/core/transport/chttp2/hpack_table_test.cc +++ b/test/core/transport/chttp2/hpack_table_test.cc @@ -44,7 +44,7 @@ static void assert_index(const grpc_chttp2_hptbl* tbl, uint32_t idx, } static void test_static_lookup(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hptbl tbl; grpc_chttp2_hptbl_init(&tbl); @@ -123,7 +123,7 @@ static void test_many_additions(void) { LOG_TEST("test_many_additions"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hptbl_init(&tbl); for (i = 0; i < 100000; i++) { @@ -152,7 +152,7 @@ static void test_many_additions(void) { static grpc_chttp2_hptbl_find_result find_simple(grpc_chttp2_hptbl* tbl, const char* key, const char* value) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem md = grpc_mdelem_from_slices( grpc_slice_from_copied_string(key), grpc_slice_from_copied_string(value)); grpc_chttp2_hptbl_find_result r = grpc_chttp2_hptbl_find(tbl, md); @@ -162,7 +162,7 @@ static grpc_chttp2_hptbl_find_result find_simple(grpc_chttp2_hptbl* tbl, } static void test_find(void) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hptbl tbl; uint32_t i; char buffer[32]; diff --git a/test/core/transport/connectivity_state_test.cc b/test/core/transport/connectivity_state_test.cc index e1bc0c4eb7..f5894599e5 100644 --- a/test/core/transport/connectivity_state_test.cc +++ b/test/core/transport/connectivity_state_test.cc @@ -58,7 +58,7 @@ static void test_connectivity_state_name(void) { static void test_check(void) { grpc_connectivity_state_tracker tracker; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_error* error; gpr_log(GPR_DEBUG, "test_check"); grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_IDLE, "xxx"); @@ -74,7 +74,7 @@ static void test_subscribe_then_unsubscribe(void) { grpc_closure* closure = GRPC_CLOSURE_CREATE(must_fail, THE_ARG, grpc_schedule_on_exec_ctx); grpc_connectivity_state state = GRPC_CHANNEL_IDLE; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_DEBUG, "test_subscribe_then_unsubscribe"); g_counter = 0; grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_IDLE, "xxx"); @@ -96,7 +96,7 @@ static void test_subscribe_then_destroy(void) { grpc_closure* closure = GRPC_CLOSURE_CREATE(must_succeed, THE_ARG, grpc_schedule_on_exec_ctx); grpc_connectivity_state state = GRPC_CHANNEL_IDLE; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_DEBUG, "test_subscribe_then_destroy"); g_counter = 0; grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_IDLE, "xxx"); @@ -117,7 +117,7 @@ static void test_subscribe_with_failure_then_destroy(void) { grpc_closure* closure = GRPC_CLOSURE_CREATE(must_fail, THE_ARG, grpc_schedule_on_exec_ctx); grpc_connectivity_state state = GRPC_CHANNEL_SHUTDOWN; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_log(GPR_DEBUG, "test_subscribe_with_failure_then_destroy"); g_counter = 0; grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_SHUTDOWN, "xxx"); diff --git a/test/core/transport/metadata_test.cc b/test/core/transport/metadata_test.cc index 70d557b128..5c52ae8d5f 100644 --- a/test/core/transport/metadata_test.cc +++ b/test/core/transport/metadata_test.cc @@ -60,7 +60,7 @@ static void test_create_metadata(bool intern_keys, bool intern_values) { intern_keys, intern_values); grpc_init(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; m1 = grpc_mdelem_from_slices( maybe_intern(grpc_slice_from_static_string("a"), intern_keys), maybe_intern(grpc_slice_from_static_string("b"), intern_values)); @@ -95,7 +95,7 @@ static void test_create_many_ephemeral_metadata(bool intern_keys, intern_keys, intern_values); grpc_init(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; /* add, and immediately delete a bunch of different elements */ for (i = 0; i < MANY; i++) { gpr_ltoa(i, buffer); @@ -117,7 +117,7 @@ static void test_create_many_persistant_metadata(void) { gpr_log(GPR_INFO, "test_create_many_persistant_metadata"); grpc_init(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; /* add phase */ for (i = 0; i < MANY; i++) { gpr_ltoa(i, buffer); @@ -151,7 +151,7 @@ static void test_spin_creating_the_same_thing(bool intern_keys, intern_keys, intern_values); grpc_init(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem a, b, c; GRPC_MDELEM_UNREF( a = grpc_mdelem_from_slices( @@ -178,7 +178,7 @@ static void test_identity_laws(bool intern_keys, bool intern_values) { intern_keys, intern_values); grpc_init(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem a, b, c; a = grpc_mdelem_from_slices( maybe_intern(grpc_slice_from_static_string("a"), intern_keys), @@ -225,7 +225,7 @@ static void test_things_stick_around(void) { gpr_log(GPR_INFO, "test_things_stick_around"); grpc_init(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; for (i = 0; i < nstrs; i++) { gpr_asprintf(&buffer, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%" PRIuPTR "x", i); @@ -271,7 +271,7 @@ static void test_user_data_works(void) { gpr_log(GPR_INFO, "test_user_data_works"); grpc_init(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; ud1 = static_cast<int*>(gpr_malloc(sizeof(int))); *ud1 = 1; ud2 = static_cast<int*>(gpr_malloc(sizeof(int))); @@ -322,7 +322,7 @@ static void test_mdelem_sizes_in_hpack(bool intern_key, bool intern_value) { gpr_log(GPR_INFO, "test_mdelem_size: intern_key=%d intern_value=%d", intern_key, intern_value); grpc_init(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; uint8_t binary_value[BUFFER_SIZE] = {0}; for (uint8_t i = 0; i < BUFFER_SIZE; i++) { @@ -346,7 +346,7 @@ static void test_copied_static_metadata(bool dup_key, bool dup_value) { gpr_log(GPR_INFO, "test_static_metadata: dup_key=%d dup_value=%d", dup_key, dup_value); grpc_init(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; for (size_t i = 0; i < GRPC_STATIC_MDELEM_COUNT; i++) { grpc_mdelem p = GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[i], diff --git a/test/core/transport/status_conversion_test.cc b/test/core/transport/status_conversion_test.cc index 2a192e04ef..1ed6ccfba6 100644 --- a/test/core/transport/status_conversion_test.cc +++ b/test/core/transport/status_conversion_test.cc @@ -24,7 +24,7 @@ GPR_ASSERT(grpc_status_to_http2_error(a) == (b)) #define HTTP2_ERROR_TO_GRPC_STATUS(a, deadline, b) \ do { \ - grpc_core::ExecCtx _local_exec_ctx; \ + grpc_core::ExecCtx exec_ctx; \ GPR_ASSERT(grpc_http2_error_to_grpc_status(a, deadline) == (b)); \ \ } while (0) diff --git a/test/core/util/port_server_client.cc b/test/core/util/port_server_client.cc index 705286c6d4..7e76c8063f 100644 --- a/test/core/util/port_server_client.cc +++ b/test/core/util/port_server_client.cc @@ -62,7 +62,7 @@ void grpc_free_port_using_server(int port) { grpc_httpcli_response rsp; freereq pr; char* path; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_closure* shutdown_closure; grpc_init(); @@ -198,7 +198,7 @@ int grpc_pick_port_using_server(void) { grpc_init(); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; memset(&pr, 0, sizeof(pr)); memset(&req, 0, sizeof(req)); grpc_pollset* pollset = (grpc_pollset*)gpr_zalloc(grpc_pollset_size()); diff --git a/test/core/util/test_tcp_server.cc b/test/core/util/test_tcp_server.cc index b94297adda..5f6af4e707 100644 --- a/test/core/util/test_tcp_server.cc +++ b/test/core/util/test_tcp_server.cc @@ -55,7 +55,7 @@ void test_tcp_server_start(test_tcp_server* server, int port) { grpc_resolved_address resolved_addr; struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; int port_added; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; addr->sin_family = AF_INET; addr->sin_port = htons((uint16_t)port); @@ -76,7 +76,7 @@ void test_tcp_server_start(test_tcp_server* server, int port) { void test_tcp_server_poll(test_tcp_server* server, int seconds) { grpc_pollset_worker* worker = nullptr; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_millis deadline = grpc_timespec_to_millis_round_up( grpc_timeout_seconds_to_deadline(seconds)); gpr_mu_lock(server->mu); @@ -91,7 +91,7 @@ static void finish_pollset(void* arg, grpc_error* error) { } void test_tcp_server_destroy(test_tcp_server* server) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_timespec shutdown_deadline; grpc_closure do_nothing_cb; grpc_tcp_server_unref(server->tcp_server); diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index f2f3cc3425..e6e6e71f42 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -112,7 +112,7 @@ class ClientLbEnd2endTest : public ::testing::Test { } void SetNextResolution(const std::vector<int>& ports) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_lb_addresses* addresses = grpc_lb_addresses_create(ports.size(), nullptr); for (size_t i = 0; i < ports.size(); ++i) { diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index c5c53b8b8a..48cdd433b2 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -451,7 +451,7 @@ class GrpclbEnd2endTest : public ::testing::Test { }; void SetNextResolution(const std::vector<AddressData>& address_data) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_lb_addresses* addresses = grpc_lb_addresses_create(address_data.size(), nullptr); for (size_t i = 0; i < address_data.size(); ++i) { diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 792c82639c..fd455c4c9a 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -562,7 +562,7 @@ static void perform_request(client_fixture* cf) { #define BALANCERS_NAME "lb.name" static void setup_client(const server_fixture* lb_server, const server_fixture* backends, client_fixture* cf) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; char* expected_target_names = nullptr; const char* backends_name = lb_server->servers_hostport; diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index b17f79613a..5c2c38c27d 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -521,7 +521,7 @@ static void BM_IsolatedFilter(benchmark::State& state) { label << " #has_dummy_filter"; } - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; size_t channel_size = grpc_channel_stack_size( filters.size() == 0 ? nullptr : &filters[0], filters.size()); grpc_channel_stack* channel_stack = @@ -692,7 +692,7 @@ class IsolatedCallFixture : public TrackCounters { builder, &isolated_call_filter::isolated_call_filter, nullptr, nullptr)); { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; channel_ = grpc_channel_create_with_builder(builder, GRPC_CLIENT_CHANNEL); } cq_ = grpc_completion_queue_create_for_next(nullptr); diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 6b6b441d93..4b7310389c 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -50,7 +50,7 @@ static grpc_slice MakeSlice(std::vector<uint8_t> bytes) { static void BM_HpackEncoderInitDestroy(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hpack_compressor c; while (state.KeepRunning()) { grpc_chttp2_hpack_compressor_init(&c); @@ -64,7 +64,7 @@ BENCHMARK(BM_HpackEncoderInitDestroy); static void BM_HpackEncoderEncodeDeadline(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_millis saved_now = grpc_core::ExecCtx::Get()->Now(); grpc_metadata_batch b; @@ -108,7 +108,7 @@ BENCHMARK(BM_HpackEncoderEncodeDeadline); template <class Fixture> static void BM_HpackEncoderEncodeHeader(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; static bool logged_representative_output = false; grpc_metadata_batch b; @@ -425,7 +425,7 @@ BENCHMARK_TEMPLATE(BM_HpackEncoderEncodeHeader, static void BM_HpackParserInitDestroy(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_chttp2_hpack_parser p; while (state.KeepRunning()) { grpc_chttp2_hpack_parser_init(&p); @@ -444,7 +444,7 @@ static void UnrefHeader(void* user_data, grpc_mdelem md) { template <class Fixture, void (*OnHeader)(void*, grpc_mdelem)> static void BM_HpackParserParseHeader(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; std::vector<grpc_slice> init_slices = Fixture::GetInitSlices(); std::vector<grpc_slice> benchmark_slices = Fixture::GetBenchmarkSlices(); grpc_chttp2_hpack_parser p; diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc index 044417830f..43bbbad880 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc @@ -257,7 +257,7 @@ class Stream { static void BM_StreamCreateDestroy(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); Stream s(&f); grpc_transport_stream_op_batch op; @@ -303,7 +303,7 @@ class RepresentativeClientInitialMetadata { template <class Metadata> static void BM_StreamCreateSendInitialMetadataDestroy(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); Stream s(&f); grpc_transport_stream_op_batch op; @@ -354,7 +354,7 @@ BENCHMARK_TEMPLATE(BM_StreamCreateSendInitialMetadataDestroy, static void BM_TransportEmptyOp(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); Stream s(&f); s.Init(state); @@ -387,7 +387,7 @@ std::vector<std::unique_ptr<gpr_event>> done_events; static void BM_TransportStreamSend(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); auto s = std::unique_ptr<Stream>(new Stream(&f)); s->Init(state); @@ -517,7 +517,7 @@ static grpc_slice CreateIncomingDataSlice(size_t length, size_t frame_size) { static void BM_TransportStreamRecv(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Fixture f(grpc::ChannelArguments(), true); Stream s(&f); s.Init(state); diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc index f28093ae17..4d5a82c3f6 100644 --- a/test/cpp/microbenchmarks/bm_closure.cc +++ b/test/cpp/microbenchmarks/bm_closure.cc @@ -34,7 +34,7 @@ auto& force_library_initialization = Library::get(); static void BM_NoOpExecCtx(benchmark::State& state) { TrackCounters track_counters; while (state.KeepRunning()) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; } track_counters.Finish(state); } @@ -42,7 +42,7 @@ BENCHMARK(BM_NoOpExecCtx); static void BM_WellFlushed(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { grpc_core::ExecCtx::Get()->Flush(); } @@ -68,7 +68,7 @@ static void BM_ClosureInitAgainstCombiner(benchmark::State& state) { TrackCounters track_counters; grpc_combiner* combiner = grpc_combiner_create(); grpc_closure c; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { benchmark::DoNotOptimize(GRPC_CLOSURE_INIT( &c, DoNothing, nullptr, grpc_combiner_scheduler(combiner))); @@ -83,7 +83,7 @@ static void BM_ClosureRunOnExecCtx(benchmark::State& state) { TrackCounters track_counters; grpc_closure c; GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_schedule_on_exec_ctx); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_RUN(&c, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); @@ -95,7 +95,7 @@ BENCHMARK(BM_ClosureRunOnExecCtx); static void BM_ClosureCreateAndRun(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_RUN( GRPC_CLOSURE_CREATE(DoNothing, nullptr, grpc_schedule_on_exec_ctx), @@ -108,7 +108,7 @@ BENCHMARK(BM_ClosureCreateAndRun); static void BM_ClosureInitAndRun(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_closure c; while (state.KeepRunning()) { GRPC_CLOSURE_RUN( @@ -124,7 +124,7 @@ static void BM_ClosureSchedOnExecCtx(benchmark::State& state) { TrackCounters track_counters; grpc_closure c; GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_schedule_on_exec_ctx); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); @@ -140,7 +140,7 @@ static void BM_ClosureSched2OnExecCtx(benchmark::State& state) { grpc_closure c2; GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_schedule_on_exec_ctx); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -159,7 +159,7 @@ static void BM_ClosureSched3OnExecCtx(benchmark::State& state) { GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&c3, DoNothing, nullptr, grpc_schedule_on_exec_ctx); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -176,7 +176,7 @@ static void BM_AcquireMutex(benchmark::State& state) { // for comparison with the combiner stuff below gpr_mu mu; gpr_mu_init(&mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { gpr_mu_lock(&mu); DoNothing(nullptr, GRPC_ERROR_NONE); @@ -192,7 +192,7 @@ static void BM_TryAcquireMutex(benchmark::State& state) { // for comparison with the combiner stuff below gpr_mu mu; gpr_mu_init(&mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { if (gpr_mu_trylock(&mu)) { DoNothing(nullptr, GRPC_ERROR_NONE); @@ -210,7 +210,7 @@ static void BM_AcquireSpinlock(benchmark::State& state) { TrackCounters track_counters; // for comparison with the combiner stuff below gpr_spinlock mu = GPR_SPINLOCK_INITIALIZER; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { gpr_spinlock_lock(&mu); DoNothing(nullptr, GRPC_ERROR_NONE); @@ -225,7 +225,7 @@ static void BM_TryAcquireSpinlock(benchmark::State& state) { TrackCounters track_counters; // for comparison with the combiner stuff below gpr_spinlock mu = GPR_SPINLOCK_INITIALIZER; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { if (gpr_spinlock_trylock(&mu)) { DoNothing(nullptr, GRPC_ERROR_NONE); @@ -244,7 +244,7 @@ static void BM_ClosureSchedOnCombiner(benchmark::State& state) { grpc_combiner* combiner = grpc_combiner_create(); grpc_closure c; GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); @@ -262,7 +262,7 @@ static void BM_ClosureSched2OnCombiner(benchmark::State& state) { grpc_closure c2; GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -283,7 +283,7 @@ static void BM_ClosureSched3OnCombiner(benchmark::State& state) { GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); GRPC_CLOSURE_INIT(&c3, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -306,7 +306,7 @@ static void BM_ClosureSched2OnTwoCombiners(benchmark::State& state) { grpc_combiner_scheduler(combiner1)); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner2)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -335,7 +335,7 @@ static void BM_ClosureSched4OnTwoCombiners(benchmark::State& state) { grpc_combiner_scheduler(combiner1)); GRPC_CLOSURE_INIT(&c4, DoNothing, nullptr, grpc_combiner_scheduler(combiner2)); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); @@ -381,7 +381,7 @@ class Rescheduler { static void BM_ClosureReschedOnExecCtx(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; Rescheduler r(state, grpc_schedule_on_exec_ctx); r.ScheduleFirst(); @@ -391,7 +391,7 @@ BENCHMARK(BM_ClosureReschedOnExecCtx); static void BM_ClosureReschedOnCombiner(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_combiner* combiner = grpc_combiner_create(); Rescheduler r(state, grpc_combiner_scheduler(combiner)); r.ScheduleFirst(); @@ -404,7 +404,7 @@ BENCHMARK(BM_ClosureReschedOnCombiner); static void BM_ClosureReschedOnCombinerFinally(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_combiner* combiner = grpc_combiner_create(); Rescheduler r(state, grpc_combiner_finally_scheduler(combiner)); r.ScheduleFirstAgainstDifferentScheduler(grpc_combiner_scheduler(combiner)); diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 16f451d98f..97242598f1 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -81,7 +81,7 @@ static void BM_Pass1Cpp(benchmark::State& state) { while (state.KeepRunning()) { grpc_cq_completion completion; DummyTag dummy_tag; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_cq_begin_op(c_cq, &dummy_tag)); grpc_cq_end_op(c_cq, &dummy_tag, GRPC_ERROR_NONE, DoneWithCompletionOnStack, nullptr, &completion); @@ -101,7 +101,7 @@ static void BM_Pass1Core(benchmark::State& state) { gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); while (state.KeepRunning()) { grpc_cq_completion completion; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_cq_begin_op(cq, nullptr)); grpc_cq_end_op(cq, nullptr, GRPC_ERROR_NONE, DoneWithCompletionOnStack, nullptr, &completion); @@ -120,7 +120,7 @@ static void BM_Pluck1Core(benchmark::State& state) { gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); while (state.KeepRunning()) { grpc_cq_completion completion; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_cq_begin_op(cq, nullptr)); grpc_cq_end_op(cq, nullptr, GRPC_ERROR_NONE, DoneWithCompletionOnStack, nullptr, &completion); diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc index fd888a5a40..d12f475a49 100644 --- a/test/cpp/microbenchmarks/bm_error.cc +++ b/test/cpp/microbenchmarks/bm_error.cc @@ -246,7 +246,7 @@ template <class Fixture> static void BM_ErrorGetStatus(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { grpc_status_code status; grpc_slice slice; @@ -261,7 +261,7 @@ template <class Fixture> static void BM_ErrorGetStatusCode(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { grpc_status_code status; grpc_error_get_status(fixture.error(), fixture.deadline(), &status, nullptr, @@ -275,7 +275,7 @@ template <class Fixture> static void BM_ErrorHttpError(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { grpc_http2_error_code error; grpc_error_get_status(fixture.error(), fixture.deadline(), nullptr, nullptr, diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc index 23ca750307..0212cdddf8 100644 --- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc +++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc @@ -177,7 +177,7 @@ class TrickledCHTTP2 : public EndpointPairFixture { } void Step(bool update_stats) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; inc_time(); size_t client_backlog = grpc_trickle_endpoint_trickle(endpoint_pair_.client); diff --git a/test/cpp/microbenchmarks/bm_metadata.cc b/test/cpp/microbenchmarks/bm_metadata.cc index 62c9a2e335..f1e7890fc0 100644 --- a/test/cpp/microbenchmarks/bm_metadata.cc +++ b/test/cpp/microbenchmarks/bm_metadata.cc @@ -90,7 +90,7 @@ static void BM_MetadataFromNonInternedSlices(benchmark::State& state) { TrackCounters track_counters; gpr_slice k = grpc_slice_from_static_string("key"); gpr_slice v = grpc_slice_from_static_string("value"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -103,7 +103,7 @@ static void BM_MetadataFromInternedSlices(benchmark::State& state) { TrackCounters track_counters; gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_intern(grpc_slice_from_static_string("value")); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -119,7 +119,7 @@ static void BM_MetadataFromInternedSlicesAlreadyInIndex( TrackCounters track_counters; gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_intern(grpc_slice_from_static_string("value")); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem seed = grpc_mdelem_create(k, v, nullptr); while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); @@ -136,7 +136,7 @@ static void BM_MetadataFromInternedKey(benchmark::State& state) { TrackCounters track_counters; gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_from_static_string("value"); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -152,7 +152,7 @@ static void BM_MetadataFromNonInternedSlicesWithBackingStore( gpr_slice k = grpc_slice_from_static_string("key"); gpr_slice v = grpc_slice_from_static_string("value"); char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create( k, v, reinterpret_cast<grpc_mdelem_data*>(backing_store))); @@ -168,7 +168,7 @@ static void BM_MetadataFromInternedSlicesWithBackingStore( gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_intern(grpc_slice_from_static_string("value")); char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create( k, v, reinterpret_cast<grpc_mdelem_data*>(backing_store))); @@ -186,7 +186,7 @@ static void BM_MetadataFromInternedKeyWithBackingStore( gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_from_static_string("value"); char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create( k, v, reinterpret_cast<grpc_mdelem_data*>(backing_store))); @@ -201,7 +201,7 @@ static void BM_MetadataFromStaticMetadataStrings(benchmark::State& state) { TrackCounters track_counters; gpr_slice k = GRPC_MDSTR_STATUS; gpr_slice v = GRPC_MDSTR_200; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -216,7 +216,7 @@ static void BM_MetadataFromStaticMetadataStringsNotIndexed( TrackCounters track_counters; gpr_slice k = GRPC_MDSTR_STATUS; gpr_slice v = GRPC_MDSTR_GZIP; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; while (state.KeepRunning()) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -229,7 +229,7 @@ BENCHMARK(BM_MetadataFromStaticMetadataStringsNotIndexed); static void BM_MetadataRefUnrefExternal(benchmark::State& state) { TrackCounters track_counters; char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem el = grpc_mdelem_create( grpc_slice_from_static_string("a"), grpc_slice_from_static_string("b"), reinterpret_cast<grpc_mdelem_data*>(backing_store)); @@ -245,7 +245,7 @@ BENCHMARK(BM_MetadataRefUnrefExternal); static void BM_MetadataRefUnrefInterned(benchmark::State& state) { TrackCounters track_counters; char backing_store[sizeof(grpc_mdelem_data)]; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_slice k = grpc_slice_intern(grpc_slice_from_static_string("key")); gpr_slice v = grpc_slice_intern(grpc_slice_from_static_string("value")); grpc_mdelem el = grpc_mdelem_create( @@ -263,7 +263,7 @@ BENCHMARK(BM_MetadataRefUnrefInterned); static void BM_MetadataRefUnrefAllocated(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem el = grpc_mdelem_create(grpc_slice_from_static_string("a"), grpc_slice_from_static_string("b"), nullptr); @@ -278,7 +278,7 @@ BENCHMARK(BM_MetadataRefUnrefAllocated); static void BM_MetadataRefUnrefStatic(benchmark::State& state) { TrackCounters track_counters; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_mdelem el = grpc_mdelem_create(GRPC_MDSTR_STATUS, GRPC_MDSTR_200, nullptr); while (state.KeepRunning()) { diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc index 9a859b51ea..d9d5164cce 100644 --- a/test/cpp/microbenchmarks/bm_pollset.cc +++ b/test/cpp/microbenchmarks/bm_pollset.cc @@ -50,7 +50,7 @@ static void BM_CreateDestroyPollset(benchmark::State& state) { size_t ps_sz = grpc_pollset_size(); grpc_pollset* ps = static_cast<grpc_pollset*>(gpr_malloc(ps_sz)); gpr_mu* mu; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_closure shutdown_ps_closure; GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps, grpc_schedule_on_exec_ctx); @@ -114,7 +114,7 @@ static void BM_PollEmptyPollset(benchmark::State& state) { grpc_pollset* ps = static_cast<grpc_pollset*>(gpr_zalloc(ps_sz)); gpr_mu* mu; grpc_pollset_init(ps, &mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_mu_lock(mu); while (state.KeepRunning()) { GRPC_ERROR_UNREF(grpc_pollset_work(ps, nullptr, 0)); @@ -136,7 +136,7 @@ static void BM_PollAddFd(benchmark::State& state) { grpc_pollset* ps = static_cast<grpc_pollset*>(gpr_zalloc(ps_sz)); gpr_mu* mu; grpc_pollset_init(ps, &mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_wakeup_fd wakeup_fd; GPR_ASSERT( GRPC_LOG_IF_ERROR("wakeup_fd_init", grpc_wakeup_fd_init(&wakeup_fd))); @@ -218,7 +218,7 @@ static void BM_SingleThreadPollOneFd(benchmark::State& state) { grpc_pollset* ps = static_cast<grpc_pollset*>(gpr_zalloc(ps_sz)); gpr_mu* mu; grpc_pollset_init(ps, &mu); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; grpc_wakeup_fd wakeup_fd; GRPC_ERROR_UNREF(grpc_wakeup_fd_init(&wakeup_fd)); grpc_fd* wakeup = grpc_fd_create(wakeup_fd.read_fd, "wakeup_read"); diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h index 1520282009..ab0a696e3d 100644 --- a/test/cpp/microbenchmarks/fullstack_fixtures.h +++ b/test/cpp/microbenchmarks/fullstack_fixtures.h @@ -166,7 +166,7 @@ class EndpointPairFixture : public BaseFixture { fixture_configuration.ApplyCommonServerBuilderConfig(&b); server_ = b.BuildAndStart(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; /* add server endpoint to server_ * */ diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index 3bd1df9429..3481d9d1aa 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -196,7 +196,7 @@ void PollPollsetUntilRequestDone(ArgsStruct* args) { time_left.tv_sec, time_left.tv_nsec); GPR_ASSERT(gpr_time_cmp(time_left, gpr_time_0(GPR_TIMESPAN)) >= 0); grpc_pollset_worker* worker = nullptr; - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; gpr_mu_lock(args->mu); GRPC_LOG_IF_ERROR("pollset_work", grpc_pollset_work(args->pollset, &worker, @@ -275,7 +275,7 @@ void CheckResolverResultLocked(void* argsp, grpc_error* err) { } TEST(ResolverComponentTest, TestResolvesRelevantRecords) { - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; ArgsStruct args; ArgsInit(&args); args.expected_addrs = ParseExpectedAddrs(FLAGS_expected_addrs); diff --git a/test/cpp/performance/writes_per_rpc_test.cc b/test/cpp/performance/writes_per_rpc_test.cc index c5d29469b2..1711eef303 100644 --- a/test/cpp/performance/writes_per_rpc_test.cc +++ b/test/cpp/performance/writes_per_rpc_test.cc @@ -82,7 +82,7 @@ class EndpointPairFixture { ApplyCommonServerBuilderConfig(&b); server_ = b.BuildAndStart(); - grpc_core::ExecCtx _local_exec_ctx; + grpc_core::ExecCtx exec_ctx; /* add server endpoint to server_ */ { |