Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
add6962d
Commit
add6962d
authored
8 years ago
by
Sree Kuchibhotla
Browse files
Options
Downloads
Patches
Plain Diff
Add version macro
parent
bf184287
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/grpc/grpc.h
+3
-1
3 additions, 1 deletion
include/grpc/grpc.h
src/core/lib/surface/completion_queue_factory.c
+3
-1
3 additions, 1 deletion
src/core/lib/surface/completion_queue_factory.c
with
6 additions
and
2 deletions
include/grpc/grpc.h
+
3
−
1
View file @
add6962d
...
@@ -128,10 +128,12 @@ typedef enum {
...
@@ -128,10 +128,12 @@ typedef enum {
GRPC_CQ_NON_POLLING
GRPC_CQ_NON_POLLING
}
grpc_cq_polling_type
;
}
grpc_cq_polling_type
;
#define GRPC_CQ_CURRENT_VERSION 1
typedef
struct
grpc_completion_queue_attributes
{
typedef
struct
grpc_completion_queue_attributes
{
/* The version number of this structure. More fields might be added to this
/* The version number of this structure. More fields might be added to this
structure in future. */
structure in future. */
int
version
;
/*
Current version is 1
*/
int
version
;
/*
Set to GRPC_CQ_CURRENT_VERSION
*/
grpc_cq_completion_type
cq_type
;
grpc_cq_completion_type
cq_type
;
...
...
This diff is collapsed.
Click to expand it.
src/core/lib/surface/completion_queue_factory.c
+
3
−
1
View file @
add6962d
...
@@ -52,7 +52,9 @@ static const grpc_completion_queue_factory g_default_cq_factory = {
...
@@ -52,7 +52,9 @@ static const grpc_completion_queue_factory g_default_cq_factory = {
const
grpc_completion_queue_factory
*
grpc_completion_queue_factory_lookup
(
const
grpc_completion_queue_factory
*
grpc_completion_queue_factory_lookup
(
const
grpc_completion_queue_attributes
*
attributes
)
{
const
grpc_completion_queue_attributes
*
attributes
)
{
/* As we add more fields to grpc_completion_queue_attributes, we may have to
/* As we add more fields to grpc_completion_queue_attributes, we may have to
change this assert */
change this assert to:
GPR_ASSERT (attributes->version >= 1 &&
attributes->version <= GRPC_CQ_CURRENT_VERSION) */
GPR_ASSERT
(
attributes
->
version
==
1
);
GPR_ASSERT
(
attributes
->
version
==
1
);
/* The default factory can handle version 1 of the attributes structure. We
/* The default factory can handle version 1 of the attributes structure. We
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment