clang-format

pull/11547/head
Craig Tiller 8 years ago
parent c7c0b55297
commit 7fd8f67b2d
  1. 28
      src/core/lib/iomgr/ev_epollex_linux.c

@ -105,19 +105,27 @@ typedef struct pollable {
static const char *polling_obj_type_string(polling_obj_type t) { static const char *polling_obj_type_string(polling_obj_type t) {
switch (t) { switch (t) {
case PO_POLLING_GROUP: return "polling_group"; case PO_POLLING_GROUP:
case PO_POLLSET_SET: return "pollset_set"; return "polling_group";
case PO_POLLSET: return "pollset"; case PO_POLLSET_SET:
case PO_FD: return "fd"; return "pollset_set";
case PO_EMPTY_POLLABLE: return "empty_pollable"; case PO_POLLSET:
case PO_COUNT: return "<invalid:count>"; return "pollset";
case PO_FD:
return "fd";
case PO_EMPTY_POLLABLE:
return "empty_pollable";
case PO_COUNT:
return "<invalid:count>";
} }
return "<invalid>"; return "<invalid>";
} }
static char *pollable_desc(pollable *p) { static char *pollable_desc(pollable *p) {
char *out; char *out;
gpr_asprintf(&out, "type=%s group=%p epfd=%d wakeup=%d", polling_obj_type_string(p->po.type), p->po.group, p->epfd, p->wakeup.read_fd); gpr_asprintf(&out, "type=%s group=%p epfd=%d wakeup=%d",
polling_obj_type_string(p->po.type), p->po.group, p->epfd,
p->wakeup.read_fd);
return out; return out;
} }
@ -557,13 +565,15 @@ static void do_kick_all(grpc_exec_ctx *exec_ctx, void *arg,
} }
if (worker->initialized_cv && worker != pollset->root_worker) { if (worker->initialized_cv && worker != pollset->root_worker) {
if (GRPC_TRACER_ON(grpc_polling_trace)) { if (GRPC_TRACER_ON(grpc_polling_trace)) {
gpr_log(GPR_DEBUG, "PS:%p kickall_via_cv %p (pollable %p vs %p)", pollset, worker, &pollset->pollable, worker->pollable); gpr_log(GPR_DEBUG, "PS:%p kickall_via_cv %p (pollable %p vs %p)",
pollset, worker, &pollset->pollable, worker->pollable);
} }
worker->kicked = true; worker->kicked = true;
gpr_cv_signal(&worker->cv); gpr_cv_signal(&worker->cv);
} else { } else {
if (GRPC_TRACER_ON(grpc_polling_trace)) { if (GRPC_TRACER_ON(grpc_polling_trace)) {
gpr_log(GPR_DEBUG, "PS:%p kickall_via_wakeup %p (pollable %p vs %p)", pollset, worker, &pollset->pollable, worker->pollable); gpr_log(GPR_DEBUG, "PS:%p kickall_via_wakeup %p (pollable %p vs %p)",
pollset, worker, &pollset->pollable, worker->pollable);
} }
append_error(&error, grpc_wakeup_fd_wakeup(&worker->pollable->wakeup), append_error(&error, grpc_wakeup_fd_wakeup(&worker->pollable->wakeup),
"pollset_shutdown"); "pollset_shutdown");

Loading…
Cancel
Save