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
d2a82d9d
Commit
d2a82d9d
authored
9 years ago
by
Vijay Pai
Browse files
Options
Downloads
Patches
Plain Diff
Added comments to describe nesting of mutexes
parent
8931cdd2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/surface/server.c
+9
-2
9 additions, 2 deletions
src/core/surface/server.c
with
9 additions
and
2 deletions
src/core/surface/server.c
+
9
−
2
View file @
d2a82d9d
...
@@ -141,8 +141,15 @@ struct grpc_server {
...
@@ -141,8 +141,15 @@ struct grpc_server {
grpc_pollset
**
pollsets
;
grpc_pollset
**
pollsets
;
size_t
cq_count
;
size_t
cq_count
;
gpr_mu
mu_global
;
/* The two following mutexes control access to server-state
gpr_mu
mu_call
;
mu_global controls access to non-call-related state (e.g., channel state)
mu_call controls access to call-related state (e.g., the call lists)
If they are ever required to be nested, you must lock mu_global
before mu_call. This is currently used in shutdown processing
(grpc_server_shutdown_and_notify and maybe_finish_shutdown) */
gpr_mu
mu_global
;
/* mutex for server and channel state */
gpr_mu
mu_call
;
/* mutex for call-specific state */
registered_method
*
registered_methods
;
registered_method
*
registered_methods
;
requested_call_array
requested_calls
;
requested_call_array
requested_calls
;
...
...
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