From c7527415e05039113c28a5169b1e48f62deaa29e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 31 Mar 2017 16:53:40 -0700 Subject: initial minimal stack configurator sketch --- src/core/lib/channel/channel_args.c | 7 +++++++ src/core/lib/channel/channel_args.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 1a099ac437..a6d124c719 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -346,3 +346,10 @@ int grpc_channel_arg_get_integer(grpc_arg *arg, grpc_integer_options options) { } return arg->value.integer; } + +bool grpc_channel_args_want_minimal_stack(const grpc_channel_args *args) { + const grpc_arg *arg = grpc_channel_args_find(args, GRPC_ARG_MINIMAL_STACK); + if (arg == NULL) return false; + if (arg->type == GRPC_ARG_INTEGER && arg->value.integer == 0) return false; + return true; +} diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 5c7d31f8bb..158cda5b21 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -113,6 +113,8 @@ grpc_channel_args *grpc_channel_args_set_socket_mutator( const grpc_arg *grpc_channel_args_find(const grpc_channel_args *args, const char *name); +bool grpc_channel_args_want_minimal_stack(const grpc_channel_args *args); + typedef struct grpc_integer_options { int default_value; // Return this if value is outside of expected bounds. int min_value; -- cgit v1.2.3