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
@@ -134,6 +134,7 @@
134
134
  #define GRPC_POSIX_SOCKET_EV_EPOLL1 1
135
135
  #define GRPC_POSIX_SOCKET_EV_EPOLLEX 1
136
136
  #define GRPC_POSIX_SOCKET_EV_POLL 1
137
+ #define GRPC_POSIX_SOCKET_IF_NAMETOINDEX 1
137
138
  #define GRPC_POSIX_SOCKET_RESOLVE_ADDRESS 1
138
139
  #define GRPC_POSIX_SOCKET_SOCKADDR 1
139
140
  #define GRPC_POSIX_SOCKET_SOCKET_FACTORY 1
@@ -141,6 +142,7 @@
141
142
  #define GRPC_POSIX_SOCKET_TCP_CLIENT 1
142
143
  #define GRPC_POSIX_SOCKET_TCP_SERVER 1
143
144
  #define GRPC_POSIX_SOCKET_TCP_SERVER_UTILS_COMMON 1
145
+ #define GRPC_POSIX_SOCKET_UDP_SERVER 1
144
146
  #define GRPC_POSIX_SOCKET_UTILS_COMMON 1
145
147
  #else
146
148
  #define GRPC_POSIX_SOCKET 1
@@ -227,6 +229,7 @@
227
229
  #define GRPC_POSIX_SOCKET_TCP_CLIENT 1
228
230
  #define GRPC_POSIX_SOCKET_TCP_SERVER 1
229
231
  #define GRPC_POSIX_SOCKET_TCP_SERVER_UTILS_COMMON 1
232
+ #define GRPC_POSIX_SOCKET_UDP_SERVER 1
230
233
  #define GRPC_POSIX_SOCKET_UTILS_COMMON 1
231
234
  #endif
232
235
 
@@ -79,7 +79,7 @@ void grpc_custom_resolve_callback(grpc_custom_resolver* r,
79
79
  return;
80
80
  }
81
81
  if (r->on_done) {
82
- GRPC_CLOSURE_SCHED(r->on_done, error);
82
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, r->on_done, error);
83
83
  }
84
84
  gpr_free(r->host);
85
85
  gpr_free(r->port);
