|
|
@ -425,7 +425,12 @@ static grpc_cq_completion *allocate_completion(grpc_call *call) { |
|
|
|
if (call->allocated_completions & (1u << i)) { |
|
|
|
if (call->allocated_completions & (1u << i)) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
call->allocated_completions |= (gpr_uint8)(1u << i); |
|
|
|
/* NB: the following integer arithmetic operation needs to be in its
|
|
|
|
|
|
|
|
* expanded form due to the "integral promotion" performed (see section |
|
|
|
|
|
|
|
* 3.2.1.1 of the C89 draft standard). A cast to the smaller container type |
|
|
|
|
|
|
|
* is then required to avoid the compiler warning */ |
|
|
|
|
|
|
|
call->allocated_completions = |
|
|
|
|
|
|
|
(gpr_uint8)(call->allocated_completions | (1u << i)); |
|
|
|
gpr_mu_unlock(&call->completion_mu); |
|
|
|
gpr_mu_unlock(&call->completion_mu); |
|
|
|
return &call->completions[i]; |
|
|
|
return &call->completions[i]; |
|
|
|
} |
|
|
|
} |
|
|
@ -736,7 +741,11 @@ static void finish_live_ioreq_op(grpc_call *call, grpc_ioreq_op op, |
|
|
|
size_t i; |
|
|
|
size_t i; |
|
|
|
/* ioreq is live: we need to do something */ |
|
|
|
/* ioreq is live: we need to do something */ |
|
|
|
master = &call->masters[master_set]; |
|
|
|
master = &call->masters[master_set]; |
|
|
|
master->complete_mask |= (gpr_uint16)(1u << op); |
|
|
|
/* NB: the following integer arithmetic operation needs to be in its
|
|
|
|
|
|
|
|
* expanded form due to the "integral promotion" performed (see section |
|
|
|
|
|
|
|
* 3.2.1.1 of the C89 draft standard). A cast to the smaller container type |
|
|
|
|
|
|
|
* is then required to avoid the compiler warning */ |
|
|
|
|
|
|
|
master->complete_mask = (gpr_uint16)(master->complete_mask | (1u << op)); |
|
|
|
if (!success) { |
|
|
|
if (!success) { |
|
|
|
master->success = 0; |
|
|
|
master->success = 0; |
|
|
|
} |
|
|
|
} |
|
|
@ -1246,7 +1255,11 @@ static grpc_call_error start_ioreq(grpc_call *call, const grpc_ioreq *reqs, |
|
|
|
GRPC_MDSTR_REF(reqs[i].data.send_status.details)); |
|
|
|
GRPC_MDSTR_REF(reqs[i].data.send_status.details)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
have_ops |= (gpr_uint16)(1u << op); |
|
|
|
/* NB: the following integer arithmetic operation needs to be in its
|
|
|
|
|
|
|
|
* expanded form due to the "integral promotion" performed (see section |
|
|
|
|
|
|
|
* 3.2.1.1 of the C89 draft standard). A cast to the smaller container type |
|
|
|
|
|
|
|
* is then required to avoid the compiler warning */ |
|
|
|
|
|
|
|
have_ops = (gpr_uint16)(have_ops | (1u << op)); |
|
|
|
|
|
|
|
|
|
|
|
call->request_data[op] = data; |
|
|
|
call->request_data[op] = data; |
|
|
|
call->request_flags[op] = reqs[i].flags; |
|
|
|
call->request_flags[op] = reqs[i].flags; |
|
|
|