grpc 1.25.0 → 1.26.0.pre1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (278) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +782 -291
  3. data/include/grpc/impl/codegen/grpc_types.h +4 -0
  4. data/include/grpc/impl/codegen/port_platform.h +7 -0
  5. data/include/grpc/support/alloc.h +0 -16
  6. data/src/core/ext/filters/client_channel/backend_metric.cc +2 -2
  7. data/src/core/ext/filters/client_channel/backup_poller.cc +1 -1
  8. data/src/core/ext/filters/client_channel/channel_connectivity.cc +2 -2
  9. data/src/core/ext/filters/client_channel/client_channel.cc +95 -88
  10. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +7 -7
  11. data/src/core/ext/filters/client_channel/client_channel_channelz.h +4 -2
  12. data/src/core/ext/filters/client_channel/client_channel_factory.cc +1 -1
  13. data/src/core/ext/filters/client_channel/client_channel_plugin.cc +3 -3
  14. data/src/core/ext/filters/client_channel/connector.h +40 -45
  15. data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +10 -10
  16. data/src/core/ext/filters/client_channel/health/health_check_client.cc +16 -13
  17. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +66 -37
  18. data/src/core/ext/filters/client_channel/http_proxy.cc +107 -116
  19. data/src/core/ext/filters/client_channel/http_proxy.h +5 -1
  20. data/src/core/ext/filters/client_channel/lb_policy.cc +3 -3
  21. data/src/core/ext/filters/client_channel/lb_policy.h +9 -5
  22. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +10 -8
  23. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +18 -19
  24. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +4 -3
  25. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +4 -4
  26. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +1 -1
  27. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +3 -3
  28. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +3 -3
  29. data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +6 -9
  30. data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +368 -0
  31. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +157 -77
  32. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +5 -5
  33. data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
  34. data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +8 -8
  35. data/src/core/ext/filters/client_channel/proxy_mapper.h +14 -34
  36. data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +46 -79
  37. data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +23 -17
  38. data/src/core/ext/filters/client_channel/resolver.cc +2 -1
  39. data/src/core/ext/filters/client_channel/resolver.h +2 -2
  40. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +1 -1
  41. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +4 -4
  42. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +1 -1
  43. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +13 -10
  44. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +3 -2
  45. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +9 -8
  46. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +17 -16
  47. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +2 -2
  48. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +4 -4
  49. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +9 -9
  50. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +5 -3
  51. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +1 -1
  52. data/src/core/ext/filters/client_channel/resolver_factory.h +3 -3
  53. data/src/core/ext/filters/client_channel/resolver_registry.cc +14 -12
  54. data/src/core/ext/filters/client_channel/resolver_registry.h +6 -4
  55. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +6 -6
  56. data/src/core/ext/filters/client_channel/resolver_result_parsing.h +6 -6
  57. data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +5 -5
  58. data/src/core/ext/filters/client_channel/resolving_lb_policy.h +3 -3
  59. data/src/core/ext/filters/client_channel/service_config.cc +15 -14
  60. data/src/core/ext/filters/client_channel/service_config.h +14 -19
  61. data/src/core/ext/filters/client_channel/subchannel.cc +38 -36
  62. data/src/core/ext/filters/client_channel/subchannel.h +11 -12
  63. data/src/core/ext/filters/client_channel/subchannel_interface.h +1 -1
  64. data/src/core/ext/filters/client_channel/xds/xds_api.cc +19 -9
  65. data/src/core/ext/filters/client_channel/xds/xds_api.h +19 -9
  66. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +3 -3
  67. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +6 -5
  68. data/src/core/ext/filters/client_channel/xds/xds_client.cc +58 -31
  69. data/src/core/ext/filters/client_channel/xds/xds_client.h +20 -15
  70. data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +5 -3
  71. data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +18 -15
  72. data/src/core/ext/filters/client_idle/client_idle_filter.cc +10 -10
  73. data/src/core/ext/filters/deadline/deadline_filter.cc +15 -13
  74. data/src/core/ext/filters/http/client/http_client_filter.cc +12 -12
  75. data/src/core/ext/filters/http/client_authority_filter.cc +3 -3
  76. data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +13 -7
  77. data/src/core/ext/filters/http/server/http_server_filter.cc +14 -13
  78. data/src/core/ext/filters/max_age/max_age_filter.cc +16 -14
  79. data/src/core/ext/filters/message_size/message_size_filter.cc +10 -8
  80. data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
  81. data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +9 -8
  82. data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +141 -174
  83. data/src/core/ext/transport/chttp2/client/chttp2_connector.h +31 -1
  84. data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +7 -6
  85. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +14 -12
  86. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +8 -5
  87. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +46 -38
  88. data/src/core/ext/transport/chttp2/transport/context_list.cc +2 -2
  89. data/src/core/ext/transport/chttp2/transport/flow_control.h +0 -5
  90. data/src/core/ext/transport/chttp2/transport/frame_data.cc +6 -7
  91. data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -2
  92. data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -1
  93. data/src/core/ext/transport/chttp2/transport/frame_settings.cc +4 -3
  94. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +5 -5
  95. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +11 -8
  96. data/src/core/ext/transport/chttp2/transport/internal.h +3 -3
  97. data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -4
  98. data/src/core/ext/transport/chttp2/transport/writing.cc +3 -2
  99. data/src/core/ext/transport/inproc/inproc_transport.cc +65 -41
  100. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -1
  101. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +141 -70
  102. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +352 -118
  103. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -1
  104. data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -1
  105. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +8 -4
  106. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +65 -0
  107. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -1
  108. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +16 -2
  109. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +36 -0
  110. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +12 -5
  111. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +34 -0
  112. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +1 -2
  113. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +13 -12
  114. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +28 -24
  115. data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -1
  116. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +5 -4
  117. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +13 -0
  118. data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -1
  119. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +23 -23
  120. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +48 -44
  121. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -1
  122. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -1
  123. data/src/core/ext/upb-generated/envoy/type/http.upb.c +16 -0
  124. data/src/core/ext/upb-generated/envoy/type/http.upb.h +36 -0
  125. data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -1
  126. data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -1
  127. data/src/core/lib/avl/avl.cc +1 -1
  128. data/src/core/lib/channel/channel_stack.cc +1 -1
  129. data/src/core/lib/channel/channel_stack.h +16 -4
  130. data/src/core/lib/channel/channel_trace.cc +4 -4
  131. data/src/core/lib/channel/channelz.cc +46 -46
  132. data/src/core/lib/channel/channelz.h +37 -35
  133. data/src/core/lib/channel/channelz_registry.cc +2 -2
  134. data/src/core/lib/channel/channelz_registry.h +1 -1
  135. data/src/core/lib/channel/connected_channel.cc +3 -2
  136. data/src/core/lib/channel/handshaker.cc +1 -1
  137. data/src/core/lib/channel/handshaker_registry.cc +5 -5
  138. data/src/core/lib/channel/handshaker_registry.h +3 -3
  139. data/src/core/lib/compression/message_compress.cc +3 -2
  140. data/src/core/lib/compression/stream_compression_identity.cc +5 -7
  141. data/src/core/lib/gpr/alloc.cc +4 -29
  142. data/src/core/lib/gpr/cpu_linux.cc +1 -1
  143. data/src/core/lib/gprpp/fork.cc +4 -4
  144. data/src/core/lib/gprpp/global_config_env.cc +7 -7
  145. data/src/core/lib/gprpp/global_config_env.h +2 -2
  146. data/src/core/lib/gprpp/host_port.cc +8 -8
  147. data/src/core/lib/gprpp/host_port.h +3 -3
  148. data/src/core/lib/gprpp/inlined_vector.h +13 -0
  149. data/src/core/lib/gprpp/map.h +2 -9
  150. data/src/core/lib/gprpp/memory.h +12 -98
  151. data/src/core/lib/gprpp/orphanable.h +3 -3
  152. data/src/core/lib/gprpp/ref_counted.h +3 -3
  153. data/src/core/lib/gprpp/ref_counted_ptr.h +1 -1
  154. data/src/core/lib/gprpp/string_view.h +45 -23
  155. data/src/core/lib/gprpp/thd.h +1 -1
  156. data/src/core/lib/gprpp/thd_posix.cc +6 -5
  157. data/src/core/lib/gprpp/thd_windows.cc +3 -3
  158. data/src/core/lib/http/httpcli.cc +1 -1
  159. data/src/core/lib/http/httpcli_security_connector.cc +3 -3
  160. data/src/core/lib/iomgr/buffer_list.cc +10 -5
  161. data/src/core/lib/iomgr/call_combiner.cc +7 -6
  162. data/src/core/lib/iomgr/call_combiner.h +4 -3
  163. data/src/core/lib/iomgr/cfstream_handle.cc +2 -2
  164. data/src/core/lib/iomgr/closure.h +33 -135
  165. data/src/core/lib/iomgr/combiner.cc +10 -17
  166. data/src/core/lib/iomgr/combiner.h +0 -2
  167. data/src/core/lib/iomgr/endpoint_cfstream.cc +2 -2
  168. data/src/core/lib/iomgr/endpoint_pair_posix.cc +1 -1
  169. data/src/core/lib/iomgr/ev_epoll1_linux.cc +3 -2
  170. data/src/core/lib/iomgr/ev_epollex_linux.cc +23 -13
  171. data/src/core/lib/iomgr/ev_poll_posix.cc +30 -17
  172. data/src/core/lib/iomgr/exec_ctx.cc +52 -5
  173. data/src/core/lib/iomgr/exec_ctx.h +6 -2
  174. data/src/core/lib/iomgr/executor.cc +16 -37
  175. data/src/core/lib/iomgr/executor.h +4 -7
  176. data/src/core/lib/iomgr/executor/threadpool.cc +4 -4
  177. data/src/core/lib/iomgr/iomgr_custom.cc +1 -1
  178. data/src/core/lib/iomgr/lockfree_event.cc +9 -8
  179. data/src/core/lib/iomgr/logical_thread.cc +103 -0
  180. data/src/core/lib/iomgr/logical_thread.h +52 -0
  181. data/src/core/lib/iomgr/pollset_custom.cc +5 -5
  182. data/src/core/lib/iomgr/pollset_set_custom.cc +9 -9
  183. data/src/core/lib/iomgr/pollset_windows.cc +16 -2
  184. data/src/core/lib/iomgr/port.h +3 -0
  185. data/src/core/lib/iomgr/resolve_address_custom.cc +4 -4
  186. data/src/core/lib/iomgr/resolve_address_posix.cc +8 -9
  187. data/src/core/lib/iomgr/resolve_address_windows.cc +4 -6
  188. data/src/core/lib/iomgr/resource_quota.cc +26 -21
  189. data/src/core/lib/iomgr/socket_utils_common_posix.cc +11 -0
  190. data/src/core/lib/iomgr/socket_windows.cc +2 -2
  191. data/src/core/lib/iomgr/tcp_client_cfstream.cc +2 -2
  192. data/src/core/lib/iomgr/tcp_client_custom.cc +2 -2
  193. data/src/core/lib/iomgr/tcp_client_posix.cc +5 -4
  194. data/src/core/lib/iomgr/tcp_client_windows.cc +2 -2
  195. data/src/core/lib/iomgr/tcp_custom.cc +10 -9
  196. data/src/core/lib/iomgr/tcp_posix.cc +19 -15
  197. data/src/core/lib/iomgr/tcp_server_custom.cc +3 -2
  198. data/src/core/lib/iomgr/tcp_server_posix.cc +5 -4
  199. data/src/core/lib/iomgr/tcp_server_windows.cc +5 -3
  200. data/src/core/lib/iomgr/tcp_windows.cc +16 -13
  201. data/src/core/lib/iomgr/timer_custom.cc +4 -3
  202. data/src/core/lib/iomgr/timer_generic.cc +11 -9
  203. data/src/core/lib/iomgr/udp_server.cc +16 -13
  204. data/src/core/lib/security/credentials/alts/alts_credentials.cc +8 -5
  205. data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +45 -57
  206. data/src/core/lib/security/credentials/composite/composite_credentials.cc +7 -6
  207. data/src/core/lib/security/credentials/credentials.cc +8 -8
  208. data/src/core/lib/security/credentials/credentials.h +5 -5
  209. data/src/core/lib/security/credentials/fake/fake_credentials.cc +5 -5
  210. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +1 -1
  211. data/src/core/lib/security/credentials/iam/iam_credentials.cc +4 -4
  212. data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +4 -4
  213. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +2 -2
  214. data/src/core/lib/security/credentials/local/local_credentials.cc +3 -3
  215. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +13 -11
  216. data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -5
  217. data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +4 -4
  218. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +5 -5
  219. data/src/core/lib/security/credentials/tls/spiffe_credentials.cc +2 -2
  220. data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +28 -22
  221. data/src/core/lib/security/security_connector/alts/alts_security_connector.h +5 -0
  222. data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +10 -10
  223. data/src/core/lib/security/security_connector/load_system_roots_linux.cc +2 -1
  224. data/src/core/lib/security/security_connector/local/local_security_connector.cc +8 -8
  225. data/src/core/lib/security/security_connector/security_connector.h +1 -1
  226. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +9 -9
  227. data/src/core/lib/security/security_connector/ssl_utils.cc +5 -4
  228. data/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc +14 -15
  229. data/src/core/lib/security/transport/client_auth_filter.cc +4 -3
  230. data/src/core/lib/security/transport/secure_endpoint.cc +9 -8
  231. data/src/core/lib/security/transport/security_handshaker.cc +67 -23
  232. data/src/core/lib/security/transport/server_auth_filter.cc +6 -5
  233. data/src/core/lib/security/transport/target_authority_table.h +1 -1
  234. data/src/core/lib/slice/b64.cc +3 -4
  235. data/src/core/lib/slice/b64.h +1 -2
  236. data/src/core/lib/slice/slice.cc +8 -13
  237. data/src/core/lib/surface/call.cc +19 -19
  238. data/src/core/lib/surface/call.h +6 -7
  239. data/src/core/lib/surface/call_log_batch.cc +1 -2
  240. data/src/core/lib/surface/channel.cc +17 -18
  241. data/src/core/lib/surface/channel.h +4 -19
  242. data/src/core/lib/surface/channel_ping.cc +1 -1
  243. data/src/core/lib/surface/completion_queue.cc +21 -22
  244. data/src/core/lib/surface/completion_queue_factory.cc +1 -1
  245. data/src/core/lib/surface/init.cc +1 -1
  246. data/src/core/lib/surface/init_secure.cc +2 -2
  247. data/src/core/lib/surface/lame_client.cc +10 -12
  248. data/src/core/lib/surface/server.cc +24 -18
  249. data/src/core/lib/surface/version.cc +2 -2
  250. data/src/core/lib/transport/byte_stream.cc +2 -2
  251. data/src/core/lib/transport/byte_stream.h +2 -1
  252. data/src/core/lib/transport/connectivity_state.cc +4 -4
  253. data/src/core/lib/transport/connectivity_state.h +2 -2
  254. data/src/core/lib/transport/metadata.cc +8 -10
  255. data/src/core/lib/transport/metadata.h +5 -8
  256. data/src/core/lib/transport/metadata_batch.cc +6 -0
  257. data/src/core/lib/transport/static_metadata.cc +2 -4
  258. data/src/core/lib/transport/status_metadata.cc +7 -0
  259. data/src/core/lib/transport/status_metadata.h +18 -0
  260. data/src/core/lib/transport/transport.cc +9 -7
  261. data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
  262. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +292 -43
  263. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +197 -46
  264. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +4 -2
  265. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +5 -0
  266. data/src/core/tsi/ssl/session_cache/ssl_session.h +1 -1
  267. data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
  268. data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +4 -4
  269. data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
  270. data/src/core/tsi/ssl_transport_security.cc +2 -1
  271. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +0 -4
  272. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +0 -6
  273. data/src/ruby/lib/grpc/version.rb +1 -1
  274. data/third_party/upb/upb/decode.c +1 -0
  275. metadata +34 -32
  276. data/src/core/ext/filters/client_channel/connector.cc +0 -41
  277. data/src/core/ext/filters/client_channel/proxy_mapper.cc +0 -48
  278. data/src/core/lib/gprpp/set.h +0 -33
