grpc 1.2.5 → 1.3.4

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 (327) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +1434 -399
  3. data/etc/roots.pem +34 -150
  4. data/include/grpc/grpc.h +71 -0
  5. data/include/grpc/impl/codegen/atm.h +5 -0
  6. data/include/grpc/impl/codegen/atm_gcc_atomic.h +6 -0
  7. data/include/grpc/impl/codegen/atm_gcc_sync.h +2 -0
  8. data/include/grpc/impl/codegen/atm_windows.h +11 -0
  9. data/include/grpc/impl/codegen/grpc_types.h +54 -13
  10. data/include/grpc/impl/codegen/port_platform.h +15 -1
  11. data/include/grpc/support/alloc.h +2 -1
  12. data/include/grpc/support/sync.h +4 -0
  13. data/include/grpc/support/tls.h +1 -1
  14. data/src/core/ext/census/gen/trace_context.pb.h +1 -1
  15. data/src/core/ext/census/grpc_filter.c +14 -10
  16. data/src/core/ext/census/grpc_plugin.c +3 -1
  17. data/src/core/ext/census/trace_label.h +1 -1
  18. data/src/core/ext/census/trace_propagation.h +1 -1
  19. data/src/core/ext/census/trace_status.h +1 -1
  20. data/src/core/ext/census/trace_string.h +1 -1
  21. data/src/core/ext/census/tracing.h +1 -1
  22. data/src/core/ext/{client_channel → filters/client_channel}/channel_connectivity.c +56 -27
  23. data/src/core/ext/{client_channel → filters/client_channel}/client_channel.c +407 -202
  24. data/src/core/ext/{client_channel → filters/client_channel}/client_channel.h +10 -6
  25. data/src/core/ext/{client_channel → filters/client_channel}/client_channel_factory.c +1 -1
  26. data/src/core/ext/{client_channel → filters/client_channel}/client_channel_factory.h +4 -4
  27. data/src/core/ext/{client_channel → filters/client_channel}/client_channel_plugin.c +12 -7
  28. data/src/core/ext/{client_channel → filters/client_channel}/connector.c +1 -1
  29. data/src/core/ext/{client_channel → filters/client_channel}/connector.h +3 -5
  30. data/src/core/ext/{client_channel → filters/client_channel}/http_connect_handshaker.c +6 -6
  31. data/src/core/ext/{client_channel → filters/client_channel}/http_connect_handshaker.h +3 -3
  32. data/src/core/ext/{client_channel → filters/client_channel}/http_proxy.c +4 -4
  33. data/src/core/ext/{client_channel → filters/client_channel}/http_proxy.h +3 -3
  34. data/src/core/ext/{client_channel → filters/client_channel}/lb_policy.c +1 -1
  35. data/src/core/ext/{client_channel → filters/client_channel}/lb_policy.h +4 -4
  36. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb.c +22 -20
  37. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb.h +4 -4
  38. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb_channel.h +5 -4
  39. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb_channel_secure.c +2 -2
  40. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/load_balancer_api.c +1 -1
  41. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/load_balancer_api.h +6 -5
  42. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +1 -1
  43. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +0 -0
  44. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/pick_first/pick_first.c +20 -15
  45. data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/round_robin/round_robin.c +21 -16
  46. data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_factory.c +1 -1
  47. data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_factory.h +5 -5
  48. data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_registry.c +1 -1
  49. data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_registry.h +4 -4
  50. data/src/core/ext/{client_channel → filters/client_channel}/parse_address.c +1 -1
  51. data/src/core/ext/{client_channel → filters/client_channel}/parse_address.h +4 -4
  52. data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper.c +1 -1
  53. data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper.h +3 -3
  54. data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper_registry.c +10 -4
  55. data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper_registry.h +4 -4
  56. data/src/core/ext/{client_channel → filters/client_channel}/resolver.c +1 -1
  57. data/src/core/ext/{client_channel → filters/client_channel}/resolver.h +4 -4
  58. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c +350 -0
  59. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +66 -0
  60. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c +319 -0
  61. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c +289 -0
  62. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +64 -0
  63. data/src/core/ext/{resolver → filters/client_channel/resolver}/dns/native/dns_resolver.c +21 -5
  64. data/src/core/ext/{resolver → filters/client_channel/resolver}/sockaddr/sockaddr_resolver.c +3 -3
  65. data/src/core/ext/{client_channel → filters/client_channel}/resolver_factory.c +1 -1
  66. data/src/core/ext/{client_channel → filters/client_channel}/resolver_factory.h +6 -6
  67. data/src/core/ext/{client_channel → filters/client_channel}/resolver_registry.c +1 -2
  68. data/src/core/ext/{client_channel → filters/client_channel}/resolver_registry.h +4 -4
  69. data/src/core/ext/filters/client_channel/retry_throttle.c +210 -0
  70. data/src/core/ext/filters/client_channel/retry_throttle.h +65 -0
  71. data/src/core/ext/{client_channel → filters/client_channel}/subchannel.c +49 -43
  72. data/src/core/ext/{client_channel → filters/client_channel}/subchannel.h +21 -7
  73. data/src/core/ext/{client_channel → filters/client_channel}/subchannel_index.c +1 -1
  74. data/src/core/ext/{client_channel → filters/client_channel}/subchannel_index.h +5 -5
  75. data/src/core/ext/{client_channel → filters/client_channel}/uri_parser.c +1 -1
  76. data/src/core/ext/{client_channel → filters/client_channel}/uri_parser.h +3 -3
  77. data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting.c +4 -2
  78. data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting.h +3 -3
  79. data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting_filter.c +17 -14
  80. data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting_filter.h +4 -4
  81. data/src/core/ext/filters/max_age/max_age_filter.c +439 -0
  82. data/src/core/ext/filters/max_age/max_age_filter.h +39 -0
  83. data/src/core/ext/transport/chttp2/client/chttp2_connector.c +6 -41
  84. data/src/core/ext/transport/chttp2/client/chttp2_connector.h +1 -1
  85. data/src/core/ext/transport/chttp2/client/insecure/channel_create.c +2 -2
  86. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +3 -3
  87. data/src/core/ext/transport/chttp2/server/chttp2_server.c +2 -2
  88. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +2 -5
  89. data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +2 -2
  90. data/src/core/ext/transport/chttp2/transport/chttp2_transport.c +449 -204
  91. data/src/core/ext/transport/chttp2/transport/frame_data.c +10 -7
  92. data/src/core/ext/transport/chttp2/transport/frame_goaway.c +3 -2
  93. data/src/core/ext/transport/chttp2/transport/frame_ping.c +37 -7
  94. data/src/core/ext/transport/chttp2/transport/frame_ping.h +3 -0
  95. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +4 -3
  96. data/src/core/ext/transport/chttp2/transport/frame_settings.c +18 -38
  97. data/src/core/ext/transport/chttp2/transport/frame_settings.h +1 -29
  98. data/src/core/ext/transport/chttp2/transport/frame_window_update.c +2 -2
  99. data/src/core/ext/transport/chttp2/transport/hpack_encoder.c +64 -37
  100. data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +11 -4
  101. data/src/core/ext/transport/chttp2/transport/hpack_parser.c +60 -39
  102. data/src/core/ext/transport/chttp2/transport/hpack_table.c +2 -2
  103. data/src/core/ext/transport/chttp2/transport/http2_settings.c +75 -0
  104. data/src/core/ext/transport/chttp2/transport/http2_settings.h +74 -0
  105. data/src/core/ext/transport/chttp2/transport/incoming_metadata.c +22 -43
  106. data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +8 -10
  107. data/src/core/ext/transport/chttp2/transport/internal.h +24 -2
  108. data/src/core/ext/transport/chttp2/transport/parsing.c +33 -15
  109. data/src/core/ext/transport/chttp2/transport/writing.c +56 -10
  110. data/src/core/lib/channel/channel_args.c +7 -0
  111. data/src/core/lib/channel/channel_args.h +2 -0
  112. data/src/core/lib/channel/channel_stack.c +20 -27
  113. data/src/core/lib/channel/channel_stack.h +18 -16
  114. data/src/core/lib/channel/compress_filter.c +20 -18
  115. data/src/core/lib/channel/connected_channel.c +9 -8
  116. data/src/core/lib/channel/deadline_filter.c +28 -24
  117. data/src/core/lib/channel/deadline_filter.h +3 -3
  118. data/src/core/lib/channel/handshaker.c +3 -2
  119. data/src/core/lib/channel/http_client_filter.c +119 -61
  120. data/src/core/lib/channel/http_server_filter.c +124 -69
  121. data/src/core/lib/channel/message_size_filter.c +23 -19
  122. data/src/core/lib/http/httpcli.c +8 -6
  123. data/src/core/lib/http/httpcli_security_connector.c +5 -5
  124. data/src/core/lib/http/parser.c +57 -31
  125. data/src/core/lib/iomgr/closure.c +15 -0
  126. data/src/core/lib/iomgr/closure.h +4 -0
  127. data/src/core/lib/iomgr/combiner.c +8 -0
  128. data/src/core/lib/iomgr/endpoint_pair.h +2 -3
  129. data/src/core/lib/iomgr/endpoint_pair_posix.c +10 -7
  130. data/src/core/lib/iomgr/endpoint_pair_uv.c +2 -3
  131. data/src/core/lib/iomgr/endpoint_pair_windows.c +9 -6
  132. data/src/core/lib/iomgr/error.c +360 -177
  133. data/src/core/lib/iomgr/error.h +31 -33
  134. data/src/core/lib/iomgr/error_internal.h +30 -9
  135. data/src/core/lib/iomgr/ev_epoll_linux.c +25 -239
  136. data/src/core/lib/iomgr/ev_poll_posix.c +11 -7
  137. data/src/core/lib/iomgr/ev_posix.c +6 -0
  138. data/src/core/lib/iomgr/ev_posix.h +3 -0
  139. data/src/core/lib/iomgr/exec_ctx.c +6 -0
  140. data/src/core/lib/iomgr/executor.c +8 -2
  141. data/src/core/lib/iomgr/load_file.c +6 -3
  142. data/src/core/lib/iomgr/lockfree_event.c +238 -0
  143. data/src/core/{ext/client_channel/initial_connect_string.h → lib/iomgr/lockfree_event.h} +17 -13
  144. data/src/core/lib/iomgr/pollset.h +4 -0
  145. data/src/core/lib/iomgr/pollset_windows.c +2 -2
  146. data/src/core/lib/iomgr/port.h +9 -0
  147. data/src/core/lib/iomgr/resolve_address_posix.c +15 -9
  148. data/src/core/lib/iomgr/resolve_address_uv.c +8 -6
  149. data/src/core/lib/iomgr/resolve_address_windows.c +2 -2
  150. data/src/core/lib/iomgr/resource_quota.c +19 -4
  151. data/src/core/lib/iomgr/resource_quota.h +2 -0
  152. data/src/core/lib/iomgr/sockaddr_utils.c +3 -1
  153. data/src/core/lib/iomgr/socket_factory_posix.c +110 -0
  154. data/src/core/lib/iomgr/socket_factory_posix.h +90 -0
  155. data/src/core/lib/iomgr/socket_utils_common_posix.c +25 -9
  156. data/src/core/lib/iomgr/socket_utils_posix.h +7 -0
  157. data/src/core/lib/iomgr/tcp_client.h +0 -4
  158. data/src/core/lib/iomgr/tcp_client_posix.c +15 -31
  159. data/src/core/lib/iomgr/tcp_client_uv.c +10 -6
  160. data/src/core/lib/iomgr/tcp_client_windows.c +9 -19
  161. data/src/core/lib/iomgr/tcp_posix.c +111 -22
  162. data/src/core/lib/iomgr/tcp_posix.h +3 -4
  163. data/src/core/lib/iomgr/tcp_server_posix.c +39 -417
  164. data/src/core/lib/iomgr/tcp_server_utils_posix.h +135 -0
  165. data/src/core/lib/iomgr/tcp_server_utils_posix_common.c +221 -0
  166. data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c +196 -0
  167. data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c +49 -0
  168. data/src/core/lib/iomgr/tcp_server_uv.c +43 -16
  169. data/src/core/lib/iomgr/tcp_server_windows.c +10 -22
  170. data/src/core/lib/iomgr/tcp_uv.c +16 -13
  171. data/src/core/lib/iomgr/tcp_windows.c +24 -12
  172. data/src/core/lib/iomgr/tcp_windows.h +2 -2
  173. data/src/core/lib/iomgr/timer.h +3 -0
  174. data/src/core/lib/iomgr/timer_generic.c +257 -72
  175. data/src/core/lib/iomgr/timer_generic.h +1 -1
  176. data/src/core/lib/iomgr/timer_heap.c +8 -8
  177. data/src/core/lib/iomgr/udp_server.c +54 -24
  178. data/src/core/lib/iomgr/udp_server.h +7 -7
  179. data/src/core/lib/iomgr/unix_sockets_posix.c +1 -1
  180. data/src/core/lib/iomgr/unix_sockets_posix_noop.c +2 -1
  181. data/src/core/lib/iomgr/wakeup_fd_posix.h +1 -1
  182. data/src/core/lib/profiling/basic_timers.c +1 -1
  183. data/src/core/lib/security/credentials/credentials.h +1 -1
  184. data/src/core/lib/security/credentials/google_default/google_default_credentials.c +10 -9
  185. data/src/core/lib/security/credentials/jwt/json_token.c +1 -1
  186. data/src/core/lib/security/credentials/jwt/jwt_verifier.c +2 -2
  187. data/src/core/lib/security/transport/client_auth_filter.c +33 -26
  188. data/src/core/lib/security/transport/secure_endpoint.c +8 -5
  189. data/src/core/lib/security/transport/security_connector.c +37 -37
  190. data/src/core/lib/security/transport/security_connector.h +1 -1
  191. data/src/core/lib/security/transport/security_handshaker.c +15 -12
  192. data/src/core/lib/security/transport/server_auth_filter.c +20 -18
  193. data/src/core/lib/security/transport/tsi_error.c +5 -3
  194. data/src/core/lib/security/transport/tsi_error.h +1 -1
  195. data/src/core/lib/{security/util → slice}/b64.c +21 -6
  196. data/src/core/lib/{security/util → slice}/b64.h +16 -4
  197. data/src/core/lib/slice/slice.c +4 -2
  198. data/src/core/lib/slice/slice_buffer.c +16 -14
  199. data/src/core/lib/support/arena.c +98 -0
  200. data/src/core/{ext/client_channel/initial_connect_string.c → lib/support/arena.h} +17 -15
  201. data/src/core/{ext/client_channel/default_initial_connect_string.c → lib/support/atm.c} +14 -5
  202. data/src/core/lib/support/cpu_linux.c +5 -0
  203. data/src/core/lib/support/sync.c +4 -0
  204. data/src/core/lib/support/time.c +4 -10
  205. data/src/core/lib/support/wrap_memcpy.c +3 -1
  206. data/src/core/lib/surface/call.c +252 -221
  207. data/src/core/lib/surface/channel.c +72 -21
  208. data/src/core/lib/surface/channel.h +8 -0
  209. data/src/core/lib/surface/completion_queue.c +2 -3
  210. data/src/core/lib/surface/completion_queue_factory.c +77 -0
  211. data/src/core/lib/surface/completion_queue_factory.h +51 -0
  212. data/src/core/lib/surface/init_secure.c +3 -1
  213. data/src/core/lib/surface/lame_client.c +18 -14
  214. data/src/core/lib/surface/server.c +43 -41
  215. data/src/core/lib/surface/validate_metadata.c +8 -4
  216. data/src/core/lib/surface/version.c +2 -2
  217. data/src/core/lib/transport/bdp_estimator.h +1 -1
  218. data/src/core/lib/transport/connectivity_state.c +2 -1
  219. data/src/core/lib/transport/error_utils.c +17 -17
  220. data/src/core/lib/transport/error_utils.h +1 -1
  221. data/src/core/lib/transport/metadata_batch.c +6 -7
  222. data/src/core/lib/transport/pid_controller.c +1 -0
  223. data/src/core/lib/transport/service_config.c +12 -0
  224. data/src/core/lib/transport/service_config.h +6 -0
  225. data/src/core/lib/transport/transport.c +29 -17
  226. data/src/core/lib/transport/transport.h +85 -42
  227. data/src/core/lib/transport/transport_impl.h +5 -3
  228. data/src/core/lib/transport/transport_op_string.c +20 -14
  229. data/src/core/plugin_registry/grpc_plugin_registry.c +8 -0
  230. data/src/core/{lib/tsi → tsi}/fake_transport_security.c +2 -2
  231. data/src/core/{lib/tsi → tsi}/fake_transport_security.h +4 -4
  232. data/src/core/{lib/tsi → tsi}/ssl_transport_security.c +40 -79
  233. data/src/core/{lib/tsi → tsi}/ssl_transport_security.h +44 -21
  234. data/src/core/{lib/tsi → tsi}/ssl_types.h +3 -3
  235. data/src/core/{lib/tsi → tsi}/transport_security.c +2 -2
  236. data/src/core/{lib/tsi → tsi}/transport_security.h +4 -4
  237. data/src/core/{lib/tsi → tsi}/transport_security_interface.h +3 -3
  238. data/src/ruby/ext/grpc/extconf.rb +1 -0
  239. data/src/ruby/ext/grpc/rb_call_credentials.c +2 -2
  240. data/src/ruby/ext/grpc/rb_channel.c +520 -93
  241. data/src/ruby/ext/grpc/rb_channel.h +2 -0
  242. data/src/ruby/ext/grpc/rb_channel_credentials.c +3 -0
  243. data/src/ruby/ext/grpc/rb_compression_options.c +5 -2
  244. data/src/ruby/ext/grpc/rb_event_thread.c +6 -6
  245. data/src/ruby/ext/grpc/rb_grpc.c +29 -7
  246. data/src/ruby/ext/grpc/rb_grpc.h +2 -0
  247. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +10 -0
  248. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +15 -0
  249. data/src/ruby/ext/grpc/rb_server.c +5 -3
  250. data/src/ruby/lib/grpc/version.rb +1 -1
  251. data/src/ruby/spec/channel_connection_spec.rb +173 -0
  252. data/src/ruby/spec/channel_spec.rb +29 -0
  253. data/src/ruby/spec/generic/rpc_server_pool_spec.rb +27 -17
  254. data/third_party/cares/ares_build.h +264 -0
  255. data/third_party/cares/cares/ares.h +636 -0
  256. data/third_party/cares/cares/ares__close_sockets.c +61 -0
  257. data/third_party/cares/cares/ares__get_hostent.c +261 -0
  258. data/third_party/cares/cares/ares__read_line.c +73 -0
  259. data/third_party/cares/cares/ares__timeval.c +111 -0
  260. data/third_party/cares/cares/ares_cancel.c +63 -0
  261. data/third_party/cares/cares/ares_create_query.c +202 -0
  262. data/third_party/cares/cares/ares_data.c +221 -0
  263. data/third_party/cares/cares/ares_data.h +72 -0
  264. data/third_party/cares/cares/ares_destroy.c +108 -0
  265. data/third_party/cares/cares/ares_dns.h +103 -0
  266. data/third_party/cares/cares/ares_expand_name.c +205 -0
  267. data/third_party/cares/cares/ares_expand_string.c +70 -0
  268. data/third_party/cares/cares/ares_fds.c +59 -0
  269. data/third_party/cares/cares/ares_free_hostent.c +41 -0
  270. data/third_party/cares/cares/ares_free_string.c +25 -0
  271. data/third_party/cares/cares/ares_getenv.c +30 -0
  272. data/third_party/cares/cares/ares_getenv.h +26 -0
  273. data/third_party/cares/cares/ares_gethostbyaddr.c +294 -0
  274. data/third_party/cares/cares/ares_gethostbyname.c +518 -0
  275. data/third_party/cares/cares/ares_getnameinfo.c +422 -0
  276. data/third_party/cares/cares/ares_getopt.c +122 -0
  277. data/third_party/cares/cares/ares_getopt.h +53 -0
  278. data/third_party/cares/cares/ares_getsock.c +66 -0
  279. data/third_party/cares/cares/ares_inet_net_pton.h +25 -0
  280. data/third_party/cares/cares/ares_init.c +2146 -0
  281. data/third_party/cares/cares/ares_iphlpapi.h +221 -0
  282. data/third_party/cares/cares/ares_ipv6.h +78 -0
  283. data/third_party/cares/cares/ares_library_init.c +167 -0
  284. data/third_party/cares/cares/ares_library_init.h +42 -0
  285. data/third_party/cares/cares/ares_llist.c +63 -0
  286. data/third_party/cares/cares/ares_llist.h +39 -0
  287. data/third_party/cares/cares/ares_mkquery.c +24 -0
  288. data/third_party/cares/cares/ares_nowarn.c +260 -0
  289. data/third_party/cares/cares/ares_nowarn.h +61 -0
  290. data/third_party/cares/cares/ares_options.c +402 -0
  291. data/third_party/cares/cares/ares_parse_a_reply.c +264 -0
  292. data/third_party/cares/cares/ares_parse_aaaa_reply.c +264 -0
  293. data/third_party/cares/cares/ares_parse_mx_reply.c +170 -0
  294. data/third_party/cares/cares/ares_parse_naptr_reply.c +188 -0
  295. data/third_party/cares/cares/ares_parse_ns_reply.c +183 -0
  296. data/third_party/cares/cares/ares_parse_ptr_reply.c +219 -0
  297. data/third_party/cares/cares/ares_parse_soa_reply.c +133 -0
  298. data/third_party/cares/cares/ares_parse_srv_reply.c +179 -0
  299. data/third_party/cares/cares/ares_parse_txt_reply.c +220 -0
  300. data/third_party/cares/cares/ares_platform.c +11035 -0
  301. data/third_party/cares/cares/ares_platform.h +43 -0
  302. data/third_party/cares/cares/ares_private.h +363 -0
  303. data/third_party/cares/cares/ares_process.c +1359 -0
  304. data/third_party/cares/cares/ares_query.c +186 -0
  305. data/third_party/cares/cares/ares_rules.h +125 -0
  306. data/third_party/cares/cares/ares_search.c +316 -0
  307. data/third_party/cares/cares/ares_send.c +131 -0
  308. data/third_party/cares/cares/ares_setup.h +217 -0
  309. data/third_party/cares/cares/ares_strcasecmp.c +66 -0
  310. data/third_party/cares/cares/ares_strcasecmp.h +30 -0
  311. data/third_party/cares/cares/ares_strdup.c +49 -0
  312. data/third_party/cares/cares/ares_strdup.h +24 -0
  313. data/third_party/cares/cares/ares_strerror.c +56 -0
  314. data/third_party/cares/cares/ares_timeout.c +88 -0
  315. data/third_party/cares/cares/ares_version.c +11 -0
  316. data/third_party/cares/cares/ares_version.h +24 -0
  317. data/third_party/cares/cares/ares_writev.c +79 -0
  318. data/third_party/cares/cares/bitncmp.c +59 -0
  319. data/third_party/cares/cares/bitncmp.h +26 -0
  320. data/third_party/cares/cares/config-win32.h +377 -0
  321. data/third_party/cares/cares/inet_net_pton.c +450 -0
  322. data/third_party/cares/cares/inet_ntop.c +208 -0
  323. data/third_party/cares/cares/setup_once.h +554 -0
  324. data/third_party/cares/cares/windows_port.c +22 -0
  325. data/third_party/cares/config_darwin/ares_config.h +523 -0
  326. data/third_party/cares/config_linux/ares_config.h +524 -0
  327. metadata +164 -68
