diff options
author | Sree Kuchibhotla <sreek@google.com> | 2017-03-21 17:18:41 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2017-03-21 17:18:41 -0700 |
commit | 5ea3bbd4186fcd987d755130ac3ddddf1eeb25ab (patch) | |
tree | 012564623890f4190172f372634c287316335e75 | |
parent | 313b895064053adbae6071c3bee5d03cd16a6e56 (diff) | |
parent | 48ed124138d5a6c58710fd6d89d2568733987959 (diff) |
Merge branch 'cq_factory_api' into cq_create_api_changes_with_factory
23 files changed, 237 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 90f600411b..dc11eb126f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -966,6 +966,7 @@ add_library(grpc src/core/lib/surface/channel_ping.c src/core/lib/surface/channel_stack_type.c src/core/lib/surface/completion_queue.c + src/core/lib/surface/completion_queue_factory.c src/core/lib/surface/event_string.c src/core/lib/surface/lame_client.c src/core/lib/surface/metadata_array.c @@ -1279,6 +1280,7 @@ add_library(grpc_cronet src/core/lib/surface/channel_ping.c src/core/lib/surface/channel_stack_type.c src/core/lib/surface/completion_queue.c + src/core/lib/surface/completion_queue_factory.c src/core/lib/surface/event_string.c src/core/lib/surface/lame_client.c src/core/lib/surface/metadata_array.c @@ -1583,6 +1585,7 @@ add_library(grpc_test_util src/core/lib/surface/channel_ping.c src/core/lib/surface/channel_stack_type.c src/core/lib/surface/completion_queue.c + src/core/lib/surface/completion_queue_factory.c src/core/lib/surface/event_string.c src/core/lib/surface/lame_client.c src/core/lib/surface/metadata_array.c @@ -1832,6 +1835,7 @@ add_library(grpc_unsecure src/core/lib/surface/channel_ping.c src/core/lib/surface/channel_stack_type.c src/core/lib/surface/completion_queue.c + src/core/lib/surface/completion_queue_factory.c src/core/lib/surface/event_string.c src/core/lib/surface/lame_client.c src/core/lib/surface/metadata_array.c @@ -2443,6 +2447,7 @@ add_library(grpc++_cronet src/core/lib/surface/channel_ping.c src/core/lib/surface/channel_stack_type.c src/core/lib/surface/completion_queue.c + src/core/lib/surface/completion_queue_factory.c src/core/lib/surface/event_string.c src/core/lib/surface/lame_client.c src/core/lib/surface/metadata_array.c @@ -2858,6 +2858,7 @@ LIBGRPC_SRC = \ src/core/lib/surface/channel_ping.c \ src/core/lib/surface/channel_stack_type.c \ src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/completion_queue_factory.c \ src/core/lib/surface/event_string.c \ src/core/lib/surface/lame_client.c \ src/core/lib/surface/metadata_array.c \ @@ -3174,6 +3175,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/surface/channel_ping.c \ src/core/lib/surface/channel_stack_type.c \ src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/completion_queue_factory.c \ src/core/lib/surface/event_string.c \ src/core/lib/surface/lame_client.c \ src/core/lib/surface/metadata_array.c \ @@ -3481,6 +3483,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/surface/channel_ping.c \ src/core/lib/surface/channel_stack_type.c \ src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/completion_queue_factory.c \ src/core/lib/surface/event_string.c \ src/core/lib/surface/lame_client.c \ src/core/lib/surface/metadata_array.c \ @@ -3710,6 +3713,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/surface/channel_ping.c \ src/core/lib/surface/channel_stack_type.c \ src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/completion_queue_factory.c \ src/core/lib/surface/event_string.c \ src/core/lib/surface/lame_client.c \ src/core/lib/surface/metadata_array.c \ @@ -4323,6 +4327,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/surface/channel_ping.c \ src/core/lib/surface/channel_stack_type.c \ src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/completion_queue_factory.c \ src/core/lib/surface/event_string.c \ src/core/lib/surface/lame_client.c \ src/core/lib/surface/metadata_array.c \ diff --git a/binding.gyp b/binding.gyp index 3cb1de99a3..20585c4407 100644 --- a/binding.gyp +++ b/binding.gyp @@ -712,6 +712,7 @@ 'src/core/lib/surface/channel_ping.c', 'src/core/lib/surface/channel_stack_type.c', 'src/core/lib/surface/completion_queue.c', + 'src/core/lib/surface/completion_queue_factory.c', 'src/core/lib/surface/event_string.c', 'src/core/lib/surface/lame_client.c', 'src/core/lib/surface/metadata_array.c', diff --git a/build.yaml b/build.yaml index dc21442898..1169614d7a 100644 --- a/build.yaml +++ b/build.yaml @@ -262,6 +262,7 @@ filegroups: - src/core/lib/surface/channel_init.h - src/core/lib/surface/channel_stack_type.h - src/core/lib/surface/completion_queue.h + - src/core/lib/surface/completion_queue_factory.h - src/core/lib/surface/event_string.h - src/core/lib/surface/init.h - src/core/lib/surface/lame_client.h @@ -384,6 +385,7 @@ filegroups: - src/core/lib/surface/channel_ping.c - src/core/lib/surface/channel_stack_type.c - src/core/lib/surface/completion_queue.c + - src/core/lib/surface/completion_queue_factory.c - src/core/lib/surface/event_string.c - src/core/lib/surface/lame_client.c - src/core/lib/surface/metadata_array.c @@ -185,6 +185,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/surface/channel_ping.c \ src/core/lib/surface/channel_stack_type.c \ src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/completion_queue_factory.c \ src/core/lib/surface/event_string.c \ src/core/lib/surface/lame_client.c \ src/core/lib/surface/metadata_array.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 899946a90a..4f404ba5b4 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -343,6 +343,7 @@ Pod::Spec.new do |s| 'src/core/lib/surface/channel_init.h', 'src/core/lib/surface/channel_stack_type.h', 'src/core/lib/surface/completion_queue.h', + 'src/core/lib/surface/completion_queue_factory.h', 'src/core/lib/surface/event_string.h', 'src/core/lib/surface/init.h', 'src/core/lib/surface/lame_client.h', @@ -556,6 +557,7 @@ Pod::Spec.new do |s| 'src/core/lib/surface/channel_ping.c', 'src/core/lib/surface/channel_stack_type.c', 'src/core/lib/surface/completion_queue.c', + 'src/core/lib/surface/completion_queue_factory.c', 'src/core/lib/surface/event_string.c', 'src/core/lib/surface/lame_client.c', 'src/core/lib/surface/metadata_array.c', @@ -785,6 +787,7 @@ Pod::Spec.new do |s| 'src/core/lib/surface/channel_init.h', 'src/core/lib/surface/channel_stack_type.h', 'src/core/lib/surface/completion_queue.h', + 'src/core/lib/surface/completion_queue_factory.h', 'src/core/lib/surface/event_string.h', 'src/core/lib/surface/init.h', 'src/core/lib/surface/lame_client.h', @@ -53,6 +53,9 @@ EXPORTS grpc_shutdown grpc_version_string grpc_g_stands_for + grpc_completion_queue_factory_lookup + grpc_completion_queue_create_for_next + grpc_completion_queue_create_for_pluck grpc_completion_queue_create grpc_completion_queue_next grpc_completion_queue_pluck diff --git a/grpc.gemspec b/grpc.gemspec index 61345695ac..7c936e34db 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -260,6 +260,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/surface/channel_init.h ) s.files += %w( src/core/lib/surface/channel_stack_type.h ) s.files += %w( src/core/lib/surface/completion_queue.h ) + s.files += %w( src/core/lib/surface/completion_queue_factory.h ) s.files += %w( src/core/lib/surface/event_string.h ) s.files += %w( src/core/lib/surface/init.h ) s.files += %w( src/core/lib/surface/lame_client.h ) @@ -473,6 +474,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/surface/channel_ping.c ) s.files += %w( src/core/lib/surface/channel_stack_type.c ) s.files += %w( src/core/lib/surface/completion_queue.c ) + s.files += %w( src/core/lib/surface/completion_queue_factory.c ) s.files += %w( src/core/lib/surface/event_string.c ) s.files += %w( src/core/lib/surface/lame_client.c ) s.files += %w( src/core/lib/surface/metadata_array.c ) diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 29fd3048fc..2f7e4ed426 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -97,6 +97,7 @@ GRPCAPI const char *grpc_g_stands_for(void); typedef enum { /** Events are popped out by calling grpc_completion_queue_next() API ONLY */ GRPC_CQ_NEXT = 1, + /** Events are popped out by calling grpc_completion_queue_pluck() API ONLY*/ GRPC_CQ_PLUCK } grpc_cq_completion_type; @@ -116,17 +117,48 @@ typedef enum { GRPC_CQ_DEFAULT_POLLING, /** Similar to GRPC_CQ_DEFAULT_POLLING except that the completion queues will - not contain any 'listening file descriptors' (i.e file descriptors used to - listen to incoming channels */ + not contain any 'listening file descriptors' (i.e file descriptors used to + listen to incoming channels) */ GRPC_CQ_NON_LISTENING, /** The completion queue will not have an associated pollset. Note that - grpc_completion_queue_next() or grpc_completion_queue_pluck() MUST still - be called to pop events from the completion queue; it is not required to - call them actively to make I/O progress */ + grpc_completion_queue_next() or grpc_completion_queue_pluck() MUST still be + called to pop events from the completion queue; it is not required to call + them actively to make I/O progress */ GRPC_CQ_NON_POLLING } grpc_cq_polling_type; + +#define GRPC_CQ_CURRENT_VERSION 1 +typedef struct grpc_completion_queue_attributes { + /* The version number of this structure. More fields might be added to this + structure in future. */ + int version; /* Set to GRPC_CQ_CURRENT_VERSION */ + + grpc_cq_completion_type cq_type; + + grpc_cq_polling_type cq_polling_type; +} grpc_completion_queue_attributes; + +/** The completion queue factory structure is opaque to the callers of grpc */ +typedef struct grpc_completion_queue_factory grpc_completion_queue_factory; + +/** Returns the completion queue factory based on the attributes. MAY return a + NULL if no factory can be found */ +GRPCAPI const grpc_completion_queue_factory * +grpc_completion_queue_factory_lookup( + const grpc_completion_queue_attributes *attributes); + +/** Helper function to create a completion queue with grpc_cq_completion_type + of GRPC_CQ_NEXT and grpc_cq_polling_type of GRPC_CQ_DEFAULT_POLLING */ +GRPCAPI grpc_completion_queue *grpc_completion_queue_create_for_next( + void *reserved); + +/** Helper function to create a completion queue with grpc_cq_completion_type + of GRPC_CQ_PLUCK and grpc_cq_polling_type of GRPC_CQ_DEFAULT_POLLING */ +GRPCAPI grpc_completion_queue *grpc_completion_queue_create_for_pluck( + void *reserved); + /** Create a completion queue */ GRPCAPI grpc_completion_queue *grpc_completion_queue_create( grpc_cq_completion_type completion_type, grpc_cq_polling_type polling_type, diff --git a/package.xml b/package.xml index c374f4a8ea..9d812692cc 100644 --- a/package.xml +++ b/package.xml @@ -269,6 +269,7 @@ <file baseinstalldir="/" name="src/core/lib/surface/channel_init.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/channel_stack_type.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/completion_queue.h" role="src" /> + <file baseinstalldir="/" name="src/core/lib/surface/completion_queue_factory.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/event_string.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/init.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/lame_client.h" role="src" /> @@ -482,6 +483,7 @@ <file baseinstalldir="/" name="src/core/lib/surface/channel_ping.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/channel_stack_type.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/completion_queue.c" role="src" /> + <file baseinstalldir="/" name="src/core/lib/surface/completion_queue_factory.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/event_string.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/lame_client.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/metadata_array.c" role="src" /> diff --git a/src/core/lib/surface/completion_queue_factory.c b/src/core/lib/surface/completion_queue_factory.c new file mode 100644 index 0000000000..138dfeff48 --- /dev/null +++ b/src/core/lib/surface/completion_queue_factory.c @@ -0,0 +1,77 @@ +/* + * + * Copyright 2017, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/surface/completion_queue_factory.h" +#include "src/core/lib/surface/completion_queue.h" + +#include <grpc/support/log.h> + +/* TODO (sreek) - Currently this does not use the attributes arg. This will be + added in a future PR */ +static grpc_completion_queue* default_create( + const grpc_completion_queue_factory* factory, + const grpc_completion_queue_attributes* attributes) { + return grpc_completion_queue_create(NULL); +} + +static grpc_completion_queue_factory_vtable default_vtable = {default_create}; + +static const grpc_completion_queue_factory g_default_cq_factory = { + "Default Factory", NULL, &default_vtable}; + +const grpc_completion_queue_factory* grpc_completion_queue_factory_lookup( + const grpc_completion_queue_attributes* attributes) { + /* As we add more fields to grpc_completion_queue_attributes, we may have to + change this assert to: + GPR_ASSERT (attributes->version >= 1 && + attributes->version <= GRPC_CQ_CURRENT_VERSION) */ + GPR_ASSERT(attributes->version == 1); + + /* The default factory can handle version 1 of the attributes structure. We + may have to change this as more fields are added to the structure */ + return &g_default_cq_factory; +} + +grpc_completion_queue* grpc_completion_queue_create_for_next(void* reserved) { + GPR_ASSERT(!reserved); + grpc_completion_queue_attributes attr = {1, GRPC_CQ_NEXT, + GRPC_CQ_DEFAULT_POLLING}; + return g_default_cq_factory.vtable->create(&g_default_cq_factory, &attr); +} + +grpc_completion_queue* grpc_completion_queue_create_for_pluck(void* reserved) { + GPR_ASSERT(!reserved); + grpc_completion_queue_attributes attr = {1, GRPC_CQ_NEXT, + GRPC_CQ_DEFAULT_POLLING}; + return g_default_cq_factory.vtable->create(&g_default_cq_factory, &attr); +} diff --git a/src/core/lib/surface/completion_queue_factory.h b/src/core/lib/surface/completion_queue_factory.h new file mode 100644 index 0000000000..57e90b5090 --- /dev/null +++ b/src/core/lib/surface/completion_queue_factory.h @@ -0,0 +1,51 @@ +/* + * + * Copyright 2017, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H +#define GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H + +#include <grpc/grpc.h> +#include "src/core/lib/surface/completion_queue.h" + +typedef struct grpc_completion_queue_factory_vtable { + grpc_completion_queue* (*create)(const grpc_completion_queue_factory*, + const grpc_completion_queue_attributes*); +} grpc_completion_queue_factory_vtable; + +struct grpc_completion_queue_factory { + const char* name; + void* data; /* Factory specific data */ + grpc_completion_queue_factory_vtable* vtable; +}; + +#endif /* GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 8edab1b759..5b79de88f4 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -179,6 +179,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/surface/channel_ping.c', 'src/core/lib/surface/channel_stack_type.c', 'src/core/lib/surface/completion_queue.c', + 'src/core/lib/surface/completion_queue_factory.c', 'src/core/lib/surface/event_string.c', 'src/core/lib/surface/lame_client.c', 'src/core/lib/surface/metadata_array.c', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 3ef6f0eb29..063f92114c 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -91,6 +91,9 @@ grpc_init_type grpc_init_import; grpc_shutdown_type grpc_shutdown_import; grpc_version_string_type grpc_version_string_import; grpc_g_stands_for_type grpc_g_stands_for_import; +grpc_completion_queue_factory_lookup_type grpc_completion_queue_factory_lookup_import; +grpc_completion_queue_create_for_next_type grpc_completion_queue_create_for_next_import; +grpc_completion_queue_create_for_pluck_type grpc_completion_queue_create_for_pluck_import; grpc_completion_queue_create_type grpc_completion_queue_create_import; grpc_completion_queue_next_type grpc_completion_queue_next_import; grpc_completion_queue_pluck_type grpc_completion_queue_pluck_import; @@ -385,6 +388,9 @@ void grpc_rb_load_imports(HMODULE library) { grpc_shutdown_import = (grpc_shutdown_type) GetProcAddress(library, "grpc_shutdown"); grpc_version_string_import = (grpc_version_string_type) GetProcAddress(library, "grpc_version_string"); grpc_g_stands_for_import = (grpc_g_stands_for_type) GetProcAddress(library, "grpc_g_stands_for"); + grpc_completion_queue_factory_lookup_import = (grpc_completion_queue_factory_lookup_type) GetProcAddress(library, "grpc_completion_queue_factory_lookup"); + grpc_completion_queue_create_for_next_import = (grpc_completion_queue_create_for_next_type) GetProcAddress(library, "grpc_completion_queue_create_for_next"); + grpc_completion_queue_create_for_pluck_import = (grpc_completion_queue_create_for_pluck_type) GetProcAddress(library, "grpc_completion_queue_create_for_pluck"); grpc_completion_queue_create_import = (grpc_completion_queue_create_type) GetProcAddress(library, "grpc_completion_queue_create"); grpc_completion_queue_next_import = (grpc_completion_queue_next_type) GetProcAddress(library, "grpc_completion_queue_next"); grpc_completion_queue_pluck_import = (grpc_completion_queue_pluck_type) GetProcAddress(library, "grpc_completion_queue_pluck"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index dccdbe7dc9..6f1f1bd4db 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -224,6 +224,15 @@ extern grpc_version_string_type grpc_version_string_import; typedef const char *(*grpc_g_stands_for_type)(void); extern grpc_g_stands_for_type grpc_g_stands_for_import; #define grpc_g_stands_for grpc_g_stands_for_import +typedef const grpc_completion_queue_factory *(*grpc_completion_queue_factory_lookup_type)(const grpc_completion_queue_attributes *attributes); +extern grpc_completion_queue_factory_lookup_type grpc_completion_queue_factory_lookup_import; +#define grpc_completion_queue_factory_lookup grpc_completion_queue_factory_lookup_import +typedef grpc_completion_queue *(*grpc_completion_queue_create_for_next_type)(void *reserved); +extern grpc_completion_queue_create_for_next_type grpc_completion_queue_create_for_next_import; +#define grpc_completion_queue_create_for_next grpc_completion_queue_create_for_next_import +typedef grpc_completion_queue *(*grpc_completion_queue_create_for_pluck_type)(void *reserved); +extern grpc_completion_queue_create_for_pluck_type grpc_completion_queue_create_for_pluck_import; +#define grpc_completion_queue_create_for_pluck grpc_completion_queue_create_for_pluck_import typedef grpc_completion_queue *(*grpc_completion_queue_create_type)(grpc_cq_completion_type completion_type, grpc_cq_polling_type polling_type, void *reserved); extern grpc_completion_queue_create_type grpc_completion_queue_create_import; #define grpc_completion_queue_create grpc_completion_queue_create_import diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index eb1c42debb..7072ff9feb 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1311,6 +1311,8 @@ src/core/lib/surface/channel_stack_type.c \ src/core/lib/surface/channel_stack_type.h \ src/core/lib/surface/completion_queue.c \ src/core/lib/surface/completion_queue.h \ +src/core/lib/surface/completion_queue_factory.c \ +src/core/lib/surface/completion_queue_factory.h \ src/core/lib/surface/event_string.c \ src/core/lib/surface/event_string.h \ src/core/lib/surface/init.c \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 940f295087..f935109d6c 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -7548,6 +7548,7 @@ "src/core/lib/surface/channel_init.h", "src/core/lib/surface/channel_stack_type.h", "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/completion_queue_factory.h", "src/core/lib/surface/event_string.h", "src/core/lib/surface/init.h", "src/core/lib/surface/lame_client.h", @@ -7772,6 +7773,8 @@ "src/core/lib/surface/channel_stack_type.h", "src/core/lib/surface/completion_queue.c", "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/completion_queue_factory.c", + "src/core/lib/surface/completion_queue_factory.h", "src/core/lib/surface/event_string.c", "src/core/lib/surface/event_string.h", "src/core/lib/surface/init.h", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index d4d59c0db7..61427a9dc1 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -388,6 +388,7 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\init.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.h" /> @@ -706,6 +707,8 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.c"> diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 45f1944c2d..6222c1049f 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -310,6 +310,9 @@ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c"> <Filter>src\core\lib\surface</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.c"> + <Filter>src\core\lib\surface</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c"> <Filter>src\core\lib\surface</Filter> </ClCompile> @@ -1049,6 +1052,9 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h"> <Filter>src\core\lib\surface</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h"> + <Filter>src\core\lib\surface</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h"> <Filter>src\core\lib\surface</Filter> </ClInclude> diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 62969e31ac..70a6d1806a 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -283,6 +283,7 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\init.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.h" /> @@ -548,6 +549,8 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.c"> diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 30088101f5..b4de56e564 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -367,6 +367,9 @@ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c"> <Filter>src\core\lib\surface</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.c"> + <Filter>src\core\lib\surface</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c"> <Filter>src\core\lib\surface</Filter> </ClCompile> @@ -830,6 +833,9 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h"> <Filter>src\core\lib\surface</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h"> + <Filter>src\core\lib\surface</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h"> <Filter>src\core\lib\surface</Filter> </ClInclude> diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index cba1dfac95..dec84b8fcd 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -378,6 +378,7 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\init.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.h" /> @@ -673,6 +674,8 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.c"> diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 1bf5374e02..7fab4b2120 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -313,6 +313,9 @@ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c"> <Filter>src\core\lib\surface</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.c"> + <Filter>src\core\lib\surface</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c"> <Filter>src\core\lib\surface</Filter> </ClCompile> @@ -959,6 +962,9 @@ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h"> <Filter>src\core\lib\surface</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h"> + <Filter>src\core\lib\surface</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h"> <Filter>src\core\lib\surface</Filter> </ClInclude> |