aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-07-14 07:12:19 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-07-14 07:12:19 -0700
commitb6450260db8d0abc4a8be50e6340a76b4ada5bb8 (patch)
tree2613398f10d218812f196a02beef1de9c42d7f3d /src/core
parentffe27b98b90ea9f196b89153959c587561ad4ce2 (diff)
Initial fixes for lock free request path
Diffstat (limited to 'src/core')
-rw-r--r--src/core/surface/server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/surface/server.c b/src/core/surface/server.c
index 9eb501decb..84c25c3cfd 100644
--- a/src/core/surface/server.c
+++ b/src/core/surface/server.c
@@ -317,7 +317,9 @@ static void request_matcher_zombify_all_pending_calls(
while (request_matcher->pending_head) {
call_data *calld = request_matcher->pending_head;
request_matcher->pending_head = calld->pending_next;
+ gpr_mu_lock(&calld->mu_state);
calld->state = ZOMBIED;
+ gpr_mu_unlock(&calld->mu_state);
grpc_iomgr_closure_init(
&calld->kill_zombie_closure, kill_zombie,
grpc_call_stack_element(grpc_call_get_call_stack(calld->call), 0));
@@ -1117,7 +1119,7 @@ static grpc_call_error queue_call_request(grpc_server *server,
GPR_ASSERT(calld->state == PENDING);
calld->state = ACTIVATED;
gpr_mu_unlock(&calld->mu_state);
- begin_call(server, calld, rc);
+ begin_call(server, calld, &server->requested_calls[request_id]);
}
gpr_mu_lock(&server->mu_call);
}