@@ -52,6 +52,7 @@
52
52
  #include <grpc/support/useful.h>
53
53
 
54
54
  #include "src/core/lib/iomgr/iomgr_internal.h"
55
+ #include "src/core/lib/iomgr/timer.h"
55
56
  #include "src/core/lib/iomgr/wakeup_fd_cv.h"
56
57
  #include "src/core/lib/iomgr/wakeup_fd_posix.h"
57
58
  #include "src/core/lib/profiling/timers.h"
@@ -451,14 +452,16 @@ static grpc_error *fd_shutdown_error(grpc_fd *fd) {
451
452
  if (!fd->shutdown) {
452
453
  return GRPC_ERROR_NONE;
453
454
  } else {
454
- return GRPC_ERROR_CREATE_REFERENCING("FD shutdown", &fd->shutdown_error, 1);
455
+ return GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
456
+ "FD shutdown", &fd->shutdown_error, 1);
455
457
  }
456
458
  }
457
459
 
458
460
  static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
459
461
  grpc_closure **st, grpc_closure *closure) {
460
462
  if (fd->shutdown) {
461
- grpc_closure_sched(exec_ctx, closure, GRPC_ERROR_CREATE("FD shutdown"));
463
+ grpc_closure_sched(exec_ctx, closure,
464
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("FD shutdown"));
462
465
  } else if (*st == CLOSURE_NOT_READY) {
463
466
  /* not ready ==> switch to a waiting state by setting the closure */
464
467
  *st = closure;
@@ -696,7 +699,7 @@ static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) {
696
699
  static void kick_append_error(grpc_error **composite, grpc_error *error) {
697
700
  if (error == GRPC_ERROR_NONE) return;
698
701
  if (*composite == GRPC_ERROR_NONE) {
699
- *composite = GRPC_ERROR_CREATE("Kick Failure");
702
+ *composite = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Kick Failure");
700
703
  }
701
704
  *composite = grpc_error_add_child(*composite, error);
702
705
  }
@@ -859,7 +862,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) {
859
862
  static void work_combine_error(grpc_error **composite, grpc_error *error) {
860
863
  if (error == GRPC_ERROR_NONE) return;
861
864
  if (*composite == GRPC_ERROR_NONE) {
862
- *composite = GRPC_ERROR_CREATE("pollset_work");
865
+ *composite = GRPC_ERROR_CREATE_FROM_STATIC_STRING("pollset_work");
863
866
  }
864
867
  *composite = grpc_error_add_child(*composite, error);
865
868
  }
@@ -868,7 +871,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
868
871
  grpc_pollset_worker **worker_hdl,
869
872
  gpr_timespec now, gpr_timespec deadline) {
870
873
  grpc_pollset_worker worker;
871
- *worker_hdl = &worker;
874
+ if (worker_hdl) *worker_hdl = &worker;
872
875
  grpc_error *error = GRPC_ERROR_NONE;
873
876
 
874
877
  /* Avoid malloc for small number of elements. */
@@ -1004,6 +1007,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
1004
1007
  }
1005
1008
  } else {
1006
1009
  if (pfds[0].revents & POLLIN_CHECK) {
1010
+ grpc_timer_consume_kick();
1007
1011
  work_combine_error(&error,
1008
1012
  grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd));
1009
1013
  }