@@ -53,13 +53,11 @@ static void combiner_finally_exec(grpc_core::Combiner* lock,
53
53
  static void offload(void* arg, grpc_error* error);
54
54
 
55
55
  grpc_core::Combiner* grpc_combiner_create(void) {
56
- grpc_core::Combiner* lock = grpc_core::New<grpc_core::Combiner>();
56
+ grpc_core::Combiner* lock = new grpc_core::Combiner();
57
57
  gpr_ref_init(&lock->refs, 1);
58
58
  gpr_atm_no_barrier_store(&lock->state, STATE_UNORPHANED);
59
59
  grpc_closure_list_init(&lock->final_list);
60
- GRPC_CLOSURE_INIT(
61
- &lock->offload, offload, lock,
62
- grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT));
60
+ GRPC_CLOSURE_INIT(&lock->offload, offload, lock, nullptr);
63
61
  GRPC_COMBINER_TRACE(gpr_log(GPR_INFO, "C:%p create", lock));
64
62
  return lock;
65
63
  }
@@ -67,7 +65,7 @@ grpc_core::Combiner* grpc_combiner_create(void) {
67
65
  static void really_destroy(grpc_core::Combiner* lock) {
68
66
  GRPC_COMBINER_TRACE(gpr_log(GPR_INFO, "C:%p really_destroy", lock));
69
67
  GPR_ASSERT(gpr_atm_no_barrier_load(&lock->state) == 0);
70
- grpc_core::Delete(lock);
68
+ delete lock;
71
69
  }
72
70
 
73
71
  static void start_destroy(grpc_core::Combiner* lock) {
@@ -177,7 +175,7 @@ static void queue_offload(grpc_core::Combiner* lock) {
177
175
  GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED();
178
176
  move_next();
179
177
  GRPC_COMBINER_TRACE(gpr_log(GPR_INFO, "C:%p queue_offload", lock));
180
- GRPC_CLOSURE_SCHED(&lock->offload, GRPC_ERROR_NONE);
178
+ grpc_core::Executor::Run(&lock->offload, GRPC_ERROR_NONE);
181
179
  }
182
180
 
183
181
  bool grpc_combiner_continue_exec_ctx() {
@@ -310,9 +308,9 @@ static void combiner_finally_exec(grpc_core::Combiner* lock,
310
308
  grpc_core::ExecCtx::Get()->combiner_data()->active_combiner));
311
309
  if (grpc_core::ExecCtx::Get()->combiner_data()->active_combiner != lock) {
312
310
  GPR_TIMER_MARK("slowpath", 0);
313
- // Reusing scheduler to store the combiner so that it can be accessed in
314
- // enqueue_finally
315
- closure->scheduler = reinterpret_cast<grpc_closure_scheduler*>(lock);
311
+ // Using error_data.scratch to store the combiner so that it can be accessed
312
+ // in enqueue_finally.
313
+ closure->error_data.scratch = reinterpret_cast<uintptr_t>(lock);
316
314
  lock->Run(GRPC_CLOSURE_CREATE(enqueue_finally, closure, nullptr), error);
317
315
  return;
318
316
  }
@@ -325,22 +323,17 @@ static void combiner_finally_exec(grpc_core::Combiner* lock,
325
323
 
326
324
  static void enqueue_finally(void* closure, grpc_error* error) {
327
325
  grpc_closure* cl = static_cast<grpc_closure*>(closure);
328
- combiner_finally_exec(reinterpret_cast<grpc_core::Combiner*>(cl->scheduler),
329
- cl, GRPC_ERROR_REF(error));
326
+ combiner_finally_exec(
327
+ reinterpret_cast<grpc_core::Combiner*>(cl->error_data.scratch), cl,
328
+ GRPC_ERROR_REF(error));
330
329
  }
331
330
 
332
331
  namespace grpc_core {
333
332
  void Combiner::Run(grpc_closure* closure, grpc_error* error) {
334
- GPR_ASSERT(closure->scheduler == nullptr ||
335
- closure->scheduler ==
336
- reinterpret_cast<grpc_closure_scheduler*>(this));
337
333
  combiner_exec(this, closure, error);
338
334
  }
339
335
 
340
336
  void Combiner::FinallyRun(grpc_closure* closure, grpc_error* error) {
341
- GPR_ASSERT(closure->scheduler == nullptr ||
342
- closure->scheduler ==
343
- reinterpret_cast<grpc_closure_scheduler*>(this));
344
337
  combiner_finally_exec(this, closure, error);
345
338
  }
346
339
  } // namespace grpc_core
@@ -36,8 +36,6 @@ class Combiner {
36
36
  // TODO(yashkt) : Remove this method
37
37
  void FinallyRun(grpc_closure* closure, grpc_error* error);
38
38
  Combiner* next_combiner_on_this_exec_ctx = nullptr;
39
- grpc_closure_scheduler scheduler;
40
- grpc_closure_scheduler finally_scheduler;
41
39
  MultiProducerSingleConsumerQueue queue;
42
40
  // either:
43
41
  // a pointer to the initiating exec ctx if that is the only exec_ctx that has
@@ -132,7 +132,7 @@ static void CallReadCb(CFStreamEndpoint* ep, grpc_error* error) {
132
132
  grpc_closure* cb = ep->read_cb;
133
133
  ep->read_cb = nullptr;
134
134
  ep->read_slices = nullptr;
135
- GRPC_CLOSURE_SCHED(cb, error);
135
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, cb, error);
136
136
  }
137
137
 
138
138
  static void CallWriteCb(CFStreamEndpoint* ep, grpc_error* error) {
@@ -145,7 +145,7 @@ static void CallWriteCb(CFStreamEndpoint* ep, grpc_error* error) {
145
145
  grpc_closure* cb = ep->write_cb;
146
146
  ep->write_cb = nullptr;
147
147
  ep->write_slices = nullptr;
148
- GRPC_CLOSURE_SCHED(cb, error);
148
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, cb, error);
149
149
  }
150
150
 
151
151
  static void ReadAction(void* arg, grpc_error* error) {
@@ -20,7 +20,7 @@
20
20
 
21
21
  #include "src/core/lib/iomgr/port.h"
22
22
 
23
- #ifdef GRPC_POSIX_SOCKET
23
+ #ifdef GRPC_POSIX_SOCKET_TCP
24
24
 
25
25
  #include "src/core/lib/iomgr/endpoint_pair.h"
26
26
  #include "src/core/lib/iomgr/socket_utils_posix.h"
@@ -420,7 +420,7 @@ static void fd_orphan(grpc_fd* fd, grpc_closure* on_done, int* release_fd,
420
420
  close(fd->fd);
421
421
  }
422
422
 
423
- GRPC_CLOSURE_SCHED(on_done, GRPC_ERROR_REF(error));
423
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_done, GRPC_ERROR_REF(error));
424
424
 
425
425
  grpc_iomgr_unregister_object(&fd->iomgr_object);
426
426
  fork_fd_list_remove_grpc_fd(fd);
@@ -623,7 +623,8 @@ static void pollset_maybe_finish_shutdown(grpc_pollset* pollset) {
623
623
  if (pollset->shutdown_closure != nullptr && pollset->root_worker == nullptr &&
624
624
  pollset->begin_refs == 0) {
625
625
  GPR_TIMER_MARK("pollset_finish_shutdown", 0);
626
- GRPC_CLOSURE_SCHED(pollset->shutdown_closure, GRPC_ERROR_NONE);
626
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, pollset->shutdown_closure,
627
+ GRPC_ERROR_NONE);
627
628
  pollset->shutdown_closure = nullptr;
628
629
  }
629
630
  }
@@ -352,15 +352,23 @@ static void ref_by(grpc_fd* fd, int n, const char* reason, const char* file,
352
352
  gpr_atm_no_barrier_load(&fd->refst) + n, reason, file, line);
353
353
  }
354
354
  #else
355
- #define REF_BY(fd, n, reason) ref_by(fd, n)
356
- #define UNREF_BY(fd, n, reason) unref_by(fd, n)
355
+ #define REF_BY(fd, n, reason) \
356
+ do { \
357
+ ref_by(fd, n); \
358
+ (void)(reason); \
359
+ } while (0)
360
+ #define UNREF_BY(fd, n, reason) \
361
+ do { \
362
+ unref_by(fd, n); \
363
+ (void)(reason); \
364
+ } while (0)
357
365
  static void ref_by(grpc_fd* fd, int n) {
358
366
  #endif
359
367
  GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&fd->refst, n) > 0);