@@ -92,7 +92,7 @@ static grpc_error* try_split_host_port(const char* name,
92
92
  grpc_core::UniquePtr<char>* port) {
93
93
  /* parse name, splitting it into host and port parts */
94
94
  grpc_error* error;
95
- SplitHostPort(name, host, port);
95
+ grpc_core::SplitHostPort(name, host, port);
96
96
  if (*host == nullptr) {
97
97
  char* msg;
98
98
  gpr_asprintf(&msg, "unparseable host:port: '%s'", name);
@@ -151,7 +151,7 @@ static grpc_error* blocking_resolve_address_impl(
151
151
  }
152
152
 
153
153
  static void resolve_address_impl(const char* name, const char* default_port,
154
- grpc_pollset_set* interested_parties,
154
+ grpc_pollset_set* /*interested_parties*/,
155
155
  grpc_closure* on_done,
156
156
  grpc_resolved_addresses** addrs) {
157
157
  grpc_custom_resolver* r = nullptr;
@@ -161,7 +161,7 @@ static void resolve_address_impl(const char* name, const char* default_port,
161
161
  GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
162
162
  err = try_split_host_port(name, default_port, &host, &port);
163
163
  if (err != GRPC_ERROR_NONE) {
164
- GRPC_CLOSURE_SCHED(on_done, err);
164
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_done, err);
165
165
  return;
166
166
  }
167
167
  r = (grpc_custom_resolver*)gpr_malloc(sizeof(grpc_custom_resolver));
@@ -150,29 +150,28 @@ typedef struct {
150
150
 
151
151
  /* Callback to be passed to grpc Executor to asynch-ify
152
152
  * grpc_blocking_resolve_address */
153
- static void do_request_thread(void* rp, grpc_error* error) {
153
+ static void do_request_thread(void* rp, grpc_error* /*error*/) {
154
154
  request* r = static_cast<request*>(rp);
155
- GRPC_CLOSURE_SCHED(r->on_done, grpc_blocking_resolve_address(
156
- r->name, r->default_port, r->addrs_out));
155
+ grpc_core::ExecCtx::Run(
156
+ DEBUG_LOCATION, r->on_done,
157
+ grpc_blocking_resolve_address(r->name, r->default_port, r->addrs_out));
157
158
  gpr_free(r->name);
158
159
  gpr_free(r->default_port);
159
160
  gpr_free(r);
160
161
  }
161
162
 
162
163
  static void posix_resolve_address(const char* name, const char* default_port,
163
- grpc_pollset_set* interested_parties,
164
+ grpc_pollset_set* /*interested_parties*/,
164
165
  grpc_closure* on_done,
165
166
  grpc_resolved_addresses** addrs) {
166
167
  request* r = static_cast<request*>(gpr_malloc(sizeof(request)));
167
- GRPC_CLOSURE_INIT(
168
- &r->request_closure, do_request_thread, r,
169
- grpc_core::Executor::Scheduler(grpc_core::ExecutorType::RESOLVER,
170
- grpc_core::ExecutorJobType::SHORT));
168
+ GRPC_CLOSURE_INIT(&r->request_closure, do_request_thread, r, nullptr);
171
169
  r->name = gpr_strdup(name);
172
170
  r->default_port = gpr_strdup(default_port);
173
171
  r->on_done = on_done;
174
172
  r->addrs_out = addrs;
175
- GRPC_CLOSURE_SCHED(&r->request_closure, GRPC_ERROR_NONE);
173
+ grpc_core::Executor::Run(&r->request_closure, GRPC_ERROR_NONE,
174
+ grpc_core::ExecutorType::RESOLVER);
176
175
  }
177
176
 
178
177
  grpc_address_resolver_vtable grpc_posix_resolver_vtable = {
@@ -138,7 +138,7 @@ static void do_request_thread(void* rp, grpc_error* error) {
138
138
  } else {
139
139
  GRPC_ERROR_REF(error);
140
140
  }
141
- GRPC_CLOSURE_SCHED(r->on_done, error);
141
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, r->on_done, error);
142
142
  gpr_free(r->name);
143
143
  gpr_free(r->default_port);
144
144
  gpr_free(r);
@@ -149,15 +149,13 @@ static void windows_resolve_address(const char* name, const char* default_port,
149
149
  grpc_closure* on_done,
150
150
  grpc_resolved_addresses** addresses) {
151
151
  request* r = (request*)gpr_malloc(sizeof(request));
152
- GRPC_CLOSURE_INIT(
153
- &r->request_closure, do_request_thread, r,
154
- grpc_core::Executor::Scheduler(grpc_core::ExecutorType::RESOLVER,
155
- grpc_core::ExecutorJobType::SHORT));
152
+ GRPC_CLOSURE_INIT(&r->request_closure, do_request_thread, r, nullptr);
156
153
  r->name = gpr_strdup(name);
157
154
  r->default_port = gpr_strdup(default_port);
158
155
  r->on_done = on_done;
159
156
  r->addresses = addresses;
160
- GRPC_CLOSURE_SCHED(&r->request_closure, GRPC_ERROR_NONE);
157
+ grpc_core::Executor::Run(&r->request_closure, GRPC_ERROR_NONE,
158
+ grpc_core::ExecutorType::RESOLVER);
161
159
  }
162
160
 
163
161
  grpc_address_resolver_vtable grpc_windows_resolver_vtable = {
@@ -274,7 +274,7 @@ static bool rq_reclaim_from_per_user_free_pool(
274
274
  grpc_resource_quota* resource_quota);
275
275
  static bool rq_reclaim(grpc_resource_quota* resource_quota, bool destructive);
276
276
 
277
- static void rq_step(void* rq, grpc_error* error) {
277
+ static void rq_step(void* rq, grpc_error* /*error*/) {
278
278
  grpc_resource_quota* resource_quota = static_cast<grpc_resource_quota*>(rq);
279
279
  resource_quota->step_scheduled = false;
280
280
  do {
@@ -333,7 +333,7 @@ static bool rq_alloc(grpc_resource_quota* resource_quota) {
333
333
  int64_t aborted_allocations = resource_user->outstanding_allocations;
334
334
  resource_user->outstanding_allocations = 0;
335
335
  resource_user->free_pool += aborted_allocations;
336
- GRPC_CLOSURE_LIST_SCHED(&resource_user->on_allocated);
336
+ grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &resource_user->on_allocated);
337
337
  gpr_mu_unlock(&resource_user->mu);
338
338
  ru_unref_by(resource_user, static_cast<gpr_atm>(aborted_allocations));
339
339
  continue;
@@ -359,7 +359,7 @@ static bool rq_alloc(grpc_resource_quota* resource_quota) {
359
359
  if (resource_user->free_pool >= 0) {
360
360
  resource_user->allocating = false;
361
361
  resource_user->outstanding_allocations = 0;
362
- GRPC_CLOSURE_LIST_SCHED(&resource_user->on_allocated);
362
+ grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &resource_user->on_allocated);
363
363
  gpr_mu_unlock(&resource_user->mu);
364
364
  } else {
365
365
  rulist_add_head(resource_user, GRPC_RULIST_AWAITING_ALLOCATION);
@@ -424,7 +424,7 @@ static bool rq_reclaim(grpc_resource_quota* resource_quota, bool destructive) {
424
424
  resource_quota->debug_only_last_reclaimer_resource_user = resource_user;
425
425
  resource_quota->debug_only_last_initiated_reclaimer = c;
426
426
  resource_user->reclaimers[destructive] = nullptr;
427
- GRPC_CLOSURE_SCHED(c, GRPC_ERROR_NONE);
427
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, c, GRPC_ERROR_NONE);
428
428
  return true;
429
429
  }
430
430
 
@@ -479,7 +479,7 @@ static grpc_slice ru_slice_create(grpc_resource_user* resource_user,
479
479
  * the combiner
480
480
  */
481
481
 
482
- static void ru_allocate(void* ru, grpc_error* error) {
482
+ static void ru_allocate(void* ru, grpc_error* /*error*/) {
483
483
  grpc_resource_user* resource_user = static_cast<grpc_resource_user*>(ru);
484
484
  if (rulist_empty(resource_user->resource_quota,
485
485
  GRPC_RULIST_AWAITING_ALLOCATION)) {
@@ -488,7 +488,7 @@ static void ru_allocate(void* ru, grpc_error* error) {
488
488
  rulist_add_tail(resource_user, GRPC_RULIST_AWAITING_ALLOCATION);
489
489
  }
490
490
 
491
- static void ru_add_to_free_pool(void* ru, grpc_error* error) {
491
+ static void ru_add_to_free_pool(void* ru, grpc_error* /*error*/) {
492
492
  grpc_resource_user* resource_user = static_cast<grpc_resource_user*>(ru);
493
493
  if (!rulist_empty(resource_user->resource_quota,
494
494
  GRPC_RULIST_AWAITING_ALLOCATION) &&
@@ -506,14 +506,14 @@ static bool ru_post_reclaimer(grpc_resource_user* resource_user,
506
506
  resource_user->new_reclaimers[destructive] = nullptr;
507
507
  GPR_ASSERT(resource_user->reclaimers[destructive] == nullptr);
508
508
  if (gpr_atm_acq_load(&resource_user->shutdown) > 0) {
509
- GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_CANCELLED);
509
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, GRPC_ERROR_CANCELLED);
510
510
  return false;
511
511
  }
512
512
  resource_user->reclaimers[destructive] = closure;
513
513
  return true;
514
514
  }
515
515
 
516
- static void ru_post_benign_reclaimer(void* ru, grpc_error* error) {
516
+ static void ru_post_benign_reclaimer(void* ru, grpc_error* /*error*/) {
517
517
  grpc_resource_user* resource_user = static_cast<grpc_resource_user*>(ru);
518
518
  if (!ru_post_reclaimer(resource_user, false)) return;
519
519
  if (!rulist_empty(resource_user->resource_quota,
@@ -527,7 +527,7 @@ static void ru_post_benign_reclaimer(void* ru, grpc_error* error) {
527
527
  rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_BENIGN);
528
528
  }
529
529
 
530
- static void ru_post_destructive_reclaimer(void* ru, grpc_error* error) {
530
+ static void ru_post_destructive_reclaimer(void* ru, grpc_error* /*error*/) {
531
531
  grpc_resource_user* resource_user = static_cast<grpc_resource_user*>(ru);
532
532
  if (!ru_post_reclaimer(resource_user, true)) return;
533
533
  if (!rulist_empty(resource_user->resource_quota,
@@ -543,14 +543,16 @@ static void ru_post_destructive_reclaimer(void* ru, grpc_error* error) {
543
543
  rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE);
544
544
  }
545
545
 
546
- static void ru_shutdown(void* ru, grpc_error* error) {
546
+ static void ru_shutdown(void* ru, grpc_error* /*error*/) {
547
547
  if (GRPC_TRACE_FLAG_ENABLED(grpc_resource_quota_trace)) {
548
548
  gpr_log(GPR_INFO, "RU shutdown %p", ru);
549
549
  }
550
550
  grpc_resource_user* resource_user = static_cast<grpc_resource_user*>(ru);
551
551
  gpr_mu_lock(&resource_user->mu);
552
- GRPC_CLOSURE_SCHED(resource_user->reclaimers[0], GRPC_ERROR_CANCELLED);
553
- GRPC_CLOSURE_SCHED(resource_user->reclaimers[1], GRPC_ERROR_CANCELLED);
552
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, resource_user->reclaimers[0],
553
+ GRPC_ERROR_CANCELLED);
554
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, resource_user->reclaimers[1],
555
+ GRPC_ERROR_CANCELLED);
554
556
  resource_user->reclaimers[0] = nullptr;
555
557
  resource_user->reclaimers[1] = nullptr;
556
558
  rulist_remove(resource_user, GRPC_RULIST_RECLAIMER_BENIGN);
@@ -561,7 +563,7 @@ static void ru_shutdown(void* ru, grpc_error* error) {
561
563
  gpr_mu_unlock(&resource_user->mu);
562
564
  }
563
565
 
564
- static void ru_destroy(void* ru, grpc_error* error) {
566
+ static void ru_destroy(void* ru, grpc_error* /*error*/) {
565
567
  grpc_resource_user* resource_user = static_cast<grpc_resource_user*>(ru);
566
568
  GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->refs) == 0);
567
569
  // Free all the remaining thread quota
@@ -572,8 +574,10 @@ static void ru_destroy(void* ru, grpc_error* error) {
572
574
  for (int i = 0; i < GRPC_RULIST_COUNT; i++) {
573
575
  rulist_remove(resource_user, static_cast<grpc_rulist>(i));
574
576
  }
575
- GRPC_CLOSURE_SCHED(resource_user->reclaimers[0], GRPC_ERROR_CANCELLED);
576
- GRPC_CLOSURE_SCHED(resource_user->reclaimers[1], GRPC_ERROR_CANCELLED);
577
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, resource_user->reclaimers[0],
578
+ GRPC_ERROR_CANCELLED);
579
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, resource_user->reclaimers[1],
580
+ GRPC_ERROR_CANCELLED);
577
581
  if (resource_user->free_pool != 0) {
578
582
  resource_user->resource_quota->free_pool += resource_user->free_pool;
579
583
  rq_step_sched(resource_user->resource_quota);
@@ -597,7 +601,8 @@ static void ru_allocated_slices(void* arg, grpc_error* error) {
597
601
  grpc_resource_user_slice_allocator* slice_allocator =
598
602
  static_cast<grpc_resource_user_slice_allocator*>(arg);
599
603
  if (error == GRPC_ERROR_NONE) ru_alloc_slices(slice_allocator);
600
- GRPC_CLOSURE_RUN(&slice_allocator->on_done, GRPC_ERROR_REF(error));
604
+ grpc_core::Closure::Run(DEBUG_LOCATION, &slice_allocator->on_done,
605
+ GRPC_ERROR_REF(error));
601
606
  }
602
607
 
603
608
  /*******************************************************************************
@@ -611,7 +616,7 @@ typedef struct {
611
616
  grpc_closure closure;
612
617
  } rq_resize_args;
613
618
 
614
- static void rq_resize(void* args, grpc_error* error) {
619
+ static void rq_resize(void* args, grpc_error* /*error*/) {
615
620
  rq_resize_args* a = static_cast<rq_resize_args*>(args);
616
621
  int64_t delta = a->size - a->resource_quota->size;
617
622
  a->resource_quota->size += delta;
@@ -622,7 +627,7 @@ static void rq_resize(void* args, grpc_error* error) {
622
627
  gpr_free(a);
623
628
  }
624
629
 
625
- static void rq_reclamation_done(void* rq, grpc_error* error) {
630
+ static void rq_reclamation_done(void* rq, grpc_error* /*error*/) {
626
631
  grpc_resource_quota* resource_quota = static_cast<grpc_resource_quota*>(rq);
627
632
  resource_quota->reclaiming = false;
628
633
  rq_step_sched(resource_quota);
@@ -719,7 +724,7 @@ void grpc_resource_quota_resize(grpc_resource_quota* resource_quota,
719
724
  gpr_atm_no_barrier_store(&resource_quota->last_size,
720
725
  (gpr_atm)GPR_MIN((size_t)GPR_ATM_MAX, size));
721
726
  GRPC_CLOSURE_INIT(&a->closure, rq_resize, a, grpc_schedule_on_exec_ctx);
722
- GRPC_CLOSURE_SCHED(&a->closure, GRPC_ERROR_NONE);
727
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, &a->closure, GRPC_ERROR_NONE);
723
728
  }
724
729
 
725
730
  size_t grpc_resource_quota_peek_size(grpc_resource_quota* resource_quota) {
@@ -994,8 +999,8 @@ bool grpc_resource_user_alloc_slices(
994
999
  size_t count, grpc_slice_buffer* dest) {
995
1000
  if (GPR_UNLIKELY(
996
1001
  gpr_atm_no_barrier_load(&slice_allocator->resource_user->shutdown))) {
997
- GRPC_CLOSURE_SCHED(
998
- &slice_allocator->on_allocated,
1002
+ grpc_core::ExecCtx::Run(
1003
+ DEBUG_LOCATION, &slice_allocator->on_allocated,
999
1004
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource user shutdown"));
1000
1005
  return false;
1001
1006
  }
@@ -84,11 +84,16 @@ grpc_error* grpc_set_socket_no_sigpipe_if_possible(int fd) {
84
84
  if ((newval != 0) != (val != 0)) {
85
85
  return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Failed to set SO_NOSIGPIPE");
86
86
  }
87
+ #else
88
+ // Avoid unused parameter warning for conditional parameter
89
+ (void)fd;
87
90
  #endif
88
91
  return GRPC_ERROR_NONE;
89
92
  }
90
93
 
91
94
  grpc_error* grpc_set_socket_ip_pktinfo_if_possible(int fd) {
95
+ // Use conditionally-important parameter to avoid warning
96
+ (void)fd;
92
97
  #ifdef GRPC_HAVE_IP_PKTINFO
93
98
  int get_local_ip = 1;
94
99
  if (0 != setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip,
@@ -100,6 +105,8 @@ grpc_error* grpc_set_socket_ip_pktinfo_if_possible(int fd) {
100
105
  }
101
106
 
102
107
  grpc_error* grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) {
108
+ // Use conditionally-important parameter to avoid warning
109
+ (void)fd;
103
110
  #ifdef GRPC_HAVE_IPV6_RECVPKTINFO
104
111
  int get_local_ip = 1;
105
112
  if (0 != setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip,
@@ -256,6 +263,10 @@ void config_default_tcp_user_timeout(bool enable, int timeout, bool is_client) {
256
263
  /* Set TCP_USER_TIMEOUT */
257
264
  grpc_error* grpc_set_socket_tcp_user_timeout(
258
265
  int fd, const grpc_channel_args* channel_args, bool is_client) {
266
+ // Use conditionally-important parameter to avoid warning
267
+ (void)fd;
268
+ (void)channel_args;
269
+ (void)is_client;
259
270
  #ifdef GRPC_HAVE_TCP_USER_TIMEOUT
260
271
  bool enable;
261
272
  int timeout;
@@ -124,7 +124,7 @@ static void socket_notify_on_iocp(grpc_winsocket* socket, grpc_closure* closure,
124
124
  gpr_mu_lock(&socket->state_mu);
125
125
  if (info->has_pending_iocp) {
126
126
  info->has_pending_iocp = 0;
127
- GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_NONE);
127
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, GRPC_ERROR_NONE);
128
128
  } else {
129
129
  info->closure = closure;
130
130
  }
@@ -145,7 +145,7 @@ void grpc_socket_become_ready(grpc_winsocket* socket,
145
145
  GPR_ASSERT(!info->has_pending_iocp);
146
146
  gpr_mu_lock(&socket->state_mu);
147
147
  if (info->closure) {
148
- GRPC_CLOSURE_SCHED(info->closure, GRPC_ERROR_NONE);
148
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, info->closure, GRPC_ERROR_NONE);
149
149
  info->closure = NULL;
150
150
  } else {
151
151
  info->has_pending_iocp = 1;
@@ -96,7 +96,7 @@ static void OnAlarm(void* arg, grpc_error* error) {
96
96
  } else {
97
97
  grpc_error* error =
98
98
  GRPC_ERROR_CREATE_FROM_STATIC_STRING("connect() timed out");
99
- GRPC_CLOSURE_SCHED(closure, error);
99
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, error);
100
100
  }
101
101
  }
102
102
 
@@ -137,7 +137,7 @@ static void OnOpen(void* arg, grpc_error* error) {
137
137
  GRPC_ERROR_REF(error);
138
138
  }
139
139
  gpr_mu_unlock(&connect->mu);
140
- GRPC_CLOSURE_SCHED(closure, error);
140
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, error);
141
141
  }
142
142
  }
143
143
 
@@ -58,7 +58,7 @@ static void custom_tcp_connect_cleanup(grpc_custom_tcp_connect* connect) {
58
58
  }
59
59
  }
60
60
 
61
- static void custom_close_callback(grpc_custom_socket* socket) {}
61
+ static void custom_close_callback(grpc_custom_socket* /*socket*/) {}
62
62
 
63
63
  static void on_alarm(void* acp, grpc_error* error) {
64
64
  int done;
@@ -96,7 +96,7 @@ static void custom_connect_callback_internal(grpc_custom_socket* socket,
96
96
  grpc_core::ExecCtx::Get()->Flush();
97
97
  custom_tcp_connect_cleanup(connect);
98
98
  }
99
- GRPC_CLOSURE_SCHED(closure, error);
99
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, error);
100
100
  }
101
101
 
102
102
  static void custom_connect_callback(grpc_custom_socket* socket,
@@ -241,7 +241,7 @@ finish:
241
241
  grpc_channel_args_destroy(ac->channel_args);
242
242
  gpr_free(ac);
243
243
  }
244
- GRPC_CLOSURE_SCHED(closure, error);
244
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, error);
245
245
  }
246
246
 
247
247
  grpc_error* grpc_tcp_client_prepare_fd(const grpc_channel_args* channel_args,
@@ -298,12 +298,13 @@ void grpc_tcp_client_create_from_prepared_fd(
298
298
  char* addr_str = grpc_sockaddr_to_uri(addr);
299
299
  *ep = grpc_tcp_client_create_from_fd(fdobj, channel_args, addr_str);
300
300
  gpr_free(addr_str);
301
- GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_NONE);
301
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, GRPC_ERROR_NONE);
302
302
  return;
303
303
  }
304
304
  if (errno != EWOULDBLOCK && errno != EINPROGRESS) {
305
305
  grpc_fd_orphan(fdobj, nullptr, nullptr, "tcp_client_connect_error");
306
- GRPC_CLOSURE_SCHED(closure, GRPC_OS_ERROR(errno, "connect"));
306
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure,
307
+ GRPC_OS_ERROR(errno, "connect"));
307
308
  return;
308
309
  }
309
310
 
@@ -344,7 +345,7 @@ static void tcp_connect(grpc_closure* closure, grpc_endpoint** ep,
344
345
  *ep = nullptr;
345
346
  if ((error = grpc_tcp_client_prepare_fd(channel_args, addr, &mapped_addr,
346
347
  &fdobj)) != GRPC_ERROR_NONE) {
347
- GRPC_CLOSURE_SCHED(closure, error);
348
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, error);
348
349
  return;
349
350
  }
350
351
  grpc_tcp_client_create_from_prepared_fd(interested_parties, closure, fdobj,
@@ -117,7 +117,7 @@ static void on_connect(void* acp, grpc_error* error) {
117
117
  async_connect_unlock_and_cleanup(ac, socket);
118
118
  /* If the connection was aborted, the callback was already called when
119
119
  the deadline was met. */
120
- GRPC_CLOSURE_SCHED(on_done, error);
120
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_done, error);
121
121
  }
122
122
 
123
123
  /* Tries to issue one async connection, then schedules both an IOCP
@@ -225,7 +225,7 @@ failure:
225
225
  } else if (sock != INVALID_SOCKET) {
226
226
  closesocket(sock);
227
227
  }
228
- GRPC_CLOSURE_SCHED(on_done, final_error);
228
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_done, final_error);
229
229
  }
230
230
 
231
231
  grpc_tcp_client_vtable grpc_windows_tcp_client_vtable = {tcp_connect};
@@ -140,7 +140,7 @@ static void call_read_cb(custom_tcp_endpoint* tcp, grpc_error* error) {
140
140
  TCP_UNREF(tcp, "read");
141
141
  tcp->read_slices = nullptr;
142
142
  tcp->read_cb = nullptr;
143
- GRPC_CLOSURE_SCHED(cb, error);
143
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, cb, error);
144
144
  }
145
145
 
146
146
  static void custom_read_callback(grpc_custom_socket* socket, size_t nread,
@@ -220,7 +220,7 @@ static void custom_write_callback(grpc_custom_socket* socket,
220
220
  gpr_log(GPR_INFO, "write complete on %p: error=%s", tcp->socket, str);
221
221
  }
222
222
  TCP_UNREF(tcp, "write");
223
- GRPC_CLOSURE_SCHED(cb, error);
223
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, cb, error);
224
224
  }
225
225
 
226
226
  static void endpoint_write(grpc_endpoint* ep, grpc_slice_buffer* write_slices,
@@ -241,8 +241,9 @@ static void endpoint_write(grpc_endpoint* ep, grpc_slice_buffer* write_slices,
241
241
  }
242
242
 
243
243
  if (tcp->shutting_down) {
244
- GRPC_CLOSURE_SCHED(cb, GRPC_ERROR_CREATE_FROM_STATIC_STRING(
245
- "TCP socket is shutting down"));
244
+ grpc_core::ExecCtx::Run(
245
+ DEBUG_LOCATION, cb,
246
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP socket is shutting down"));
246
247
  return;
247
248
  }
248
249
 
@@ -252,7 +253,7 @@ static void endpoint_write(grpc_endpoint* ep, grpc_slice_buffer* write_slices,
252
253
  if (tcp->write_slices->count == 0) {
253
254
  // No slices means we don't have to do anything,
254
255
  // and libuv doesn't like empty writes
255
- GRPC_CLOSURE_SCHED(cb, GRPC_ERROR_NONE);
256
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, cb, GRPC_ERROR_NONE);
256
257
  return;
257
258
  }
258
259
  tcp->write_cb = cb;
@@ -289,10 +290,10 @@ static void endpoint_shutdown(grpc_endpoint* ep, grpc_error* why) {
289
290
  gpr_log(GPR_INFO, "TCP %p shutdown why=%s", tcp->socket, str);
290
291
  }
291
292
  tcp->shutting_down = true;
292
- // GRPC_CLOSURE_SCHED(tcp->read_cb, GRPC_ERROR_REF(why));
293
- // GRPC_CLOSURE_SCHED(tcp->write_cb, GRPC_ERROR_REF(why));
294
- // tcp->read_cb = nullptr;
295
- // tcp->write_cb = nullptr;
293
+ // grpc_core::ExecCtx::Run(DEBUG_LOCATION,tcp->read_cb,
294
+ // GRPC_ERROR_REF(why));
295
+ // grpc_core::ExecCtx::Run(DEBUG_LOCATION,tcp->write_cb,
296
+ // GRPC_ERROR_REF(why)); tcp->read_cb = nullptr; tcp->write_cb = nullptr;
296
297
  grpc_resource_user_shutdown(tcp->resource_user);
297
298
  grpc_custom_socket_vtable->shutdown(tcp->socket);
298
299
  }