@@ -1088,7 +1092,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
1088
1092
  gpr_mu_lock(&pollset->mu);
1089
1093
  }
1090
1094
  }
1091
- *worker_hdl = NULL;
1095
+ if (worker_hdl) *worker_hdl = NULL;
1092
1096
  GPR_TIMER_END("pollset_work", 0);
1093
1097
  GRPC_LOG_IF_ERROR("pollset_work", GRPC_ERROR_REF(error));
1094
1098
  return error;
@@ -1421,7 +1425,7 @@ static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) {
1421
1425
  g_cvfds.pollcount++;
1422
1426
  opt = gpr_thd_options_default();
1423
1427
  gpr_thd_options_set_detached(&opt);
1424
- gpr_thd_new(&t_id, &run_poll, pargs, &opt);
1428
+ GPR_ASSERT(gpr_thd_new(&t_id, &run_poll, pargs, &opt));
1425
1429
  // We want the poll() thread to trigger the deadline, so wait forever here
1426
1430
  gpr_cv_wait(pollcv, &g_cvfds.mu, gpr_inf_future(GPR_CLOCK_MONOTONIC));
1427
1431
  if (gpr_atm_no_barrier_load(&pargs->status) == COMPLETED) {
@@ -111,6 +111,12 @@ static void try_engine(const char *engine) {
111
111
  }
112
112
  }
113
113
 
114
+ /* This should be used for testing purposes ONLY */
115
+ void grpc_set_event_engine_test_only(
116
+ const grpc_event_engine_vtable *ev_engine) {
117
+ g_event_engine = ev_engine;
118
+ }
119
+
114
120
  /* Call this only after calling grpc_event_engine_init() */
115
121
  const char *grpc_get_poll_strategy_name() { return g_poll_strategy_name; }
116
122
 
@@ -183,4 +183,7 @@ void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx,
183
183
  typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int);
