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
40945c70
Commit
40945c70
authored
8 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Add missing function for completion queue
parent
9f9d4223
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
src/core/lib/surface/completion_queue.c
+5
-0
5 additions, 0 deletions
src/core/lib/surface/completion_queue.c
test/core/surface/completion_queue_test.c
+6
-0
6 additions, 0 deletions
test/core/surface/completion_queue_test.c
with
11 additions
and
0 deletions
src/core/lib/surface/completion_queue.c
+
5
−
0
View file @
40945c70
...
...
@@ -86,6 +86,7 @@ struct grpc_completion_queue {
};
#define POLLSET_FROM_CQ(cq) ((grpc_pollset *)(cq + 1))
#define CQ_FROM_POLLSET(ps) (((grpc_completion_queue *)ps) - 1)
static
gpr_mu
g_freelist_mu
;
static
grpc_completion_queue
*
g_freelist
;
...
...
@@ -514,6 +515,10 @@ grpc_pollset *grpc_cq_pollset(grpc_completion_queue *cc) {
return
POLLSET_FROM_CQ
(
cc
);
}
grpc_completion_queue
*
grpc_cq_from_pollset
(
grpc_pollset
*
ps
)
{
return
CQ_FROM_POLLSET
(
ps
);
}
void
grpc_cq_mark_non_listening_server_cq
(
grpc_completion_queue
*
cc
)
{
cc
->
is_non_listening_server_cq
=
1
;
}
...
...
This diff is collapsed.
Click to expand it.
test/core/surface/completion_queue_test.c
+
6
−
0
View file @
40945c70
...
...
@@ -63,6 +63,12 @@ static void test_no_op(void) {
shutdown_and_destroy
(
grpc_completion_queue_create
(
NULL
));
}
static
void
test_pollset_conversion
()
{
grpc_completion_queue
*
cq
=
grpc_completion_queue
(
NULL
);
GPR_ASSERT
(
grpc_cq_from_pollset
(
grpc_cq_pollset
(
cq
))
==
cq
);
shutdown_and_destroy
(
cq
);
}
static
void
test_wait_empty
(
void
)
{
grpc_completion_queue
*
cc
;
grpc_event
event
;
...
...
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