More generic configuration system is introduced in order to i) unify the
way how modules access the configurations instead of using low-level
get/setenv functions and ii) enable the customization for where configuration
is stored. This could be extended to support flag, file, etc.
Default configuration system uses environment variables as before so
basically this is expected to work just as it did. This behavior can
change by redefining GPR_GLOBAL_CONFIG_DEFINE_*type* macros.
* Migrated configuration
GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS
GRPC_EXPERIMENTAL_DISABLE_FLOW_CONTROL
GRPC_ABORT_ON_LEAKS
GRPC_NOT_USE_SYSTEM_SSL_ROOTS
alignment options (for cache-alignment).
We shrink by:
1) Removing an unnecessary zone pointer.
2) Replacing gpr_mu (40 bytes when using pthread_mutex_t) with
std::atomic_flag.
We also header-inline the fastpath alloc (ie. when not doing a zone
alloc) and move the malloc() for a zone alloc outside of the mutex
critical zone, which allows us to replace the mutex with a spinlock.
We also cache-align created arenas.
This reverts commit dc1089a6d1, reversing
changes made to 31843787cc.
This change also includes - Revert "Merge pull request #17932 from soheilhy/gprpp-mutex"
This reverts commit df4b6a763d, reversing
changes made to dc1089a6d1.
Introduce RAII wrappers in the grpc::internal and grpc_core
namespaces, and use them in place of std::mutex and
std::condition_variable.
Note that, since std::mutex is also used by the public
C++ headers we cannot introduce these wrappers in grpc_core.
Also, note that in grpcpp we cannot use gRPC core and vice versa.
So we had to duplicate the code, once using core_codegen_interface
and once using direct calls.
Retire the old atomic_with_atm.h and atomic_with_std.h as they are not
needed anymore.
Introduce helper methods which call GPR_ATM_INC_ADD_THEN and
GPR_ATM_INC_CAS_THEN, and use them everywhere.
Also introduce AtomicIncrementIfNonzero, originally authored by
vjpai@. This is going to be used for completion queues.
grpc_handshake is renamed to GrpcHandshake, using C++ class definitions
instead of C-style vtable classes. Update callers to use new interfaces.
We use RefCountedPtr to simplify reference tracking.