184
184
  extern grpc_poll_function_type grpc_poll_function;
185
185
 
186
+ /* This should be used for testing purposes ONLY */
187
+ void grpc_set_event_engine_test_only(const grpc_event_engine_vtable *);
188
+
186
189
  #endif /* GRPC_CORE_LIB_IOMGR_EV_POSIX_H */
@@ -73,6 +73,9 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) {
73
73
  grpc_closure *next = c->next_data.next;
74
74
  grpc_error *error = c->error_data.error;
75
75
  did_something = true;
76
+ #ifndef NDEBUG
77
+ c->scheduled = false;
78
+ #endif
76
79
  c->cb(exec_ctx, c->cb_arg, error);
77
80
  GRPC_ERROR_UNREF(error);
78
81
  c = next;
@@ -93,6 +96,9 @@ void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) {
93
96
 
94
97
  static void exec_ctx_run(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
95
98
  grpc_error *error) {
99
+ #ifndef NDEBUG
100
+ closure->scheduled = false;
101
+ #endif
96
102
  closure->cb(exec_ctx, closure->cb_arg, error);
97
103
  GRPC_ERROR_UNREF(error);
98
104
  }
@@ -83,6 +83,9 @@ static void closure_exec_thread_func(void *ignored) {
83
83
  while (c != NULL) {
84
84
  grpc_closure *next = c->next_data.next;
85
85
  grpc_error *error = c->error_data.error;
86
+ #ifndef NDEBUG
87
+ c->scheduled = false;
88
+ #endif
86
89
  c->cb(&exec_ctx, c->cb_arg, error);
87
90
  GRPC_ERROR_UNREF(error);
88
91
  c = next;
@@ -115,8 +118,8 @@ static void maybe_spawn_locked() {
115
118
  /* All previous instances of the thread should have been joined at this point.
116
119
  * Spawn time! */
117
120
  g_executor.busy = 1;
118
- gpr_thd_new(&g_executor.tid, closure_exec_thread_func, NULL,
119
- &g_executor.options);
121
+ GPR_ASSERT(gpr_thd_new(&g_executor.tid, closure_exec_thread_func, NULL,
122
+ &g_executor.options));
120
123
  g_executor.pending_join = 1;
121
124
  }
122
125
 
@@ -146,6 +149,9 @@ void grpc_executor_shutdown(grpc_exec_ctx *exec_ctx) {
146
149
  while (c != NULL) {
147
150
  grpc_closure *next = c->next_data.next;
148
151
  grpc_error *error = c->error_data.error;
152
+ #ifndef NDEBUG
153
+ c->scheduled = false;
154
+ #endif
149
155
  c->cb(exec_ctx, c->cb_arg, error);
150
156
  GRPC_ERROR_UNREF(error);
151
157
  c = next;
@@ -78,9 +78,12 @@ end:
78
78
  *output = result;
79
79
  if (file != NULL) fclose(file);
80
80
  if (error != GRPC_ERROR_NONE) {
81
- grpc_error *error_out = grpc_error_set_str(
82
- GRPC_ERROR_CREATE_REFERENCING("Failed to load file", &error, 1),
83
- GRPC_ERROR_STR_FILENAME, filename);
81
+ grpc_error *error_out =
82
+ grpc_error_set_str(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
83
+ "Failed to load file", &error, 1),
84
+ GRPC_ERROR_STR_FILENAME,
85
+ grpc_slice_from_copied_string(
86
+ filename)); // TODO(ncteisen), always static?
84
87
  GRPC_ERROR_UNREF(error);
85
88
  error = error_out;
86
89
  }
@@ -0,0 +1,238 @@
1
+ /*
2
+ *
3
+ * Copyright 2017, Google Inc.
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are
8
+ * met:
9
+ *
10
+ * * Redistributions of source code must retain the above copyright
11
+ * notice, this list of conditions and the following disclaimer.
12
+ * * Redistributions in binary form must reproduce the above
13
+ * copyright notice, this list of conditions and the following disclaimer
14
+ * in the documentation and/or other materials provided with the
15
+ * distribution.
16
+ * * Neither the name of Google Inc. nor the names of its
17
+ * contributors may be used to endorse or promote products derived from
18
+ * this software without specific prior written permission.
19
+ *
20
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ *
32
+ */
33
+
34
+ #include "src/core/lib/iomgr/lockfree_event.h"
35
+
36
+ #include <grpc/support/log.h>
37
+
38
+ /* 'state' holds the to call when the fd is readable or writable respectively.
39
+ It can contain one of the following values:
40
+ CLOSURE_READY : The fd has an I/O event of interest but there is no
41
+ closure yet to execute
42
+
43
+ CLOSURE_NOT_READY : The fd has no I/O event of interest
44
+
45
+ closure ptr : The closure to be executed when the fd has an I/O
46
+ event of interest
47
+
48
+ shutdown_error | FD_SHUTDOWN_BIT :
49
+ 'shutdown_error' field ORed with FD_SHUTDOWN_BIT.
50
+ This indicates that the fd is shutdown. Since all
51
+ memory allocations are word-aligned, the lower two
52
+ bits of the shutdown_error pointer are always 0. So
53
+ it is safe to OR these with FD_SHUTDOWN_BIT
54
+
55
+ Valid state transitions:
56
+
57
+ <closure ptr> <-----3------ CLOSURE_NOT_READY ----1----> CLOSURE_READY
58
+ | | ^ | ^ | |
59
+ | | | | | | |
60
+ | +--------------4----------+ 6 +---------2---------------+ |
61
+ | | |
62
+ | v |
63
+ +-----5-------> [shutdown_error | FD_SHUTDOWN_BIT] <----7---------+
64
+
65
+ For 1, 4 : See grpc_lfev_set_ready() function
66
+ For 2, 3 : See grpc_lfev_notify_on() function
67
+ For 5,6,7: See grpc_lfev_set_shutdown() function */
68
+
69
+ #define CLOSURE_NOT_READY ((gpr_atm)0)
70
+ #define CLOSURE_READY ((gpr_atm)2)
71
+
72
+ #define FD_SHUTDOWN_BIT ((gpr_atm)1)
73
+
74
+ void grpc_lfev_init(gpr_atm *state) {
75
+ gpr_atm_no_barrier_store(state, CLOSURE_NOT_READY);
76
+ }
77
+
78
+ void grpc_lfev_destroy(gpr_atm *state) {
79
+ gpr_atm curr = gpr_atm_no_barrier_load(state);
80
+ if (curr & FD_SHUTDOWN_BIT) {
81
+ GRPC_ERROR_UNREF((grpc_error *)(curr & ~FD_SHUTDOWN_BIT));
82
+ } else {
83
+ GPR_ASSERT(curr == CLOSURE_NOT_READY || curr == CLOSURE_READY);
84
+ }
85
+ }
86
+
87
+ bool grpc_lfev_is_shutdown(gpr_atm *state) {
88
+ gpr_atm curr = gpr_atm_no_barrier_load(state);
89
+ return (curr & FD_SHUTDOWN_BIT) != 0;
90
+ }
91
+
92
+ void grpc_lfev_notify_on(grpc_exec_ctx *exec_ctx, gpr_atm *state,
93
+ grpc_closure *closure) {
94
+ while (true) {
95
+ gpr_atm curr = gpr_atm_no_barrier_load(state);
96
+ switch (curr) {
97
+ case CLOSURE_NOT_READY: {
98
+ /* CLOSURE_NOT_READY -> <closure>.
99
+
100
+ We're guaranteed by API that there's an acquire barrier before here,
101
+ so there's no need to double-dip and this can be a release-only.
102
+
103
+ The release itself pairs with the acquire half of a set_ready full
104
+ barrier. */
105
+ if (gpr_atm_rel_cas(state, CLOSURE_NOT_READY, (gpr_atm)closure)) {
106
+ return; /* Successful. Return */
107
+ }
108
+
109
+ break; /* retry */
110
+ }
111
+
112
+ case CLOSURE_READY: {
113
+ /* Change the state to CLOSURE_NOT_READY. Schedule the closure if
114
+ successful. If not, the state most likely transitioned to shutdown.
115
+ We should retry.
116
+
117
+ This can be a no-barrier cas since the state is being transitioned to
118
+ CLOSURE_NOT_READY; set_ready and set_shutdown do not schedule any
119
+ closure when transitioning out of CLOSURE_NO_READY state (i.e there
120
+ is no other code that needs to 'happen-after' this) */
121
+ if (gpr_atm_no_barrier_cas(state, CLOSURE_READY, CLOSURE_NOT_READY)) {
122
+ grpc_closure_sched(exec_ctx, closure, GRPC_ERROR_NONE);
123
+ return; /* Successful. Return */
124
+ }
125
+
126
+ break; /* retry */
127
+ }
128
+
129
+ default: {
130
+ /* 'curr' is either a closure or the fd is shutdown(in which case 'curr'
131
+ contains a pointer to the shutdown-error). If the fd is shutdown,
132
+ schedule the closure with the shutdown error */
133
+ if ((curr & FD_SHUTDOWN_BIT) > 0) {
134
+ grpc_error *shutdown_err = (grpc_error *)(curr & ~FD_SHUTDOWN_BIT);
135
+ grpc_closure_sched(exec_ctx, closure,
136
+ GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
137
+ "FD Shutdown", &shutdown_err, 1));
138
+ return;
139
+ }
140
+
141
+ /* There is already a closure!. This indicates a bug in the code */
142
+ gpr_log(GPR_ERROR,
143
+ "notify_on called with a previous callback still pending");
144
+ abort();
145
+ }
146
+ }
147
+ }
148
+
149
+ GPR_UNREACHABLE_CODE(return );
150
+ }
151
+
152
+ bool grpc_lfev_set_shutdown(grpc_exec_ctx *exec_ctx, gpr_atm *state,
153
+ grpc_error *shutdown_err) {
154
+ gpr_atm new_state = (gpr_atm)shutdown_err | FD_SHUTDOWN_BIT;
155
+
156
+ while (true) {
157
+ gpr_atm curr = gpr_atm_no_barrier_load(state);
158
+ switch (curr) {
159
+ case CLOSURE_READY:
160
+ case CLOSURE_NOT_READY:
161
+ /* Need a full barrier here so that the initial load in notify_on
162
+ doesn't need a barrier */
163
+ if (gpr_atm_full_cas(state, curr, new_state)) {
164
+ return true; /* early out */
165
+ }
166
+ break; /* retry */
167
+
168
+ default: {
169
+ /* 'curr' is either a closure or the fd is already shutdown */
170
+
171
+ /* If fd is already shutdown, we are done */
172
+ if ((curr & FD_SHUTDOWN_BIT) > 0) {
173
+ GRPC_ERROR_UNREF(shutdown_err);
174
+ return false;
175
+ }
176
+
177
+ /* Fd is not shutdown. Schedule the closure and move the state to
178
+ shutdown state.
179
+ Needs an acquire to pair with setting the closure (and get a
180
+ happens-after on that edge), and a release to pair with anything
181
+ loading the shutdown state. */
182
+ if (gpr_atm_full_cas(state, curr, new_state)) {
183
+ grpc_closure_sched(exec_ctx, (grpc_closure *)curr,
184
+ GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
185
+ "FD Shutdown", &shutdown_err, 1));
186
+ return true;
187
+ }
188
+
189
+ /* 'curr' was a closure but now changed to a different state. We will
190
+ have to retry */
191
+ break;
192
+ }
193
+ }
194
+ }
195
+
196
+ GPR_UNREACHABLE_CODE(return false);
197
+ }
198
+
199
+ void grpc_lfev_set_ready(grpc_exec_ctx *exec_ctx, gpr_atm *state) {
200
+ while (true) {
201
+ gpr_atm curr = gpr_atm_no_barrier_load(state);
202
+
203
+ switch (curr) {
204
+ case CLOSURE_READY: {
205
+ /* Already ready. We are done here */
206
+ return;
207
+ }
208
+
209
+ case CLOSURE_NOT_READY: {
210
+ /* No barrier required as we're transitioning to a state that does not
211
+ involve a closure */
212
+ if (gpr_atm_no_barrier_cas(state, CLOSURE_NOT_READY, CLOSURE_READY)) {
213
+ return; /* early out */
214
+ }
215
+ break; /* retry */
216
+ }
217
+
218
+ default: {
219
+ /* 'curr' is either a closure or the fd is shutdown */
220
+ if ((curr & FD_SHUTDOWN_BIT) > 0) {
221
+ /* The fd is shutdown. Do nothing */
222
+ return;
223
+ }
224
+ /* Full cas: acquire pairs with this cas' release in the event of a
225
+ spurious set_ready; release pairs with this or the acquire in
226
+ notify_on (or set_shutdown) */
227
+ else if (gpr_atm_full_cas(state, curr, CLOSURE_NOT_READY)) {
228
+ grpc_closure_sched(exec_ctx, (grpc_closure *)curr, GRPC_ERROR_NONE);
229
+ return;
230
+ }
231
+ /* else the state changed again (only possible by either a racing
232
+ set_ready or set_shutdown functions. In both these cases, the closure
233
+ would have been scheduled for execution. So we are done here */
234
+ return;
235
+ }
236
+ }
237
+ }
238
+ }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  *
3
- * Copyright 2015, Google Inc.
3
+ * Copyright 2017, Google Inc.
4
4
  * All rights reserved.
5
5
  *
6
6
  * Redistribution and use in source and binary forms, with or without
@@ -31,20 +31,24 @@
31
31
  *
32
32
  */
33
33
 
34
- #ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H
35
- #define GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H
34
+ #ifndef GRPC_CORE_LIB_IOMGR_LOCKFREE_EVENT_H
35
+ #define GRPC_CORE_LIB_IOMGR_LOCKFREE_EVENT_H
36
36
 
37
- #include <grpc/slice.h>
38
- #include "src/core/lib/iomgr/resolve_address.h"
37
+ /* Lock free event notification for file descriptors */
39
38
 
40
- typedef void (*grpc_set_initial_connect_string_func)(
41
- grpc_resolved_address **addr, grpc_slice *initial_str);
39
+ #include <grpc/support/atm.h>
42
40
 
43
- void grpc_test_set_initial_connect_string_function(
44
- grpc_set_initial_connect_string_func func);
41
+ #include "src/core/lib/iomgr/exec_ctx.h"
45
42
 
46
- /** Set a string to be sent once connected. Optionally reset addr. */
47
- void grpc_set_initial_connect_string(grpc_resolved_address **addr,
48
- grpc_slice *connect_string);
43
+ void grpc_lfev_init(gpr_atm *state);
44
+ void grpc_lfev_destroy(gpr_atm *state);
45
+ bool grpc_lfev_is_shutdown(gpr_atm *state);
49
46
 
50
- #endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H */
47
+ void grpc_lfev_notify_on(grpc_exec_ctx *exec_ctx, gpr_atm *state,
48
+ grpc_closure *closure);
49
+ /* Returns true on first successful shutdown */
50
+ bool grpc_lfev_set_shutdown(grpc_exec_ctx *exec_ctx, gpr_atm *state,
51
+ grpc_error *shutdown_err);
52
+ void grpc_lfev_set_ready(grpc_exec_ctx *exec_ctx, gpr_atm *state);
53
+
54
+ #endif /* GRPC_CORE_LIB_IOMGR_LOCKFREE_EVENT_H */