360
368
  }
361
369
 
362
370
  /* Uninitialize and add to the freelist */
363
- static void fd_destroy(void* arg, grpc_error* error) {
371
+ static void fd_destroy(void* arg, grpc_error* /*error*/) {
364
372
  grpc_fd* fd = static_cast<grpc_fd*>(arg);
365
373
  fd->destroy();
366
374
 
@@ -385,7 +393,8 @@ static void unref_by(grpc_fd* fd, int n) {
385
393
  #endif
386
394
  gpr_atm old = gpr_atm_full_fetch_add(&fd->refst, -n);
387
395
  if (old == n) {
388
- GRPC_CLOSURE_SCHED(
396
+ grpc_core::ExecCtx::Run(
397
+ DEBUG_LOCATION,
389
398
  GRPC_CLOSURE_CREATE(fd_destroy, fd, grpc_schedule_on_exec_ctx),
390
399
  GRPC_ERROR_NONE);
391
400
  } else {
@@ -479,7 +488,7 @@ static void fd_orphan(grpc_fd* fd, grpc_closure* on_done, int* release_fd,
479
488
  to be alive (and not added to freelist) until the end of this function */
480
489
  REF_BY(fd, 1, reason);
481
490
 
482
- GRPC_CLOSURE_SCHED(fd->on_done_closure, GRPC_ERROR_NONE);
491
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, fd->on_done_closure, GRPC_ERROR_NONE);
483
492
 
484
493
  if (pollable_obj) {
485
494
  gpr_mu_unlock(&pollable_obj->owner_orphan_mu);
@@ -654,7 +663,8 @@ static void pollset_maybe_finish_shutdown(grpc_pollset* pollset) {
654
663
  if (pollset->shutdown_closure != nullptr && pollset->root_worker == nullptr &&
655
664
  pollset->containing_pollset_set_count == 0) {
656
665
  GPR_TIMER_MARK("pollset_finish_shutdown", 0);
657
- GRPC_CLOSURE_SCHED(pollset->shutdown_closure, GRPC_ERROR_NONE);
666
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, pollset->shutdown_closure,
667
+ GRPC_ERROR_NONE);
658
668
  pollset->shutdown_closure = nullptr;
659
669
  pollset->already_shutdown = true;
660
670
  }
@@ -1042,7 +1052,7 @@ static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
1042
1052
  }
1043
1053
 
1044
1054
  static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
1045
- grpc_pollset_worker** worker_hdl) {
1055
+ grpc_pollset_worker** /*worker_hdl*/) {
1046
1056
  GPR_TIMER_SCOPE("end_worker", 0);
1047
1057
  gpr_mu_lock(&pollset->mu);
1048
1058
  gpr_mu_lock(&worker->pollable_obj->mu);
@@ -1542,8 +1552,8 @@ static void pollset_set_add_pollset_set(grpc_pollset_set* a,
1542
1552
  gpr_mu_unlock(&b->mu);
1543
1553
  }
1544
1554
 
1545
- static void pollset_set_del_pollset_set(grpc_pollset_set* bag,
1546
- grpc_pollset_set* item) {}
1555
+ static void pollset_set_del_pollset_set(grpc_pollset_set* /*bag*/,
1556
+ grpc_pollset_set* /*item*/) {}
1547
1557
 
1548
1558
  /*******************************************************************************
1549
1559
  * Event engine binding
@@ -1553,8 +1563,8 @@ static bool is_any_background_poller_thread(void) { return false; }
1553
1563
 
1554
1564
  static void shutdown_background_closure(void) {}
1555
1565
 
1556
- static bool add_closure_to_background_poller(grpc_closure* closure,
1557
- grpc_error* error) {
1566
+ static bool add_closure_to_background_poller(grpc_closure* /*closure*/,
1567
+ grpc_error* /*error*/) {
1558
1568
  return false;
1559
1569
  }
1560
1570
 
@@ -1603,7 +1613,7 @@ static const grpc_event_engine_vtable vtable = {
1603
1613
  };
1604
1614
 
1605
1615
  const grpc_event_engine_vtable* grpc_init_epollex_linux(
1606
- bool explicitly_requested) {
1616
+ bool /*explicitly_requested*/) {
1607
1617
  if (!grpc_has_wakeup_fd()) {
1608
1618
  gpr_log(GPR_ERROR, "Skipping epollex because of no wakeup fd.");
1609
1619
  return nullptr;
@@ -1631,7 +1641,7 @@ const grpc_event_engine_vtable* grpc_init_epollex_linux(
1631
1641
  /* If GRPC_LINUX_EPOLL_CREATE1 is not defined, it means
1632
1642
  epoll_create1 is not available. Return NULL */
1633
1643
  const grpc_event_engine_vtable* grpc_init_epollex_linux(
1634
- bool explicitly_requested) {
1644
+ bool /*explicitly_requested*/) {
1635
1645
  return nullptr;
1636
1646
  }
1637
1647
  #endif /* defined(GRPC_POSIX_SOCKET_EV_EPOLLEX) */
@@ -323,8 +323,16 @@ static void ref_by(grpc_fd* fd, int n, const char* reason, const char* file,
323
323
  gpr_atm_no_barrier_load(&fd->refst) + n, reason, file, line);
324
324
  }
325
325
  #else
326
- #define REF_BY(fd, n, reason) ref_by(fd, n)
327
- #define UNREF_BY(fd, n, reason) unref_by(fd, n)
326
+ #define REF_BY(fd, n, reason) \
327
+ do { \
328
+ ref_by(fd, n); \
329
+ (void)(reason); \
330
+ } while (0)
331
+ #define UNREF_BY(fd, n, reason) \
332
+ do { \
333
+ unref_by(fd, n); \
334
+ (void)(reason); \
335
+ } while (0)
328
336
  static void ref_by(grpc_fd* fd, int n) {
329
337
  #endif
330
338
  GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&fd->refst, n) > 0);
@@ -355,6 +363,8 @@ static void unref_by(grpc_fd* fd, int n) {
355
363
  }
356
364
 
357
365
  static grpc_fd* fd_create(int fd, const char* name, bool track_err) {
366
+ // Avoid unused-parameter warning for debug-only parameter
367
+ (void)track_err;
358
368
  GPR_DEBUG_ASSERT(track_err == false);
359
369
  grpc_fd* r = static_cast<grpc_fd*>(gpr_malloc(sizeof(*r)));
360
370
  gpr_mu_init(&r->mu);
@@ -426,7 +436,7 @@ static void close_fd_locked(grpc_fd* fd) {
426
436
  if (!fd->released) {
427
437
  close(fd->fd);
428
438
  }
429
- GRPC_CLOSURE_SCHED(fd->on_done_closure, GRPC_ERROR_NONE);
439
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, fd->on_done_closure, GRPC_ERROR_NONE);
430
440
  }
431
441
 
432
442
  static int fd_wrapped_fd(grpc_fd* fd) {
@@ -487,17 +497,18 @@ static grpc_error* fd_shutdown_error(grpc_fd* fd) {
487
497
  static void notify_on_locked(grpc_fd* fd, grpc_closure** st,
488
498
  grpc_closure* closure) {
489
499
  if (fd->shutdown || gpr_atm_no_barrier_load(&fd->pollhup)) {
490
- GRPC_CLOSURE_SCHED(
491
- closure, grpc_error_set_int(
492
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("FD shutdown"),
493
- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
500
+ grpc_core::ExecCtx::Run(
501
+ DEBUG_LOCATION, closure,
502
+ grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("FD shutdown"),
503
+ GRPC_ERROR_INT_GRPC_STATUS,
504
+ GRPC_STATUS_UNAVAILABLE));
494
505
  } else if (*st == CLOSURE_NOT_READY) {
495
506
  /* not ready ==> switch to a waiting state by setting the closure */
496
507
  *st = closure;
497
508
  } else if (*st == CLOSURE_READY) {
498
509
  /* already ready ==> queue the closure to run immediately */
499
510
  *st = CLOSURE_NOT_READY;
500
- GRPC_CLOSURE_SCHED(closure, fd_shutdown_error(fd));
511
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, fd_shutdown_error(fd));
501
512
  maybe_wake_one_watcher_locked(fd);
502
513
  } else {
503
514
  /* upcallptr was set to a different closure. This is an error! */
@@ -519,7 +530,7 @@ static int set_ready_locked(grpc_fd* fd, grpc_closure** st) {
519
530
  return 0;
520
531
  } else {
521
532
  /* waiting ==> queue closure */
522
- GRPC_CLOSURE_SCHED(*st, fd_shutdown_error(fd));
533
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, *st, fd_shutdown_error(fd));
523
534
  *st = CLOSURE_NOT_READY;
524
535
  return 1;
525
536
  }
@@ -560,11 +571,11 @@ static void fd_notify_on_write(grpc_fd* fd, grpc_closure* closure) {
560
571
  gpr_mu_unlock(&fd->mu);
561
572
  }
562
573
 
563
- static void fd_notify_on_error(grpc_fd* fd, grpc_closure* closure) {
574
+ static void fd_notify_on_error(grpc_fd* /*fd*/, grpc_closure* closure) {
564
575
  if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
565
576
  gpr_log(GPR_ERROR, "Polling engine does not support tracking errors.");
566
577
  }
567
- GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_CANCELLED);
578
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, GRPC_ERROR_CANCELLED);
568
579
  }
569
580
 
570
581
  static void fd_set_readable(grpc_fd* fd) {
@@ -579,7 +590,7 @@ static void fd_set_writable(grpc_fd* fd) {
579
590
  gpr_mu_unlock(&fd->mu);
580
591
  }
581
592
 
582
- static void fd_set_error(grpc_fd* fd) {
593
+ static void fd_set_error(grpc_fd* /*fd*/) {
583
594
  if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
584
595
  gpr_log(GPR_ERROR, "Polling engine does not support tracking errors.");
585
596
  }
@@ -696,7 +707,7 @@ static void fd_end_poll(grpc_fd_watcher* watcher, int got_read, int got_write) {
696
707
  GPR_TLS_DECL(g_current_thread_poller);
697
708
  GPR_TLS_DECL(g_current_thread_worker);
698
709
 
699
- static void remove_worker(grpc_pollset* p, grpc_pollset_worker* worker) {
710
+ static void remove_worker(grpc_pollset* /*p*/, grpc_pollset_worker* worker) {
700
711
  worker->prev->next = worker->next;
701
712
  worker->next->prev = worker->prev;
702
713
  }
@@ -886,7 +897,8 @@ static void finish_shutdown(grpc_pollset* pollset) {
886
897
  GRPC_FD_UNREF(pollset->fds[i], "multipoller");
887
898
  }
888
899
  pollset->fd_count = 0;
889
- GRPC_CLOSURE_SCHED(pollset->shutdown_done, GRPC_ERROR_NONE);
900
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, pollset->shutdown_done,
901
+ GRPC_ERROR_NONE);
890
902
  }
891
903
 
892
904
  static void work_combine_error(grpc_error** composite, grpc_error* error) {
@@ -1320,8 +1332,8 @@ static bool is_any_background_poller_thread(void) { return false; }
1320
1332
 
1321
1333
  static void shutdown_background_closure(void) {}
1322
1334
 
1323
- static bool add_closure_to_background_poller(grpc_closure* closure,
1324
- grpc_error* error) {
1335
+ static bool add_closure_to_background_poller(grpc_closure* /*closure*/,
1336
+ grpc_error* /*error*/) {
1325
1337
  return false;
1326
1338
  }
1327
1339
 
@@ -1394,7 +1406,8 @@ static void reset_event_manager_on_fork() {
1394
1406
  gpr_mu_unlock(&fork_fd_list_mu);
1395
1407
  }
1396
1408
 
1397
- const grpc_event_engine_vtable* grpc_init_poll_posix(bool explicit_request) {
1409
+ const grpc_event_engine_vtable* grpc_init_poll_posix(
1410
+ bool /*explicit_request*/) {
1398
1411
  if (!grpc_has_wakeup_fd()) {
1399
1412
  gpr_log(GPR_ERROR, "Skipping poll because of no wakeup fd.");
1400
1413
  return nullptr;
@@ -118,11 +118,6 @@ grpc_millis grpc_cycle_counter_to_millis_round_up(gpr_cycle_counter cycles) {
118
118
  gpr_cycle_counter_sub(cycles, g_start_cycle));
119
119
  }
120
120
 
121
- static const grpc_closure_scheduler_vtable exec_ctx_scheduler_vtable = {
122
- exec_ctx_run, exec_ctx_sched, "exec_ctx"};
123
- static grpc_closure_scheduler exec_ctx_scheduler = {&exec_ctx_scheduler_vtable};
124
- grpc_closure_scheduler* grpc_schedule_on_exec_ctx = &exec_ctx_scheduler;
125
-
126
121
  namespace grpc_core {
127
122
  GPR_TLS_CLASS_DEF(ExecCtx::exec_ctx_);
128
123
  GPR_TLS_CLASS_DEF(ApplicationCallbackExecCtx::callback_exec_ctx_);
@@ -174,4 +169,56 @@ grpc_millis ExecCtx::Now() {
174
169
  return now_;
175
170
  }
176
171
 
172
+ void ExecCtx::Run(const DebugLocation& location, grpc_closure* closure,
173
+ grpc_error* error) {
174
+ (void)location;
175
+ if (closure == nullptr) {
176
+ GRPC_ERROR_UNREF(error);
177
+ return;
178
+ }
179
+ #ifndef NDEBUG
180
+ if (closure->scheduled) {
181
+ gpr_log(GPR_ERROR,
182
+ "Closure already scheduled. (closure: %p, created: [%s:%d], "
183
+ "previously scheduled at: [%s: %d], newly scheduled at [%s: %d]",
184
+ closure, closure->file_created, closure->line_created,
185
+ closure->file_initiated, closure->line_initiated, location.file(),
186
+ location.line());
187
+ abort();
188
+ }
189
+ closure->scheduled = true;
190
+ closure->file_initiated = location.file();
191
+ closure->line_initiated = location.line();
192
+ closure->run = false;
193
+ GPR_ASSERT(closure->cb != nullptr);
194
+ #endif
195
+ exec_ctx_sched(closure, error);
196
+ }
197
+
198
+ void ExecCtx::RunList(const DebugLocation& location, grpc_closure_list* list) {
199
+ (void)location;
200
+ grpc_closure* c = list->head;
201
+ while (c != nullptr) {
202
+ grpc_closure* next = c->next_data.next;
203
+ #ifndef NDEBUG
204
+ if (c->scheduled) {
205
+ gpr_log(GPR_ERROR,
206
+ "Closure already scheduled. (closure: %p, created: [%s:%d], "
207
+ "previously scheduled at: [%s: %d], newly scheduled at [%s:%d]",
208
+ c, c->file_created, c->line_created, c->file_initiated,
209
+ c->line_initiated, location.file(), location.line());
210
+ abort();
211
+ }
212
+ c->scheduled = true;
213
+ c->file_initiated = location.file();
214
+ c->line_initiated = location.line();
215
+ c->run = false;
216
+ GPR_ASSERT(c->cb != nullptr);
217
+ #endif
218
+ exec_ctx_sched(c, c->error_data.error);
219
+ c = next;
220
+ }
221
+ list->head = list->tail = nullptr;
222
+ }
223
+
177
224
  } // namespace grpc_core
@@ -28,6 +28,7 @@
28
28
 
29
29
  #include "src/core/lib/gpr/time_precise.h"
30
30
  #include "src/core/lib/gpr/tls.h"
31
+ #include "src/core/lib/gprpp/debug_location.h"
31
32
  #include "src/core/lib/gprpp/fork.h"
32
33
  #include "src/core/lib/iomgr/closure.h"
33
34
 
@@ -54,8 +55,6 @@ typedef struct grpc_combiner grpc_combiner;
54
55
  should not be counted by fork handlers */
55
56
  #define GRPC_APP_CALLBACK_EXEC_CTX_FLAG_IS_INTERNAL_THREAD 1
56
57
 
57
- extern grpc_closure_scheduler* grpc_schedule_on_exec_ctx;
58
-
59
58
  gpr_timespec grpc_millis_to_timespec(grpc_millis millis, gpr_clock_type clock);
60
59
  grpc_millis grpc_timespec_to_millis_round_down(gpr_timespec timespec);
61
60
  grpc_millis grpc_timespec_to_millis_round_up(gpr_timespec timespec);
@@ -221,6 +220,11 @@ class ExecCtx {
221
220
  gpr_tls_set(&exec_ctx_, reinterpret_cast<intptr_t>(exec_ctx));
222
221
  }
223
222
 
223
+ static void Run(const DebugLocation& location, grpc_closure* closure,
224
+ grpc_error* error);
225
+
226
+ static void RunList(const DebugLocation& location, grpc_closure_list* list);
227
+
224
228
  protected:
225
229
  /** Check if ready to finish. */
226
230
  virtual bool CheckReadyToFinish() { return false; }