grpc 1.73.0 → 1.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +38 -17
- data/include/grpc/create_channel_from_endpoint.h +54 -0
- data/include/grpc/credentials.h +11 -5
- data/include/grpc/event_engine/event_engine.h +74 -17
- data/include/grpc/grpc_posix.h +20 -1
- data/include/grpc/impl/channel_arg_names.h +2 -4
- data/include/grpc/module.modulemap +1 -0
- data/include/grpc/support/json.h +24 -0
- data/src/core/call/interception_chain.h +7 -11
- data/src/core/channelz/channel_trace.cc +213 -115
- data/src/core/channelz/channel_trace.h +380 -86
- data/src/core/channelz/channelz.cc +270 -181
- data/src/core/channelz/channelz.h +168 -55
- data/src/core/channelz/channelz_registry.cc +2 -1
- data/src/core/channelz/channelz_registry.h +24 -0
- data/src/core/channelz/property_list.cc +357 -0
- data/src/core/channelz/property_list.h +202 -0
- data/src/core/channelz/ztrace_collector.h +3 -2
- data/src/core/client_channel/backup_poller.cc +17 -2
- data/src/core/client_channel/client_channel.cc +17 -28
- data/src/core/client_channel/client_channel_filter.cc +19 -29
- data/src/core/client_channel/config_selector.h +8 -2
- data/src/core/client_channel/dynamic_filters.cc +5 -6
- data/src/core/client_channel/dynamic_filters.h +1 -1
- data/src/core/client_channel/global_subchannel_pool.cc +4 -1
- data/src/core/client_channel/retry_filter.cc +21 -27
- data/src/core/client_channel/retry_filter.h +10 -7
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +5 -5
- data/src/core/client_channel/retry_filter_legacy_call_data.h +1 -1
- data/src/core/client_channel/retry_interceptor.cc +30 -44
- data/src/core/client_channel/retry_interceptor.h +18 -17
- data/src/core/client_channel/retry_throttle.cc +46 -61
- data/src/core/client_channel/retry_throttle.h +17 -39
- data/src/core/client_channel/subchannel.cc +43 -19
- data/src/core/client_channel/subchannel.h +8 -0
- data/src/core/config/config_vars.cc +2 -0
- data/src/core/config/core_configuration.cc +1 -0
- data/src/core/config/core_configuration.h +11 -0
- data/src/core/credentials/call/call_creds_registry.h +125 -0
- data/src/core/credentials/call/call_creds_registry_init.cc +91 -0
- data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +6 -48
- data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.cc +86 -0
- data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.h +74 -0
- data/src/core/credentials/call/jwt_util.cc +70 -0
- data/src/core/credentials/call/jwt_util.h +32 -0
- data/src/core/credentials/transport/channel_creds_registry_init.cc +1 -1
- data/src/core/credentials/transport/google_default/google_default_credentials.cc +72 -4
- data/src/core/credentials/transport/ssl/ssl_credentials.cc +0 -1
- data/src/core/credentials/transport/tls/load_system_roots_supported.cc +1 -0
- data/src/core/credentials/transport/xds/xds_credentials.cc +0 -3
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +8 -8
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +16 -16
- data/src/core/ext/filters/http/client_authority_filter.cc +2 -4
- data/src/core/ext/filters/http/message_compress/compression_filter.h +25 -22
- data/src/core/ext/filters/http/server/http_server_filter.h +12 -11
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +120 -35
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +6 -5
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +162 -115
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +0 -3
- data/src/core/ext/transport/chttp2/transport/decode_huff.cc +1239 -3514
- data/src/core/ext/transport/chttp2/transport/decode_huff.h +1008 -1486
- data/src/core/ext/transport/chttp2/transport/flow_control.h +22 -17
- data/src/core/ext/transport/chttp2/transport/frame.cc +10 -0
- data/src/core/ext/transport/chttp2/transport/frame.h +2 -2
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +7 -8
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +4 -5
- data/src/core/ext/transport/chttp2/transport/header_assembler.h +299 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +11 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +12 -1
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +1017 -0
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +593 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +19 -22
- data/{third_party/abseil-cpp/absl/strings/cord_buffer.cc → src/core/ext/transport/chttp2/transport/http2_stats_collector.cc} +14 -14
- data/src/core/ext/transport/chttp2/transport/http2_stats_collector.h +33 -0
- data/src/core/ext/transport/chttp2/transport/http2_status.h +6 -1
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +43 -0
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +65 -0
- data/src/core/ext/transport/chttp2/transport/http2_ztrace_collector.h +0 -29
- data/src/core/ext/transport/chttp2/transport/internal.h +18 -8
- data/src/core/ext/transport/chttp2/transport/keepalive.cc +105 -0
- data/src/core/ext/transport/chttp2/transport/keepalive.h +138 -0
- data/src/core/ext/transport/chttp2/transport/message_assembler.h +185 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +2 -4
- data/src/core/ext/transport/chttp2/transport/ping_callbacks.h +19 -0
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +151 -0
- data/src/core/ext/transport/chttp2/transport/ping_promise.h +180 -0
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +5 -9
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.h +11 -0
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +39 -1
- data/src/core/ext/transport/chttp2/transport/transport_common.cc +19 -0
- data/src/core/ext/transport/chttp2/transport/transport_common.h +27 -0
- data/src/core/ext/transport/chttp2/transport/writing.cc +37 -11
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb.h +571 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.c +120 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.h +36 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb.h +1272 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.c +312 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.h +50 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb.h +984 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.c +226 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.h +44 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.c +175 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.h +82 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.c +135 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.h +67 -0
- data/src/core/filter/auth/auth_filters.h +0 -25
- data/src/core/filter/auth/client_auth_filter.cc +0 -118
- data/src/core/filter/filter_args.h +9 -23
- data/src/core/handshaker/handshaker.cc +23 -14
- data/src/core/handshaker/handshaker.h +3 -0
- data/src/core/handshaker/http_connect/http_connect_handshaker.cc +3 -1
- data/src/core/handshaker/security/legacy_secure_endpoint.cc +6 -5
- data/src/core/handshaker/security/secure_endpoint.cc +70 -25
- data/src/core/handshaker/security/security_handshaker.cc +4 -1
- data/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +7 -1
- data/src/core/lib/channel/channel_args.cc +15 -0
- data/src/core/lib/channel/channel_args.h +3 -0
- data/src/core/lib/channel/channel_stack.cc +22 -23
- data/src/core/lib/channel/channel_stack.h +9 -7
- data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -1
- data/src/core/lib/channel/channel_stack_builder_impl.h +2 -7
- data/src/core/lib/channel/promise_based_filter.h +5 -5
- data/src/core/lib/debug/trace_impl.h +0 -1
- data/src/core/lib/event_engine/ares_resolver.cc +165 -46
- data/src/core/lib/event_engine/ares_resolver.h +48 -2
- data/src/core/lib/event_engine/cf_engine/cf_engine.cc +3 -1
- data/src/core/lib/event_engine/cf_engine/cf_engine.h +1 -4
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +2 -6
- data/src/core/lib/event_engine/endpoint_channel_arg_wrapper.cc +40 -0
- data/src/core/lib/event_engine/endpoint_channel_arg_wrapper.h +60 -0
- data/src/core/lib/event_engine/event_engine.cc +7 -0
- data/src/core/lib/event_engine/extensions/channelz.h +10 -6
- data/src/core/lib/event_engine/grpc_polled_fd.h +5 -0
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +130 -162
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +11 -15
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +75 -117
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +7 -9
- data/src/core/lib/event_engine/posix_engine/event_poller.h +18 -15
- data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc +0 -18
- data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.cc +124 -0
- data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.h +243 -0
- data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +29 -19
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.cc +6 -2
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.h +6 -1
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +145 -92
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +9 -19
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +333 -116
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +61 -18
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +45 -37
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +6 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +32 -142
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +6 -5
- data/src/core/lib/event_engine/posix_engine/posix_interface.h +211 -0
- data/src/core/lib/event_engine/posix_engine/posix_interface_posix.cc +1083 -0
- data/src/core/lib/event_engine/posix_engine/posix_interface_windows.cc +281 -0
- data/src/core/lib/event_engine/posix_engine/posix_write_event_sink.cc +154 -0
- data/src/core/lib/event_engine/posix_engine/posix_write_event_sink.h +174 -0
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +3 -719
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +10 -170
- data/src/core/lib/event_engine/posix_engine/timer_manager.cc +33 -22
- data/src/core/lib/event_engine/posix_engine/timer_manager.h +13 -11
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc +117 -151
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +26 -94
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc +26 -25
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h +6 -2
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +36 -62
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h +6 -2
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h +7 -6
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc +12 -6
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h +3 -1
- data/src/core/lib/event_engine/shim.cc +9 -0
- data/src/core/lib/event_engine/shim.h +3 -0
- data/src/core/lib/event_engine/thread_pool/thread_pool.h +7 -3
- data/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +0 -17
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +4 -2
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +3 -2
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +4 -0
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h +4 -0
- data/src/core/lib/event_engine/windows/windows_endpoint.h +2 -6
- data/src/core/lib/event_engine/windows/windows_engine.cc +0 -1
- data/src/core/lib/event_engine/windows/windows_engine.h +1 -3
- data/src/core/lib/event_engine/windows/windows_listener.cc +14 -2
- data/src/core/lib/experiments/experiments.cc +45 -93
- data/src/core/lib/experiments/experiments.h +21 -51
- data/src/core/lib/iomgr/endpoint.cc +4 -3
- data/src/core/lib/iomgr/endpoint.h +7 -4
- data/src/core/lib/iomgr/endpoint_cfstream.cc +3 -2
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +7 -2
- data/src/core/lib/iomgr/ev_poll_posix.cc +7 -2
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +4 -6
- data/src/core/lib/iomgr/tcp_posix.cc +12 -6
- data/src/core/lib/iomgr/tcp_windows.cc +3 -2
- data/src/core/lib/promise/activity.h +1 -0
- data/src/core/lib/promise/arena_promise.h +23 -7
- data/src/core/lib/promise/detail/promise_factory.h +10 -0
- data/src/core/lib/promise/detail/promise_like.h +118 -11
- data/src/core/lib/promise/detail/promise_variant.h +50 -0
- data/src/core/lib/promise/detail/seq_state.h +687 -548
- data/src/core/lib/promise/if.h +20 -0
- data/src/core/lib/promise/inter_activity_latch.h +147 -0
- data/src/core/lib/promise/inter_activity_mutex.h +547 -0
- data/src/core/lib/promise/loop.h +65 -3
- data/src/core/lib/promise/map.h +24 -0
- data/src/core/lib/promise/match_promise.h +103 -0
- data/src/core/lib/promise/mpsc.cc +425 -0
- data/src/core/lib/promise/mpsc.h +490 -0
- data/src/core/lib/promise/party.cc +50 -1
- data/src/core/lib/promise/party.h +66 -1
- data/src/core/lib/promise/race.h +31 -0
- data/src/core/lib/promise/seq.h +4 -1
- data/src/core/lib/promise/status_flag.h +7 -0
- data/src/core/lib/promise/try_seq.h +4 -1
- data/src/core/lib/promise/wait_set.cc +28 -0
- data/src/core/lib/promise/wait_set.h +86 -0
- data/src/core/lib/resource_quota/arena.h +19 -0
- data/src/core/lib/slice/slice.h +5 -0
- data/src/core/lib/surface/channel_create.cc +88 -13
- data/src/core/lib/surface/channel_create.h +4 -0
- data/src/core/lib/surface/channel_init.cc +164 -47
- data/src/core/lib/surface/channel_init.h +64 -1
- data/src/core/lib/surface/filter_stack_call.cc +18 -9
- data/src/core/lib/surface/init.cc +6 -15
- data/src/core/lib/surface/legacy_channel.cc +3 -5
- data/src/core/lib/surface/legacy_channel.h +3 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/promise_endpoint.cc +110 -0
- data/src/core/lib/transport/promise_endpoint.h +307 -0
- data/src/core/load_balancing/child_policy_handler.cc +2 -4
- data/src/core/load_balancing/delegating_helper.h +2 -3
- data/src/core/load_balancing/health_check_client.cc +1 -5
- data/src/core/load_balancing/lb_policy.h +1 -3
- data/src/core/load_balancing/oob_backend_metric.cc +1 -5
- data/src/core/load_balancing/pick_first/pick_first.cc +3 -0
- data/src/core/load_balancing/xds/cds.cc +10 -1
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +2 -0
- data/src/core/resolver/xds/xds_config.cc +6 -3
- data/src/core/resolver/xds/xds_config.h +9 -4
- data/src/core/resolver/xds/xds_dependency_manager.cc +21 -6
- data/src/core/resolver/xds/xds_dependency_manager.h +2 -1
- data/src/core/resolver/xds/xds_resolver.cc +31 -11
- data/src/core/server/server.cc +83 -12
- data/src/core/server/server.h +21 -2
- data/src/core/server/xds_server_config_fetcher.cc +63 -25
- data/src/core/service_config/service_config.h +1 -1
- data/src/core/service_config/service_config_impl.h +1 -1
- data/src/core/telemetry/context_list_entry.cc +38 -0
- data/src/core/telemetry/context_list_entry.h +42 -12
- data/src/core/telemetry/stats_data.cc +233 -207
- data/src/core/telemetry/stats_data.h +250 -153
- data/src/core/telemetry/tcp_tracer.h +1 -1
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +11 -3
- data/src/core/tsi/fake_transport_security.cc +17 -0
- data/src/core/tsi/ssl_transport_security.cc +2 -0
- data/src/core/tsi/transport_security_grpc.cc +8 -0
- data/src/core/tsi/transport_security_grpc.h +15 -0
- data/src/core/util/backoff.cc +1 -5
- data/src/core/util/backoff.h +1 -0
- data/src/core/util/down_cast.h +1 -1
- data/src/core/util/function_signature.h +15 -1
- data/src/core/util/http_client/httpcli.cc +12 -5
- data/src/core/util/http_client/httpcli.h +4 -1
- data/src/core/util/latent_see.h +8 -5
- data/src/core/util/log.cc +4 -0
- data/src/core/util/memory_usage.h +268 -0
- data/src/core/util/per_cpu.cc +2 -0
- data/src/core/util/per_cpu.h +7 -0
- data/src/core/util/shared_bit_gen.h +20 -0
- data/src/core/util/single_set_ptr.h +2 -2
- data/src/core/util/upb_utils.h +42 -0
- data/src/core/util/uri.cc +3 -2
- data/src/core/util/useful.h +53 -2
- data/src/core/util/wait_for_single_owner.cc +31 -0
- data/src/core/util/wait_for_single_owner.h +24 -0
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -0
- data/src/core/xds/grpc/xds_bootstrap_grpc.h +5 -0
- data/src/core/xds/grpc/xds_client_grpc.cc +6 -2
- data/src/core/xds/grpc/xds_common_types_parser.cc +138 -50
- data/src/core/xds/grpc/xds_common_types_parser.h +12 -0
- data/src/core/xds/grpc/xds_http_filter.h +7 -0
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +22 -0
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +3 -0
- data/src/core/xds/grpc/xds_route_config_parser.cc +15 -38
- data/src/core/xds/grpc/xds_server_grpc.cc +63 -13
- data/src/core/xds/grpc/xds_server_grpc.h +10 -2
- data/src/core/xds/grpc/xds_server_grpc_interface.h +4 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +18 -0
- data/src/core/xds/xds_client/xds_bootstrap.h +2 -0
- data/src/core/xds/xds_client/xds_client.cc +26 -5
- data/src/ruby/ext/grpc/extconf.rb +2 -0
- data/src/ruby/ext/grpc/rb_call.c +1 -8
- data/src/ruby/ext/grpc/rb_channel.c +72 -568
- data/src/ruby/ext/grpc/rb_channel.h +0 -3
- data/src/ruby/ext/grpc/rb_completion_queue.c +26 -14
- data/src/ruby/ext/grpc/rb_completion_queue.h +1 -7
- data/src/ruby/ext/grpc/rb_grpc.c +9 -5
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +1 -1
- data/src/ruby/ext/grpc/rb_loader.c +0 -4
- data/src/ruby/ext/grpc/rb_server.c +31 -50
- data/src/ruby/lib/grpc/generic/client_stub.rb +4 -4
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/core_spec.rb +22 -0
- data/src/ruby/spec/generic/active_call_spec.rb +1 -1
- data/third_party/abseil-cpp/absl/algorithm/container.h +2 -19
- data/third_party/abseil-cpp/absl/base/attributes.h +76 -7
- data/third_party/abseil-cpp/absl/base/call_once.h +11 -12
- data/third_party/abseil-cpp/absl/base/config.h +20 -129
- data/third_party/abseil-cpp/absl/base/{internal/fast_type_id.h → fast_type_id.h} +11 -16
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +0 -5
- data/third_party/abseil-cpp/absl/base/internal/cycleclock_config.h +7 -7
- data/third_party/abseil-cpp/absl/base/internal/endian.h +34 -38
- data/third_party/abseil-cpp/absl/base/internal/iterator_traits.h +71 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +6 -5
- data/third_party/abseil-cpp/absl/base/internal/{nullability_impl.h → nullability_deprecated.h} +45 -8
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +0 -9
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +3 -13
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +6 -6
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +8 -3
- data/third_party/abseil-cpp/absl/base/no_destructor.h +11 -32
- data/third_party/abseil-cpp/absl/base/nullability.h +84 -72
- data/third_party/abseil-cpp/absl/base/options.h +3 -80
- data/third_party/abseil-cpp/absl/base/policy_checks.h +7 -7
- data/third_party/abseil-cpp/absl/cleanup/cleanup.h +1 -3
- data/third_party/abseil-cpp/absl/cleanup/internal/cleanup.h +3 -4
- data/third_party/abseil-cpp/absl/container/btree_map.h +4 -2
- data/third_party/abseil-cpp/absl/container/btree_set.h +4 -2
- data/third_party/abseil-cpp/absl/container/fixed_array.h +7 -14
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +5 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +6 -1
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +8 -5
- data/third_party/abseil-cpp/absl/container/internal/btree.h +132 -29
- data/third_party/abseil-cpp/absl/container/internal/btree_container.h +175 -71
- data/third_party/abseil-cpp/absl/container/internal/common.h +43 -0
- data/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h +1 -2
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +9 -10
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +1 -8
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +0 -4
- data/third_party/abseil-cpp/absl/container/internal/hashtable_control_bytes.h +527 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +20 -4
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +31 -12
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +2 -7
- data/third_party/abseil-cpp/absl/container/internal/layout.h +26 -42
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +199 -68
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +1354 -183
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +881 -1424
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl.h +80 -0
- data/third_party/abseil-cpp/absl/crc/crc32c.cc +0 -4
- data/third_party/abseil-cpp/absl/crc/crc32c.h +7 -5
- data/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +0 -22
- data/third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +45 -74
- data/third_party/abseil-cpp/absl/debugging/internal/addresses.h +57 -0
- data/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc +1 -1
- data/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h +5 -5
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +8 -35
- data/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc +16 -16
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +40 -37
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +16 -7
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +14 -5
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +10 -4
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +27 -16
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +13 -4
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +4 -3
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +15 -28
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +19 -9
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +144 -27
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +73 -5
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +19 -9
- data/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +3 -2
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +25 -6
- data/third_party/abseil-cpp/absl/flags/commandlineflag.h +2 -2
- data/third_party/abseil-cpp/absl/flags/flag.h +4 -3
- data/third_party/abseil-cpp/absl/flags/internal/commandlineflag.h +2 -2
- data/third_party/abseil-cpp/absl/flags/internal/flag.cc +2 -1
- data/third_party/abseil-cpp/absl/flags/internal/flag.h +7 -6
- data/third_party/abseil-cpp/absl/flags/internal/registry.h +4 -3
- data/third_party/abseil-cpp/absl/flags/reflection.cc +2 -3
- data/third_party/abseil-cpp/absl/functional/any_invocable.h +8 -10
- data/third_party/abseil-cpp/absl/functional/function_ref.h +2 -9
- data/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +110 -226
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +10 -12
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +2 -5
- data/third_party/abseil-cpp/absl/hash/hash.h +18 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +1 -5
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +86 -61
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc +25 -68
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.h +2 -6
- data/third_party/abseil-cpp/absl/hash/internal/weakly_mixed_integer.h +38 -0
- data/third_party/abseil-cpp/absl/log/check.h +2 -1
- data/third_party/abseil-cpp/absl/log/globals.h +4 -5
- data/third_party/abseil-cpp/absl/log/internal/append_truncated.h +28 -0
- data/third_party/abseil-cpp/absl/log/internal/check_op.cc +22 -22
- data/third_party/abseil-cpp/absl/log/internal/check_op.h +65 -62
- data/third_party/abseil-cpp/absl/log/internal/conditions.cc +5 -3
- data/third_party/abseil-cpp/absl/log/internal/conditions.h +7 -2
- data/third_party/abseil-cpp/absl/log/internal/log_message.cc +85 -43
- data/third_party/abseil-cpp/absl/log/internal/log_message.h +84 -59
- data/third_party/abseil-cpp/absl/log/internal/nullstream.h +1 -0
- data/third_party/abseil-cpp/absl/log/internal/proto.cc +3 -2
- data/third_party/abseil-cpp/absl/log/internal/proto.h +3 -3
- data/third_party/abseil-cpp/absl/log/internal/strip.h +4 -12
- data/third_party/abseil-cpp/absl/log/internal/vlog_config.h +8 -6
- data/third_party/abseil-cpp/absl/log/internal/voidify.h +10 -4
- data/third_party/abseil-cpp/absl/log/log.h +48 -35
- data/third_party/abseil-cpp/absl/log/log_sink_registry.h +2 -2
- data/third_party/abseil-cpp/absl/meta/type_traits.h +46 -175
- data/third_party/abseil-cpp/absl/numeric/bits.h +68 -2
- data/third_party/abseil-cpp/absl/numeric/int128.cc +0 -52
- data/third_party/abseil-cpp/absl/numeric/internal/bits.h +7 -3
- data/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc +1 -1
- data/third_party/abseil-cpp/absl/random/bit_gen_ref.h +10 -11
- data/third_party/abseil-cpp/absl/random/distributions.h +6 -8
- data/third_party/abseil-cpp/absl/random/gaussian_distribution.h +1 -1
- data/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +5 -6
- data/third_party/abseil-cpp/absl/random/internal/{pool_urbg.cc → entropy_pool.cc} +22 -90
- data/third_party/abseil-cpp/absl/random/internal/entropy_pool.h +35 -0
- data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +5 -6
- data/third_party/abseil-cpp/absl/random/internal/randen_detect.cc +1 -1
- data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +20 -12
- data/third_party/abseil-cpp/absl/random/internal/seed_material.h +5 -5
- data/third_party/abseil-cpp/absl/random/random.h +88 -53
- data/third_party/abseil-cpp/absl/random/seed_sequences.cc +6 -2
- data/third_party/abseil-cpp/absl/status/internal/status_internal.cc +3 -4
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +3 -4
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +4 -3
- data/third_party/abseil-cpp/absl/status/status.cc +4 -8
- data/third_party/abseil-cpp/absl/status/status.h +8 -8
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +2 -2
- data/third_party/abseil-cpp/absl/status/statusor.cc +2 -2
- data/third_party/abseil-cpp/absl/status/statusor.h +6 -6
- data/third_party/abseil-cpp/absl/strings/ascii.cc +9 -9
- data/third_party/abseil-cpp/absl/strings/ascii.h +18 -18
- data/third_party/abseil-cpp/absl/strings/charconv.cc +21 -22
- data/third_party/abseil-cpp/absl/strings/charconv.h +5 -5
- data/third_party/abseil-cpp/absl/strings/cord.cc +54 -58
- data/third_party/abseil-cpp/absl/strings/cord.h +94 -83
- data/third_party/abseil-cpp/absl/strings/cord_analysis.cc +11 -11
- data/third_party/abseil-cpp/absl/strings/cord_analysis.h +3 -3
- data/third_party/abseil-cpp/absl/strings/escaping.cc +130 -149
- data/third_party/abseil-cpp/absl/strings/escaping.h +9 -10
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +6 -8
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +0 -4
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +0 -4
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +7 -63
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +1 -11
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +0 -22
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +5 -3
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +4 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +3 -3
- data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +0 -5
- data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +96 -1
- data/third_party/abseil-cpp/absl/strings/internal/utf8.h +15 -1
- data/third_party/abseil-cpp/absl/strings/numbers.cc +53 -32
- data/third_party/abseil-cpp/absl/strings/numbers.h +87 -58
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +6 -7
- data/third_party/abseil-cpp/absl/strings/str_cat.h +32 -32
- data/third_party/abseil-cpp/absl/strings/str_format.h +18 -18
- data/third_party/abseil-cpp/absl/strings/str_replace.cc +3 -3
- data/third_party/abseil-cpp/absl/strings/str_replace.h +6 -6
- data/third_party/abseil-cpp/absl/strings/string_view.cc +4 -9
- data/third_party/abseil-cpp/absl/strings/string_view.h +27 -32
- data/third_party/abseil-cpp/absl/strings/strip.h +4 -4
- data/third_party/abseil-cpp/absl/strings/substitute.cc +5 -4
- data/third_party/abseil-cpp/absl/strings/substitute.h +66 -64
- data/third_party/abseil-cpp/absl/synchronization/internal/futex_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.cc +0 -5
- data/third_party/abseil-cpp/absl/synchronization/internal/pthread_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/sem_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter_base.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/win32_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +1 -1
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +97 -69
- data/third_party/abseil-cpp/absl/synchronization/notification.h +1 -1
- data/third_party/abseil-cpp/absl/time/civil_time.cc +1 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +12 -7
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +90 -111
- data/third_party/abseil-cpp/absl/time/time.h +20 -15
- data/third_party/abseil-cpp/absl/types/optional.h +7 -747
- data/third_party/abseil-cpp/absl/types/span.h +13 -11
- data/third_party/abseil-cpp/absl/types/variant.h +5 -784
- data/third_party/abseil-cpp/absl/utility/utility.h +10 -185
- metadata +72 -20
- data/src/core/lib/event_engine/forkable.cc +0 -105
- data/src/core/lib/event_engine/forkable.h +0 -67
- data/src/core/lib/iomgr/python_util.h +0 -46
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +0 -108
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +0 -241
- data/third_party/abseil-cpp/absl/log/log_entry.cc +0 -41
- data/third_party/abseil-cpp/absl/random/internal/pool_urbg.h +0 -131
- data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +0 -66
- data/third_party/abseil-cpp/absl/types/bad_optional_access.h +0 -78
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +0 -82
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +0 -82
- data/third_party/abseil-cpp/absl/types/internal/optional.h +0 -352
- data/third_party/abseil-cpp/absl/types/internal/variant.h +0 -1622
@@ -27,6 +27,10 @@
|
|
27
27
|
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1355r2.html
|
28
28
|
// P1956R1:
|
29
29
|
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1956r1.pdf
|
30
|
+
// P0463R1
|
31
|
+
// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0463r1.html
|
32
|
+
// P1272R4
|
33
|
+
// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1272r4.html
|
30
34
|
//
|
31
35
|
// When using a standard library that implements these functions, we use the
|
32
36
|
// standard library's implementation.
|
@@ -45,6 +49,7 @@
|
|
45
49
|
#endif
|
46
50
|
|
47
51
|
#include "absl/base/attributes.h"
|
52
|
+
#include "absl/base/internal/endian.h"
|
48
53
|
#include "absl/numeric/internal/bits.h"
|
49
54
|
|
50
55
|
namespace absl {
|
@@ -63,14 +68,14 @@ using std::rotr;
|
|
63
68
|
|
64
69
|
// Rotating functions
|
65
70
|
template <class T>
|
66
|
-
|
71
|
+
[[nodiscard]] constexpr
|
67
72
|
typename std::enable_if<std::is_unsigned<T>::value, T>::type
|
68
73
|
rotl(T x, int s) noexcept {
|
69
74
|
return numeric_internal::RotateLeft(x, s);
|
70
75
|
}
|
71
76
|
|
72
77
|
template <class T>
|
73
|
-
|
78
|
+
[[nodiscard]] constexpr
|
74
79
|
typename std::enable_if<std::is_unsigned<T>::value, T>::type
|
75
80
|
rotr(T x, int s) noexcept {
|
76
81
|
return numeric_internal::RotateRight(x, s);
|
@@ -190,6 +195,67 @@ ABSL_INTERNAL_CONSTEXPR_CLZ inline
|
|
190
195
|
|
191
196
|
#endif
|
192
197
|
|
198
|
+
#if defined(__cpp_lib_endian) && __cpp_lib_endian >= 201907L
|
199
|
+
|
200
|
+
// https://en.cppreference.com/w/cpp/types/endian
|
201
|
+
//
|
202
|
+
// Indicates the endianness of all scalar types:
|
203
|
+
// * If all scalar types are little-endian, `absl::endian::native` equals
|
204
|
+
// absl::endian::little.
|
205
|
+
// * If all scalar types are big-endian, `absl::endian::native` equals
|
206
|
+
// `absl::endian::big`.
|
207
|
+
// * Platforms that use anything else are unsupported.
|
208
|
+
using std::endian;
|
209
|
+
|
210
|
+
#else
|
211
|
+
|
212
|
+
enum class endian {
|
213
|
+
little,
|
214
|
+
big,
|
215
|
+
#if defined(ABSL_IS_LITTLE_ENDIAN)
|
216
|
+
native = little
|
217
|
+
#elif defined(ABSL_IS_BIG_ENDIAN)
|
218
|
+
native = big
|
219
|
+
#else
|
220
|
+
#error "Endian detection needs to be set up for this platform"
|
221
|
+
#endif
|
222
|
+
};
|
223
|
+
|
224
|
+
#endif // defined(__cpp_lib_endian) && __cpp_lib_endian >= 201907L
|
225
|
+
|
226
|
+
#if defined(__cpp_lib_byteswap) && __cpp_lib_byteswap >= 202110L
|
227
|
+
|
228
|
+
// https://en.cppreference.com/w/cpp/numeric/byteswap
|
229
|
+
//
|
230
|
+
// Reverses the bytes in the given integer value `x`.
|
231
|
+
//
|
232
|
+
// `absl::byteswap` participates in overload resolution only if `T` satisfies
|
233
|
+
// integral, i.e., `T` is an integer type. The program is ill-formed if `T` has
|
234
|
+
// padding bits.
|
235
|
+
using std::byteswap;
|
236
|
+
|
237
|
+
#else
|
238
|
+
|
239
|
+
template <class T>
|
240
|
+
[[nodiscard]] constexpr T byteswap(T x) noexcept {
|
241
|
+
static_assert(std::is_integral_v<T>,
|
242
|
+
"byteswap requires an integral argument");
|
243
|
+
static_assert(
|
244
|
+
sizeof(T) == 1 || sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8,
|
245
|
+
"byteswap works only with 8, 16, 32, or 64-bit integers");
|
246
|
+
if constexpr (sizeof(T) == 1) {
|
247
|
+
return x;
|
248
|
+
} else if constexpr (sizeof(T) == 2) {
|
249
|
+
return static_cast<T>(gbswap_16(static_cast<uint16_t>(x)));
|
250
|
+
} else if constexpr (sizeof(T) == 4) {
|
251
|
+
return static_cast<T>(gbswap_32(static_cast<uint32_t>(x)));
|
252
|
+
} else if constexpr (sizeof(T) == 8) {
|
253
|
+
return static_cast<T>(gbswap_64(static_cast<uint64_t>(x)));
|
254
|
+
}
|
255
|
+
}
|
256
|
+
|
257
|
+
#endif // defined(__cpp_lib_byteswap) && __cpp_lib_byteswap >= 202110L
|
258
|
+
|
193
259
|
ABSL_NAMESPACE_END
|
194
260
|
} // namespace absl
|
195
261
|
|
@@ -342,55 +342,3 @@ std::ostream& operator<<(std::ostream& os, int128 v) {
|
|
342
342
|
|
343
343
|
ABSL_NAMESPACE_END
|
344
344
|
} // namespace absl
|
345
|
-
|
346
|
-
#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
|
347
|
-
namespace std {
|
348
|
-
constexpr bool numeric_limits<absl::uint128>::is_specialized;
|
349
|
-
constexpr bool numeric_limits<absl::uint128>::is_signed;
|
350
|
-
constexpr bool numeric_limits<absl::uint128>::is_integer;
|
351
|
-
constexpr bool numeric_limits<absl::uint128>::is_exact;
|
352
|
-
constexpr bool numeric_limits<absl::uint128>::has_infinity;
|
353
|
-
constexpr bool numeric_limits<absl::uint128>::has_quiet_NaN;
|
354
|
-
constexpr bool numeric_limits<absl::uint128>::has_signaling_NaN;
|
355
|
-
constexpr float_denorm_style numeric_limits<absl::uint128>::has_denorm;
|
356
|
-
constexpr bool numeric_limits<absl::uint128>::has_denorm_loss;
|
357
|
-
constexpr float_round_style numeric_limits<absl::uint128>::round_style;
|
358
|
-
constexpr bool numeric_limits<absl::uint128>::is_iec559;
|
359
|
-
constexpr bool numeric_limits<absl::uint128>::is_bounded;
|
360
|
-
constexpr bool numeric_limits<absl::uint128>::is_modulo;
|
361
|
-
constexpr int numeric_limits<absl::uint128>::digits;
|
362
|
-
constexpr int numeric_limits<absl::uint128>::digits10;
|
363
|
-
constexpr int numeric_limits<absl::uint128>::max_digits10;
|
364
|
-
constexpr int numeric_limits<absl::uint128>::radix;
|
365
|
-
constexpr int numeric_limits<absl::uint128>::min_exponent;
|
366
|
-
constexpr int numeric_limits<absl::uint128>::min_exponent10;
|
367
|
-
constexpr int numeric_limits<absl::uint128>::max_exponent;
|
368
|
-
constexpr int numeric_limits<absl::uint128>::max_exponent10;
|
369
|
-
constexpr bool numeric_limits<absl::uint128>::traps;
|
370
|
-
constexpr bool numeric_limits<absl::uint128>::tinyness_before;
|
371
|
-
|
372
|
-
constexpr bool numeric_limits<absl::int128>::is_specialized;
|
373
|
-
constexpr bool numeric_limits<absl::int128>::is_signed;
|
374
|
-
constexpr bool numeric_limits<absl::int128>::is_integer;
|
375
|
-
constexpr bool numeric_limits<absl::int128>::is_exact;
|
376
|
-
constexpr bool numeric_limits<absl::int128>::has_infinity;
|
377
|
-
constexpr bool numeric_limits<absl::int128>::has_quiet_NaN;
|
378
|
-
constexpr bool numeric_limits<absl::int128>::has_signaling_NaN;
|
379
|
-
constexpr float_denorm_style numeric_limits<absl::int128>::has_denorm;
|
380
|
-
constexpr bool numeric_limits<absl::int128>::has_denorm_loss;
|
381
|
-
constexpr float_round_style numeric_limits<absl::int128>::round_style;
|
382
|
-
constexpr bool numeric_limits<absl::int128>::is_iec559;
|
383
|
-
constexpr bool numeric_limits<absl::int128>::is_bounded;
|
384
|
-
constexpr bool numeric_limits<absl::int128>::is_modulo;
|
385
|
-
constexpr int numeric_limits<absl::int128>::digits;
|
386
|
-
constexpr int numeric_limits<absl::int128>::digits10;
|
387
|
-
constexpr int numeric_limits<absl::int128>::max_digits10;
|
388
|
-
constexpr int numeric_limits<absl::int128>::radix;
|
389
|
-
constexpr int numeric_limits<absl::int128>::min_exponent;
|
390
|
-
constexpr int numeric_limits<absl::int128>::min_exponent10;
|
391
|
-
constexpr int numeric_limits<absl::int128>::max_exponent;
|
392
|
-
constexpr int numeric_limits<absl::int128>::max_exponent10;
|
393
|
-
constexpr bool numeric_limits<absl::int128>::traps;
|
394
|
-
constexpr bool numeric_limits<absl::int128>::tinyness_before;
|
395
|
-
} // namespace std
|
396
|
-
#endif
|
@@ -71,7 +71,7 @@ constexpr bool IsPowerOf2(unsigned int x) noexcept {
|
|
71
71
|
}
|
72
72
|
|
73
73
|
template <class T>
|
74
|
-
|
74
|
+
[[nodiscard]] ABSL_ATTRIBUTE_ALWAYS_INLINE constexpr T RotateRight(
|
75
75
|
T x, int s) noexcept {
|
76
76
|
static_assert(std::is_unsigned<T>::value, "T must be unsigned");
|
77
77
|
static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
|
@@ -82,7 +82,7 @@ ABSL_MUST_USE_RESULT ABSL_ATTRIBUTE_ALWAYS_INLINE constexpr T RotateRight(
|
|
82
82
|
}
|
83
83
|
|
84
84
|
template <class T>
|
85
|
-
|
85
|
+
[[nodiscard]] ABSL_ATTRIBUTE_ALWAYS_INLINE constexpr T RotateLeft(
|
86
86
|
T x, int s) noexcept {
|
87
87
|
static_assert(std::is_unsigned<T>::value, "T must be unsigned");
|
88
88
|
static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
|
@@ -126,7 +126,11 @@ Popcount(T x) noexcept {
|
|
126
126
|
static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
|
127
127
|
"T must have a power-of-2 size");
|
128
128
|
static_assert(sizeof(x) <= sizeof(uint64_t), "T is too large");
|
129
|
-
|
129
|
+
if constexpr (sizeof(x) <= sizeof(uint32_t)) {
|
130
|
+
return Popcount32(x);
|
131
|
+
} else {
|
132
|
+
return Popcount64(x);
|
133
|
+
}
|
130
134
|
}
|
131
135
|
|
132
136
|
ABSL_ATTRIBUTE_ALWAYS_INLINE ABSL_INTERNAL_CONSTEXPR_CLZ inline int
|
@@ -31,7 +31,7 @@
|
|
31
31
|
|
32
32
|
#include "absl/base/attributes.h"
|
33
33
|
#include "absl/base/config.h"
|
34
|
-
#include "absl/base/
|
34
|
+
#include "absl/base/fast_type_id.h"
|
35
35
|
#include "absl/meta/type_traits.h"
|
36
36
|
#include "absl/random/internal/distribution_caller.h"
|
37
37
|
#include "absl/random/internal/fast_uniform_bits.h"
|
@@ -88,7 +88,7 @@ class MockHelpers;
|
|
88
88
|
//
|
89
89
|
class BitGenRef {
|
90
90
|
// SFINAE to detect whether the URBG type includes a member matching
|
91
|
-
// bool InvokeMock(
|
91
|
+
// bool InvokeMock(key_id, args_tuple*, result*).
|
92
92
|
//
|
93
93
|
// These live inside BitGenRef so that they have friend access
|
94
94
|
// to MockingBitGen. (see similar methods in DistributionCaller).
|
@@ -100,7 +100,7 @@ class BitGenRef {
|
|
100
100
|
|
101
101
|
template <class T>
|
102
102
|
using invoke_mock_t = decltype(std::declval<T*>()->InvokeMock(
|
103
|
-
std::declval<
|
103
|
+
std::declval<FastTypeIdType>(), std::declval<void*>(),
|
104
104
|
std::declval<void*>()));
|
105
105
|
|
106
106
|
template <typename T>
|
@@ -145,8 +145,7 @@ class BitGenRef {
|
|
145
145
|
|
146
146
|
private:
|
147
147
|
using impl_fn = result_type (*)(uintptr_t);
|
148
|
-
using mock_call_fn = bool (*)(uintptr_t,
|
149
|
-
void*);
|
148
|
+
using mock_call_fn = bool (*)(uintptr_t, FastTypeIdType, void*, void*);
|
150
149
|
|
151
150
|
template <typename URBG>
|
152
151
|
static result_type ImplFn(uintptr_t ptr) {
|
@@ -158,19 +157,19 @@ class BitGenRef {
|
|
158
157
|
|
159
158
|
// Get a type-erased InvokeMock pointer.
|
160
159
|
template <typename URBG>
|
161
|
-
static bool MockCall(uintptr_t gen_ptr,
|
162
|
-
void*
|
163
|
-
return reinterpret_cast<URBG*>(gen_ptr)->InvokeMock(
|
160
|
+
static bool MockCall(uintptr_t gen_ptr, FastTypeIdType key_id, void* result,
|
161
|
+
void* arg_tuple) {
|
162
|
+
return reinterpret_cast<URBG*>(gen_ptr)->InvokeMock(key_id, result,
|
164
163
|
arg_tuple);
|
165
164
|
}
|
166
|
-
static bool NotAMock(uintptr_t,
|
165
|
+
static bool NotAMock(uintptr_t, FastTypeIdType, void*, void*) {
|
167
166
|
return false;
|
168
167
|
}
|
169
168
|
|
170
|
-
inline bool InvokeMock(
|
169
|
+
inline bool InvokeMock(FastTypeIdType key_id, void* args_tuple,
|
171
170
|
void* result) {
|
172
171
|
if (mock_call_ == NotAMock) return false; // avoids an indirect call.
|
173
|
-
return mock_call_(t_erased_gen_ptr_,
|
172
|
+
return mock_call_(t_erased_gen_ptr_, key_id, args_tuple, result);
|
174
173
|
}
|
175
174
|
|
176
175
|
uintptr_t t_erased_gen_ptr_;
|
@@ -50,7 +50,6 @@
|
|
50
50
|
#include <type_traits>
|
51
51
|
|
52
52
|
#include "absl/base/config.h"
|
53
|
-
#include "absl/base/internal/inline_variable.h"
|
54
53
|
#include "absl/meta/type_traits.h"
|
55
54
|
#include "absl/random/bernoulli_distribution.h"
|
56
55
|
#include "absl/random/beta_distribution.h"
|
@@ -68,13 +67,12 @@
|
|
68
67
|
namespace absl {
|
69
68
|
ABSL_NAMESPACE_BEGIN
|
70
69
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
ABSL_INTERNAL_INLINE_CONSTEXPR(IntervalOpenClosedTag, IntervalOpenClosed, {});
|
70
|
+
inline constexpr IntervalClosedClosedTag IntervalClosedClosed = {};
|
71
|
+
inline constexpr IntervalClosedClosedTag IntervalClosed = {};
|
72
|
+
inline constexpr IntervalClosedOpenTag IntervalClosedOpen = {};
|
73
|
+
inline constexpr IntervalOpenOpenTag IntervalOpenOpen = {};
|
74
|
+
inline constexpr IntervalOpenOpenTag IntervalOpen = {};
|
75
|
+
inline constexpr IntervalOpenClosedTag IntervalOpenClosed = {};
|
78
76
|
|
79
77
|
// -----------------------------------------------------------------------------
|
80
78
|
// absl::Uniform<T>(tag, bitgen, lo, hi)
|
@@ -244,7 +244,7 @@ inline double gaussian_distribution_base::zignor(
|
|
244
244
|
bits); // U(-1, 1)
|
245
245
|
const double x = j * zg_.x[i];
|
246
246
|
|
247
|
-
//
|
247
|
+
// Rectangular box. Handles >97% of all cases.
|
248
248
|
// For any given box, this handles between 75% and 99% of values.
|
249
249
|
// Equivalent to U(01) < (x[i+1] / x[i]), and when i == 0, ~93.5%
|
250
250
|
if (std::abs(x) < zg_.x[i + 1]) {
|
@@ -22,7 +22,7 @@
|
|
22
22
|
#include <utility>
|
23
23
|
|
24
24
|
#include "absl/base/config.h"
|
25
|
-
#include "absl/base/
|
25
|
+
#include "absl/base/fast_type_id.h"
|
26
26
|
#include "absl/meta/type_traits.h"
|
27
27
|
#include "absl/utility/utility.h"
|
28
28
|
|
@@ -38,7 +38,7 @@ struct DistributionCaller {
|
|
38
38
|
static_assert(!std::is_pointer<URBG>::value,
|
39
39
|
"You must pass a reference, not a pointer.");
|
40
40
|
// SFINAE to detect whether the URBG type includes a member matching
|
41
|
-
// bool InvokeMock(
|
41
|
+
// bool InvokeMock(key_id, args_tuple*, result*).
|
42
42
|
//
|
43
43
|
// These live inside BitGenRef so that they have friend access
|
44
44
|
// to MockingBitGen. (see similar methods in DistributionCaller).
|
@@ -50,8 +50,8 @@ struct DistributionCaller {
|
|
50
50
|
|
51
51
|
template <class T>
|
52
52
|
using invoke_mock_t = decltype(std::declval<T*>()->InvokeMock(
|
53
|
-
std::declval
|
54
|
-
std::declval<void*>()
|
53
|
+
std::declval<FastTypeIdType>(), std::declval<void*>(),
|
54
|
+
std::declval<void*>()));
|
55
55
|
|
56
56
|
using HasInvokeMock = typename detector<invoke_mock_t, void, URBG>::type;
|
57
57
|
|
@@ -74,8 +74,7 @@ struct DistributionCaller {
|
|
74
74
|
|
75
75
|
ArgTupleT arg_tuple(std::forward<Args>(args)...);
|
76
76
|
ResultT result;
|
77
|
-
if (!urbg->InvokeMock(
|
78
|
-
&result)) {
|
77
|
+
if (!urbg->InvokeMock(FastTypeId<KeyT>(), &arg_tuple, &result)) {
|
79
78
|
auto dist = absl::make_from_tuple<DistrT>(arg_tuple);
|
80
79
|
result = dist(*urbg);
|
81
80
|
}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
// See the License for the specific language governing permissions and
|
13
13
|
// limitations under the License.
|
14
14
|
|
15
|
-
#include "absl/random/internal/
|
15
|
+
#include "absl/random/internal/entropy_pool.h"
|
16
16
|
|
17
17
|
#include <algorithm>
|
18
18
|
#include <atomic>
|
@@ -23,15 +23,14 @@
|
|
23
23
|
#include "absl/base/attributes.h"
|
24
24
|
#include "absl/base/call_once.h"
|
25
25
|
#include "absl/base/config.h"
|
26
|
-
#include "absl/base/internal/endian.h"
|
27
|
-
#include "absl/base/internal/raw_logging.h"
|
28
26
|
#include "absl/base/internal/spinlock.h"
|
29
|
-
#include "absl/base/internal/sysinfo.h"
|
30
|
-
#include "absl/base/internal/unaligned_access.h"
|
31
27
|
#include "absl/base/optimization.h"
|
28
|
+
#include "absl/base/thread_annotations.h"
|
32
29
|
#include "absl/random/internal/randen.h"
|
30
|
+
#include "absl/random/internal/randen_traits.h"
|
33
31
|
#include "absl/random/internal/seed_material.h"
|
34
32
|
#include "absl/random/seed_gen_exception.h"
|
33
|
+
#include "absl/types/span.h"
|
35
34
|
|
36
35
|
using absl::base_internal::SpinLock;
|
37
36
|
using absl::base_internal::SpinLockHolder;
|
@@ -45,9 +44,11 @@ namespace {
|
|
45
44
|
// single generator within a RandenPool<T>. It is an internal implementation
|
46
45
|
// detail, and does not aim to conform to [rand.req.urng].
|
47
46
|
//
|
48
|
-
//
|
49
|
-
//
|
50
|
-
|
47
|
+
// At least 32-byte alignment is required for the state_ array on some ARM
|
48
|
+
// platforms. We also want this aligned to a cacheline to eliminate false
|
49
|
+
// sharing.
|
50
|
+
class alignas(std::max(size_t{ABSL_CACHELINE_SIZE}, size_t{32}))
|
51
|
+
RandenPoolEntry {
|
51
52
|
public:
|
52
53
|
static constexpr size_t kState = RandenTraits::kStateBytes / sizeof(uint32_t);
|
53
54
|
static constexpr size_t kCapacity =
|
@@ -62,10 +63,6 @@ class RandenPoolEntry {
|
|
62
63
|
// Copy bytes into out.
|
63
64
|
void Fill(uint8_t* out, size_t bytes) ABSL_LOCKS_EXCLUDED(mu_);
|
64
65
|
|
65
|
-
// Returns random bits from the buffer in units of T.
|
66
|
-
template <typename T>
|
67
|
-
inline T Generate() ABSL_LOCKS_EXCLUDED(mu_);
|
68
|
-
|
69
66
|
inline void MaybeRefill() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) {
|
70
67
|
if (next_ >= kState) {
|
71
68
|
next_ = kCapacity;
|
@@ -73,55 +70,24 @@ class RandenPoolEntry {
|
|
73
70
|
}
|
74
71
|
}
|
75
72
|
|
73
|
+
inline size_t available() const ABSL_SHARED_LOCKS_REQUIRED(mu_) {
|
74
|
+
return kState - next_;
|
75
|
+
}
|
76
|
+
|
76
77
|
private:
|
77
78
|
// Randen URBG state.
|
78
|
-
|
79
|
+
// At least 32-byte alignment is required by ARM platform code.
|
80
|
+
alignas(32) uint32_t state_[kState] ABSL_GUARDED_BY(mu_);
|
79
81
|
SpinLock mu_;
|
80
82
|
const Randen impl_;
|
81
83
|
size_t next_ ABSL_GUARDED_BY(mu_);
|
82
84
|
};
|
83
85
|
|
84
|
-
template <>
|
85
|
-
inline uint8_t RandenPoolEntry::Generate<uint8_t>() {
|
86
|
-
SpinLockHolder l(&mu_);
|
87
|
-
MaybeRefill();
|
88
|
-
return static_cast<uint8_t>(state_[next_++]);
|
89
|
-
}
|
90
|
-
|
91
|
-
template <>
|
92
|
-
inline uint16_t RandenPoolEntry::Generate<uint16_t>() {
|
93
|
-
SpinLockHolder l(&mu_);
|
94
|
-
MaybeRefill();
|
95
|
-
return static_cast<uint16_t>(state_[next_++]);
|
96
|
-
}
|
97
|
-
|
98
|
-
template <>
|
99
|
-
inline uint32_t RandenPoolEntry::Generate<uint32_t>() {
|
100
|
-
SpinLockHolder l(&mu_);
|
101
|
-
MaybeRefill();
|
102
|
-
return state_[next_++];
|
103
|
-
}
|
104
|
-
|
105
|
-
template <>
|
106
|
-
inline uint64_t RandenPoolEntry::Generate<uint64_t>() {
|
107
|
-
SpinLockHolder l(&mu_);
|
108
|
-
if (next_ >= kState - 1) {
|
109
|
-
next_ = kCapacity;
|
110
|
-
impl_.Generate(state_);
|
111
|
-
}
|
112
|
-
auto p = state_ + next_;
|
113
|
-
next_ += 2;
|
114
|
-
|
115
|
-
uint64_t result;
|
116
|
-
std::memcpy(&result, p, sizeof(result));
|
117
|
-
return result;
|
118
|
-
}
|
119
|
-
|
120
86
|
void RandenPoolEntry::Fill(uint8_t* out, size_t bytes) {
|
121
87
|
SpinLockHolder l(&mu_);
|
122
88
|
while (bytes > 0) {
|
123
89
|
MaybeRefill();
|
124
|
-
size_t remaining = (
|
90
|
+
size_t remaining = available() * sizeof(state_[0]);
|
125
91
|
size_t to_copy = std::min(bytes, remaining);
|
126
92
|
std::memcpy(out, &state_[next_], to_copy);
|
127
93
|
out += to_copy;
|
@@ -185,38 +151,17 @@ size_t GetPoolID() {
|
|
185
151
|
#endif
|
186
152
|
}
|
187
153
|
|
188
|
-
// Allocate a RandenPoolEntry with at least 32-byte alignment, which is required
|
189
|
-
// by ARM platform code.
|
190
|
-
RandenPoolEntry* PoolAlignedAlloc() {
|
191
|
-
constexpr size_t kAlignment =
|
192
|
-
ABSL_CACHELINE_SIZE > 32 ? ABSL_CACHELINE_SIZE : 32;
|
193
|
-
|
194
|
-
// Not all the platforms that we build for have std::aligned_alloc, however
|
195
|
-
// since we never free these objects, we can over allocate and munge the
|
196
|
-
// pointers to the correct alignment.
|
197
|
-
uintptr_t x = reinterpret_cast<uintptr_t>(
|
198
|
-
new char[sizeof(RandenPoolEntry) + kAlignment]);
|
199
|
-
auto y = x % kAlignment;
|
200
|
-
void* aligned = reinterpret_cast<void*>(y == 0 ? x : (x + kAlignment - y));
|
201
|
-
return new (aligned) RandenPoolEntry();
|
202
|
-
}
|
203
|
-
|
204
154
|
// Allocate and initialize kPoolSize objects of type RandenPoolEntry.
|
205
|
-
//
|
206
|
-
// The initialization strategy is to initialize one object directly from
|
207
|
-
// OS entropy, then to use that object to seed all of the individual
|
208
|
-
// pool instances.
|
209
155
|
void InitPoolURBG() {
|
210
156
|
static constexpr size_t kSeedSize =
|
211
157
|
RandenTraits::kStateBytes / sizeof(uint32_t);
|
212
|
-
// Read
|
158
|
+
// Read OS entropy once, and use it to initialize each pool entry.
|
213
159
|
uint32_t seed_material[kPoolSize * kSeedSize];
|
214
|
-
if (!
|
215
|
-
|
216
|
-
random_internal::ThrowSeedGenException();
|
160
|
+
if (!ReadSeedMaterialFromOSEntropy(absl::MakeSpan(seed_material))) {
|
161
|
+
ThrowSeedGenException();
|
217
162
|
}
|
218
163
|
for (size_t i = 0; i < kPoolSize; i++) {
|
219
|
-
shared_pools[i] =
|
164
|
+
shared_pools[i] = new RandenPoolEntry();
|
220
165
|
shared_pools[i]->Init(
|
221
166
|
absl::MakeSpan(&seed_material[i * kSeedSize], kSeedSize));
|
222
167
|
}
|
@@ -230,24 +175,11 @@ RandenPoolEntry* GetPoolForCurrentThread() {
|
|
230
175
|
|
231
176
|
} // namespace
|
232
177
|
|
233
|
-
|
234
|
-
typename RandenPool<T>::result_type RandenPool<T>::Generate() {
|
235
|
-
auto* pool = GetPoolForCurrentThread();
|
236
|
-
return pool->Generate<T>();
|
237
|
-
}
|
238
|
-
|
239
|
-
template <typename T>
|
240
|
-
void RandenPool<T>::Fill(absl::Span<result_type> data) {
|
178
|
+
void GetEntropyFromRandenPool(void* dest, size_t bytes) {
|
241
179
|
auto* pool = GetPoolForCurrentThread();
|
242
|
-
pool->Fill(reinterpret_cast<uint8_t*>(
|
243
|
-
data.size() * sizeof(result_type));
|
180
|
+
pool->Fill(reinterpret_cast<uint8_t*>(dest), bytes);
|
244
181
|
}
|
245
182
|
|
246
|
-
template class RandenPool<uint8_t>;
|
247
|
-
template class RandenPool<uint16_t>;
|
248
|
-
template class RandenPool<uint32_t>;
|
249
|
-
template class RandenPool<uint64_t>;
|
250
|
-
|
251
183
|
} // namespace random_internal
|
252
184
|
ABSL_NAMESPACE_END
|
253
185
|
} // namespace absl
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// Copyright 2017 The Abseil Authors.
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
#ifndef ABSL_RANDOM_INTERNAL_ENTROPY_POOL_H_
|
16
|
+
#define ABSL_RANDOM_INTERNAL_ENTROPY_POOL_H_
|
17
|
+
|
18
|
+
#include <cstddef>
|
19
|
+
|
20
|
+
#include "absl/base/config.h"
|
21
|
+
|
22
|
+
namespace absl {
|
23
|
+
ABSL_NAMESPACE_BEGIN
|
24
|
+
namespace random_internal {
|
25
|
+
|
26
|
+
// GetEntropyFromRandenPool() is a helper function that fills a memory region
|
27
|
+
// with random bytes from the RandenPool. This is used by the absl::BitGen
|
28
|
+
// implementation to fill the internal buffer.
|
29
|
+
void GetEntropyFromRandenPool(void* dest, size_t bytes);
|
30
|
+
|
31
|
+
} // namespace random_internal
|
32
|
+
ABSL_NAMESPACE_END
|
33
|
+
} // namespace absl
|
34
|
+
|
35
|
+
#endif // ABSL_RANDOM_INTERNAL_ENTROPY_POOL_H_
|
@@ -16,19 +16,19 @@
|
|
16
16
|
#define ABSL_RANDOM_INTERNAL_NONSECURE_BASE_H_
|
17
17
|
|
18
18
|
#include <algorithm>
|
19
|
+
#include <cstddef>
|
19
20
|
#include <cstdint>
|
20
21
|
#include <iterator>
|
21
22
|
#include <type_traits>
|
22
23
|
#include <utility>
|
23
24
|
#include <vector>
|
24
25
|
|
25
|
-
#include "absl/base/
|
26
|
+
#include "absl/base/config.h"
|
26
27
|
#include "absl/container/inlined_vector.h"
|
27
28
|
#include "absl/meta/type_traits.h"
|
28
|
-
#include "absl/random/internal/
|
29
|
+
#include "absl/random/internal/entropy_pool.h"
|
29
30
|
#include "absl/random/internal/salted_seed_seq.h"
|
30
31
|
#include "absl/random/internal/seed_material.h"
|
31
|
-
#include "absl/types/span.h"
|
32
32
|
|
33
33
|
namespace absl {
|
34
34
|
ABSL_NAMESPACE_BEGIN
|
@@ -46,8 +46,7 @@ class RandenPoolSeedSeq {
|
|
46
46
|
void generate_impl(ContiguousTag, Contiguous begin, Contiguous end) {
|
47
47
|
const size_t n = static_cast<size_t>(std::distance(begin, end));
|
48
48
|
auto* a = &(*begin);
|
49
|
-
|
50
|
-
absl::MakeSpan(reinterpret_cast<uint8_t*>(a), sizeof(*a) * n));
|
49
|
+
GetEntropyFromRandenPool(a, sizeof(*a) * n);
|
51
50
|
}
|
52
51
|
|
53
52
|
// Construct a buffer of size n and fill it with values, then copy
|
@@ -57,7 +56,7 @@ class RandenPoolSeedSeq {
|
|
57
56
|
RandomAccessIterator end) {
|
58
57
|
const size_t n = std::distance(begin, end);
|
59
58
|
absl::InlinedVector<uint32_t, 8> data(n, 0);
|
60
|
-
|
59
|
+
GetEntropyFromRandenPool(data.begin(), sizeof(data[0]) * n);
|
61
60
|
std::copy(std::begin(data), std::end(data), begin);
|
62
61
|
}
|
63
62
|
|
@@ -74,7 +74,7 @@ static void __cpuid(int cpu_info[4], int info_type) {
|
|
74
74
|
// On linux, just use the c-library getauxval call.
|
75
75
|
#if defined(ABSL_INTERNAL_USE_LINUX_GETAUXVAL)
|
76
76
|
|
77
|
-
|
77
|
+
#include <sys/auxv.h>
|
78
78
|
|
79
79
|
static uint32_t GetAuxval(uint32_t hwcap_type) {
|
80
80
|
return static_cast<uint32_t>(getauxval(hwcap_type));
|