diff --git a/BUILD b/BUILD index 33daa2be7403bd9a72a8236d897b009a34a33e6a..b3617e02ceda6bba17ba5aa6b768206af6c7108b 100644 --- a/BUILD +++ b/BUILD @@ -308,8 +308,8 @@ grpc_cc_library( srcs = [ "src/core/lib/profiling/basic_timers.c", "src/core/lib/profiling/stap_timers.c", - "src/core/lib/support/arena.c", "src/core/lib/support/alloc.c", + "src/core/lib/support/arena.c", "src/core/lib/support/atm.c", "src/core/lib/support/avl.c", "src/core/lib/support/backoff.c", @@ -528,6 +528,7 @@ grpc_cc_library( "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", @@ -638,6 +639,7 @@ grpc_cc_library( "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", diff --git a/CMakeLists.txt b/CMakeLists.txt index f73d76dbe64e5c97f6bda658df8c27d5784c1820..1ddeb9e34c0a8219f17d153451041e92773dd661 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -969,6 +969,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 @@ -1281,6 +1282,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 @@ -1584,6 +1586,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 @@ -1834,6 +1837,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 @@ -2444,6 +2448,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 diff --git a/Makefile b/Makefile index 9d3aee8a7199c7b6585f2d0e6fa7ce20e25f04d5..1be009f276f388764c83ba3f7dc99b61316b8009 100644 --- a/Makefile +++ b/Makefile @@ -2860,6 +2860,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 \ @@ -3175,6 +3176,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 \ @@ -3711,6 +3714,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 ced23e26dfa86919231ce71ad1dcde795f541a7a..e4335b55029a733e1c066534dd7b21d535c24abc 100644 --- a/binding.gyp +++ b/binding.gyp @@ -711,6 +711,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 63f22fd2fd7855a5473258c5cebda3cc63d44aab..650f1274929d41f8a372977b973783ee56ca929d 100644 --- a/build.yaml +++ b/build.yaml @@ -263,6 +263,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 @@ -386,6 +387,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 diff --git a/config.m4 b/config.m4 index 96ac5588c0fa3781458af060a4dd84dba46c5739..226cdbd43712b60328205482d6a87d2389d16cf3 100644 --- a/config.m4 +++ b/config.m4 @@ -186,6 +186,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 e45631e6bcf0da81f7d4dda35726dcef904e33bf..348ff0eb52f00045946de2c4912930fca7273a8a 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -344,6 +344,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', @@ -557,6 +558,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', diff --git a/grpc.def b/grpc.def index 30d60b0d06d42aecf894460d0ffe257f59070dac..1589316a58818fc616fa41d7cf78bc7984561855 100644 --- a/grpc.def +++ b/grpc.def @@ -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 c7d9bfb433f25bd5556874a87b3cb1099e5b4ede..7559d5606ff00839887d3f817f8a7fe056e9fe1b 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -261,6 +261,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 ) @@ -474,6 +475,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 1b33d48c02342c140530fb2002d354c7901af988..e088435d6cc7647c0b88da1333c1d661ad2777d9 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -93,6 +93,71 @@ GRPCAPI const char *grpc_version_string(void); /** Return a string specifying what the 'g' in gRPC stands for */ GRPCAPI const char *grpc_g_stands_for(void); +/** Specifies the type of APIs to use to pop events from the completion queue */ +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; + +/** Completion queues internally MAY maintain a set of file descriptors in a + structure called 'pollset'. This enum specifies if a completion queue has an + associated pollset and any restrictions on the type of file descriptors that + can be present in the pollset. + + I/O progress can only be made when grpc_completion_queue_next() or + grpc_completion_queue_pluck() are called on the completion queue (unless the + grpc_cq_polling_type is GRPC_CQ_NON_POLLING) and hence it is very important + to actively call these APIs */ +typedef enum { + /** The completion queue will have an associated pollset and there is no + restriction on the type of file descriptors the pollset may contain */ + 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) */ + 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_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_completion_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(void *reserved); diff --git a/package.xml b/package.xml index a47f1b9761aa3357cb8c3be3bf0ca1dc028b0118..429d07fd72464081b3bc6844b17fca4cedb43630 100644 --- a/package.xml +++ b/package.xml @@ -270,6 +270,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" /> @@ -483,6 +484,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 0000000000000000000000000000000000000000..db67a5192be5904153f8f9cf10cb1d24dd3d06d9 --- /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_PLUCK, + 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 0000000000000000000000000000000000000000..57e90b509074cdfb7c5f2b8348b2431f9ee852f5 --- /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 249d63ddd0949ce03ba5f4c7275e1ca92b8f15cf..f5f1182f5d65e1a756779e9f1fcefe525b45ff65 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -180,6 +180,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 3ef6f0eb299f1abf2aaaef7542ceaeec96dad4c6..063f92114c0ecd30a484d318408fa31ca9577db3 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 ef9845dfe06407f633b3038a615f03acf92fb395..f5dcd68a8e9b78f2ec1c463921125a0f935b74d2 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)(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 5eb74ea77dbf8019c736892666bfa7248d79581a..4ab24d1bc5fe4d2c78e86d86546197a918b93988 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 81dbd0200830df168e6a08e8b9e95793f7066ee3..147c22fcde309408d780d3fb6a95064e34a3a066 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -7552,6 +7552,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", @@ -7778,6 +7779,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 ccf0d4d87d456653dadce7b48bd33377f41f7995..b15c002aa60e3681724ed8368ec6553bc1d3d824 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -389,6 +389,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" /> @@ -708,6 +709,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 e9d950a9625d3a23de4c3a6e82ca22914b652b99..262ec83ebe5ad300b3749d195b97dc2164810bdb 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.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> @@ -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 734ce1b0252aa03957e9ca18be3cd7777753b5f7..04d6d9f55a32d0328b519eea885790d8a6f337fb 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -284,6 +284,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" /> @@ -551,6 +552,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 63eb9a03058ff65384338ac360d7e15054aa5718..a2849888a14d12c5455acd9f846ce4ef008f57cd 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -370,6 +370,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> @@ -836,6 +839,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 a077f0ec3c21d3551eb4ba68cdde320ef719e738..b94b6e6074d168e551b35ecf109f0f1abbf72306 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -379,6 +379,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" /> @@ -675,6 +676,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 e8b381cdc01047903a4d12183b29b6a1c3f5d7ea..86dea27c99b87f20f55ae461be6b554e973a4047 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -316,6 +316,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>