aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2015-10-01 23:23:50 -0700
committerGravatar Vijay Pai <vpai@google.com>2015-10-01 23:23:50 -0700
commit7a94236d698477636dd06282f12f706cad527029 (patch)
treea61d2b44b373d5e7701a52059b31800a7583c230 /src/core
parent8f64d5c311ecb3a58fe5075e25732ea1b2467436 (diff)
parentb7a597771f4db347748b5e5f89d02ed067c5a614 (diff)
Merge pull request #3556 from ctiller/clangf
Fix clang-format script
Diffstat (limited to 'src/core')
-rw-r--r--src/core/channel/client_channel.c13
-rw-r--r--src/core/channel/compress_filter.c13
-rw-r--r--src/core/channel/connected_channel.c13
-rw-r--r--src/core/channel/noop_filter.c14
-rw-r--r--src/core/client_config/lb_policies/pick_first.c9
-rw-r--r--src/core/client_config/lb_policies/round_robin.c9
-rw-r--r--src/core/client_config/subchannel.c20
-rw-r--r--src/core/iomgr/exec_ctx.h2
-rw-r--r--src/core/iomgr/iocp_windows.c13
-rw-r--r--src/core/iomgr/iomgr_posix.c7
-rw-r--r--src/core/iomgr/iomgr_windows.c4
-rw-r--r--src/core/iomgr/pollset_multipoller_with_epoll.c8
-rw-r--r--src/core/iomgr/pollset_posix.c4
-rw-r--r--src/core/iomgr/pollset_windows.c78
-rw-r--r--src/core/iomgr/tcp_posix.c4
-rw-r--r--src/core/iomgr/tcp_server_windows.c2
-rw-r--r--src/core/iomgr/tcp_windows.c6
-rw-r--r--src/core/iomgr/udp_server.c2
-rw-r--r--src/core/security/client_auth_filter.c9
-rw-r--r--src/core/security/secure_endpoint.c5
-rw-r--r--src/core/security/server_auth_filter.c9
-rw-r--r--src/core/statistics/census_rpc_stats.c4
-rw-r--r--src/core/statistics/census_tracing.c7
-rw-r--r--src/core/support/slice_buffer.c3
-rw-r--r--src/core/surface/lame_client.c13
-rw-r--r--src/core/surface/server.c18
-rw-r--r--src/core/surface/version.c4
-rw-r--r--src/core/transport/chttp2/bin_encoder.c76
-rw-r--r--src/core/transport/chttp2/hpack_parser.c10
-rw-r--r--src/core/transport/chttp2/huffsyms.c320
-rw-r--r--src/core/transport/chttp2/stream_encoder.c4
-rw-r--r--src/core/transport/chttp2_transport.c14
-rw-r--r--src/core/tsi/fake_transport_security.c6
-rw-r--r--src/core/tsi/ssl_transport_security.c6
34 files changed, 451 insertions, 278 deletions
diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c
index 0193928a50..b59b62a6aa 100644
--- a/src/core/channel/client_channel.c
+++ b/src/core/channel/client_channel.c
@@ -692,16 +692,9 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
}
const grpc_channel_filter grpc_client_channel_filter = {
- cc_start_transport_stream_op,
- cc_start_transport_op,
- sizeof(call_data),
- init_call_elem,
- destroy_call_elem,
- sizeof(channel_data),
- init_channel_elem,
- destroy_channel_elem,
- cc_get_peer,
- "client-channel",
+ cc_start_transport_stream_op, cc_start_transport_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem,
+ destroy_channel_elem, cc_get_peer, "client-channel",
};
void grpc_client_channel_set_resolver(grpc_exec_ctx *exec_ctx,
diff --git a/src/core/channel/compress_filter.c b/src/core/channel/compress_filter.c
index 2aa826fcd8..182fbf18bf 100644
--- a/src/core/channel/compress_filter.c
+++ b/src/core/channel/compress_filter.c
@@ -387,13 +387,6 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
}
const grpc_channel_filter grpc_compress_filter = {
- compress_start_transport_stream_op,
- grpc_channel_next_op,
- sizeof(call_data),
- init_call_elem,
- destroy_call_elem,
- sizeof(channel_data),
- init_channel_elem,
- destroy_channel_elem,
- grpc_call_next_get_peer,
- "compress"};
+ compress_start_transport_stream_op, grpc_channel_next_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem,
+ destroy_channel_elem, grpc_call_next_get_peer, "compress"};
diff --git a/src/core/channel/connected_channel.c b/src/core/channel/connected_channel.c
index ea701bc284..f9fc280259 100644
--- a/src/core/channel/connected_channel.c
+++ b/src/core/channel/connected_channel.c
@@ -130,16 +130,9 @@ static char *con_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) {
}
const grpc_channel_filter grpc_connected_channel_filter = {
- con_start_transport_stream_op,
- con_start_transport_op,
- sizeof(call_data),
- init_call_elem,
- destroy_call_elem,
- sizeof(channel_data),
- init_channel_elem,
- destroy_channel_elem,
- con_get_peer,
- "connected",
+ con_start_transport_stream_op, con_start_transport_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem,
+ destroy_channel_elem, con_get_peer, "connected",
};
void grpc_connected_channel_bind_transport(grpc_channel_stack *channel_stack,
diff --git a/src/core/channel/noop_filter.c b/src/core/channel/noop_filter.c
index 91b30d61ca..48f6b1c650 100644
--- a/src/core/channel/noop_filter.c
+++ b/src/core/channel/noop_filter.c
@@ -116,13 +116,7 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
ignore_unused(channeld);
}
-const grpc_channel_filter grpc_no_op_filter = {noop_start_transport_stream_op,
- grpc_channel_next_op,
- sizeof(call_data),
- init_call_elem,
- destroy_call_elem,
- sizeof(channel_data),
- init_channel_elem,
- destroy_channel_elem,
- grpc_call_next_get_peer,
- "no-op"};
+const grpc_channel_filter grpc_no_op_filter = {
+ noop_start_transport_stream_op, grpc_channel_next_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem,
+ destroy_channel_elem, grpc_call_next_get_peer, "no-op"};
diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c
index 5fa1ee4418..28155d0fbc 100644
--- a/src/core/client_config/lb_policies/pick_first.c
+++ b/src/core/client_config/lb_policies/pick_first.c
@@ -317,13 +317,8 @@ void pf_notify_on_state_change(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
}
static const grpc_lb_policy_vtable pick_first_lb_policy_vtable = {
- pf_destroy,
- pf_shutdown,
- pf_pick,
- pf_exit_idle,
- pf_broadcast,
- pf_check_connectivity,
- pf_notify_on_state_change};
+ pf_destroy, pf_shutdown, pf_pick, pf_exit_idle, pf_broadcast,
+ pf_check_connectivity, pf_notify_on_state_change};
static void pick_first_factory_ref(grpc_lb_policy_factory *factory) {}
diff --git a/src/core/client_config/lb_policies/round_robin.c b/src/core/client_config/lb_policies/round_robin.c
index 479c376724..d0b60a0df2 100644
--- a/src/core/client_config/lb_policies/round_robin.c
+++ b/src/core/client_config/lb_policies/round_robin.c
@@ -487,13 +487,8 @@ static void rr_notify_on_state_change(grpc_exec_ctx *exec_ctx,
}
static const grpc_lb_policy_vtable round_robin_lb_policy_vtable = {
- rr_destroy,
- rr_shutdown,
- rr_pick,
- rr_exit_idle,
- rr_broadcast,
- rr_check_connectivity,
- rr_notify_on_state_change};
+ rr_destroy, rr_shutdown, rr_pick, rr_exit_idle, rr_broadcast,
+ rr_check_connectivity, rr_notify_on_state_change};
static void round_robin_factory_ref(grpc_lb_policy_factory *factory) {}
diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c
index 740389003a..a94c69123e 100644
--- a/src/core/client_config/subchannel.c
+++ b/src/core/client_config/subchannel.c
@@ -153,8 +153,8 @@ static gpr_timespec compute_connect_deadline(grpc_subchannel *c);
static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *subchannel,
int iomgr_success);
-static void subchannel_ref_locked(
- grpc_subchannel *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS);
+static void subchannel_ref_locked(grpc_subchannel *c
+ GRPC_SUBCHANNEL_REF_EXTRA_ARGS);
static int subchannel_unref_locked(
grpc_subchannel *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) GRPC_MUST_USE_RESULT;
static void connection_ref_locked(connection *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS);
@@ -203,8 +203,8 @@ static void connection_destroy(grpc_exec_ctx *exec_ctx, connection *c) {
gpr_free(c);
}
-static void connection_ref_locked(
- connection *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
+static void connection_ref_locked(connection *c
+ GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
REF_LOG("CONNECTION", c);
subchannel_ref_locked(c->subchannel REF_PASS_ARGS);
++c->refs;
@@ -227,14 +227,14 @@ static grpc_subchannel *connection_unref_locked(
* grpc_subchannel implementation
*/
-static void subchannel_ref_locked(
- grpc_subchannel *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
+static void subchannel_ref_locked(grpc_subchannel *c
+ GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
REF_LOG("SUBCHANNEL", c);
++c->refs;
}
-static int subchannel_unref_locked(
- grpc_subchannel *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
+static int subchannel_unref_locked(grpc_subchannel *c
+ GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
UNREF_LOG("SUBCHANNEL", c);
return --c->refs == 0;
}
@@ -709,8 +709,8 @@ static void connectivity_state_changed_locked(grpc_exec_ctx *exec_ctx,
* grpc_subchannel_call implementation
*/
-void grpc_subchannel_call_ref(
- grpc_subchannel_call *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
+void grpc_subchannel_call_ref(grpc_subchannel_call *c
+ GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
gpr_ref(&c->refs);
}
diff --git a/src/core/iomgr/exec_ctx.h b/src/core/iomgr/exec_ctx.h
index aa0610cbea..43df488094 100644
--- a/src/core/iomgr/exec_ctx.h
+++ b/src/core/iomgr/exec_ctx.h
@@ -61,7 +61,7 @@ struct grpc_exec_ctx {
{ GRPC_CLOSURE_LIST_INIT }
/** Flush any work that has been enqueued onto this grpc_exec_ctx.
- * Caller must guarantee that no interfering locks are held.
+ * Caller must guarantee that no interfering locks are held.
* Returns 1 if work was performed, 0 otherwise. */
int grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx);
/** Finish any pending work for a grpc_exec_ctx. Must be called before
diff --git a/src/core/iomgr/iocp_windows.c b/src/core/iomgr/iocp_windows.c
index cf33d74366..cebd863924 100644
--- a/src/core/iomgr/iocp_windows.c
+++ b/src/core/iomgr/iocp_windows.c
@@ -62,13 +62,13 @@ static DWORD deadline_to_millis_timeout(gpr_timespec deadline,
return INFINITE;
}
if (gpr_time_cmp(deadline, gpr_time_add(now, gpr_time_from_micros(
- max_spin_polling_us,
- GPR_TIMESPAN))) <= 0) {
+ max_spin_polling_us,
+ GPR_TIMESPAN))) <= 0) {
return 0;
}
timeout = gpr_time_sub(deadline, now);
return gpr_time_to_millis(gpr_time_add(
- timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN)));
+ timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN)));
}
void grpc_iocp_work(grpc_exec_ctx *exec_ctx, gpr_timespec deadline) {
@@ -80,8 +80,9 @@ void grpc_iocp_work(grpc_exec_ctx *exec_ctx, gpr_timespec deadline) {
grpc_winsocket *socket;
grpc_winsocket_callback_info *info;
grpc_closure *closure = NULL;
- success = GetQueuedCompletionStatus(g_iocp, &bytes, &completion_key,
- &overlapped, deadline_to_millis_timeout(deadline, gpr_now(deadline.clock_type)));
+ success = GetQueuedCompletionStatus(
+ g_iocp, &bytes, &completion_key, &overlapped,
+ deadline_to_millis_timeout(deadline, gpr_now(deadline.clock_type)));
if (success == 0 && overlapped == NULL) {
return;
}
@@ -139,7 +140,7 @@ void grpc_iocp_kick(void) {
void grpc_iocp_flush(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
-
+
do {
grpc_iocp_work(&exec_ctx, gpr_inf_past(GPR_CLOCK_MONOTONIC));
} while (grpc_exec_ctx_flush(&exec_ctx));
diff --git a/src/core/iomgr/iomgr_posix.c b/src/core/iomgr/iomgr_posix.c
index f6474b7e6d..fecb7b9760 100644
--- a/src/core/iomgr/iomgr_posix.c
+++ b/src/core/iomgr/iomgr_posix.c
@@ -45,11 +45,8 @@ void grpc_iomgr_platform_init(void) {
grpc_register_tracer("tcp", &grpc_tcp_trace);
}
-void grpc_iomgr_platform_flush(void) {
-}
+void grpc_iomgr_platform_flush(void) {}
-void grpc_iomgr_platform_shutdown(void) {
- grpc_fd_global_shutdown();
-}
+void grpc_iomgr_platform_shutdown(void) { grpc_fd_global_shutdown(); }
#endif /* GRPC_POSIX_SOCKET */
diff --git a/src/core/iomgr/iomgr_windows.c b/src/core/iomgr/iomgr_windows.c
index 93bdc5ec16..14775516bb 100644
--- a/src/core/iomgr/iomgr_windows.c
+++ b/src/core/iomgr/iomgr_windows.c
@@ -63,9 +63,7 @@ void grpc_iomgr_platform_init(void) {
grpc_iocp_init();
}
-void grpc_iomgr_platform_flush(void) {
- grpc_iocp_flush();
-}
+void grpc_iomgr_platform_flush(void) { grpc_iocp_flush(); }
void grpc_iomgr_platform_shutdown(void) {
grpc_iocp_shutdown();
diff --git a/src/core/iomgr/pollset_multipoller_with_epoll.c b/src/core/iomgr/pollset_multipoller_with_epoll.c
index d26e60f665..faf0a6362b 100644
--- a/src/core/iomgr/pollset_multipoller_with_epoll.c
+++ b/src/core/iomgr/pollset_multipoller_with_epoll.c
@@ -198,7 +198,7 @@ static void multipoll_with_epoll_pollset_maybe_work_and_unlock(
}
if (pfds[1].revents) {
do {
- /* The following epoll_wait never blocks; it has a timeout of 0 */
+ /* The following epoll_wait never blocks; it has a timeout of 0 */
ep_rv = epoll_wait(h->epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, 0);
if (ep_rv < 0) {
if (errno != EINTR) {
@@ -264,9 +264,11 @@ static void epoll_become_multipoller(grpc_exec_ctx *exec_ctx,
ev.events = (uint32_t)(EPOLLIN | EPOLLET);
ev.data.ptr = NULL;
- err = epoll_ctl(h->epoll_fd, EPOLL_CTL_ADD, GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), &ev);
+ err = epoll_ctl(h->epoll_fd, EPOLL_CTL_ADD,
+ GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), &ev);
if (err < 0) {
- gpr_log(GPR_ERROR, "epoll_ctl add for %d failed: %s", GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd),
+ gpr_log(GPR_ERROR, "epoll_ctl add for %d failed: %s",
+ GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd),
strerror(errno));
}
diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c
index 82a82cc064..464c1f6ae3 100644
--- a/src/core/iomgr/pollset_posix.c
+++ b/src/core/iomgr/pollset_posix.c
@@ -139,9 +139,7 @@ void grpc_pollset_global_shutdown(void) {
gpr_tls_destroy(&g_current_thread_worker);
}
-void grpc_kick_poller(void) {
- grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd);
-}
+void grpc_kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); }
/* main interface */
diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c
index 1b4935a841..96abaea0b3 100644
--- a/src/core/iomgr/pollset_windows.c
+++ b/src/core/iomgr/pollset_windows.c
@@ -51,22 +51,21 @@ void grpc_pollset_global_init() {
gpr_mu_init(&grpc_polling_mu);
g_active_poller = NULL;
g_global_root_worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].next =
- g_global_root_worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].prev =
- &g_global_root_worker;
+ g_global_root_worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].prev =
+ &g_global_root_worker;
}
-void grpc_pollset_global_shutdown() {
- gpr_mu_destroy(&grpc_polling_mu);
-}
+void grpc_pollset_global_shutdown() { gpr_mu_destroy(&grpc_polling_mu); }
-static void remove_worker(grpc_pollset_worker *worker,
+static void remove_worker(grpc_pollset_worker *worker,
grpc_pollset_worker_link_type type) {
worker->links[type].prev->links[type].next = worker->links[type].next;
worker->links[type].next->links[type].prev = worker->links[type].prev;
worker->links[type].next = worker->links[type].prev = worker;
}
-static int has_workers(grpc_pollset_worker *root, grpc_pollset_worker_link_type type) {
+static int has_workers(grpc_pollset_worker *root,
+ grpc_pollset_worker_link_type type) {
return root->links[type].next != root;
}
@@ -81,24 +80,22 @@ static grpc_pollset_worker *pop_front_worker(
}
}
-static void push_back_worker(grpc_pollset_worker *root,
- grpc_pollset_worker_link_type type,
+static void push_back_worker(grpc_pollset_worker *root,
+ grpc_pollset_worker_link_type type,
grpc_pollset_worker *worker) {
worker->links[type].next = root;
worker->links[type].prev = worker->links[type].next->links[type].prev;
- worker->links[type].prev->links[type].next =
- worker->links[type].next->links[type].prev =
- worker;
+ worker->links[type].prev->links[type].next =
+ worker->links[type].next->links[type].prev = worker;
}
-static void push_front_worker(grpc_pollset_worker *root,
- grpc_pollset_worker_link_type type,
+static void push_front_worker(grpc_pollset_worker *root,
+ grpc_pollset_worker_link_type type,
grpc_pollset_worker *worker) {
worker->links[type].prev = root;
worker->links[type].next = worker->links[type].prev->links[type].next;
- worker->links[type].prev->links[type].next =
- worker->links[type].next->links[type].prev =
- worker;
+ worker->links[type].prev->links[type].next =
+ worker->links[type].next->links[type].prev = worker;
}
/* There isn't really any such thing as a pollset under Windows, due to the
@@ -108,9 +105,9 @@ static void push_front_worker(grpc_pollset_worker *root,
void grpc_pollset_init(grpc_pollset *pollset) {
memset(pollset, 0, sizeof(*pollset));
- pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next =
- pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev =
- &pollset->root_worker;
+ pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next =
+ pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev =
+ &pollset->root_worker;
}
void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
@@ -126,18 +123,16 @@ void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
gpr_mu_unlock(&grpc_polling_mu);
}
-void grpc_pollset_destroy(grpc_pollset *pollset) {
-}
+void grpc_pollset_destroy(grpc_pollset *pollset) {}
void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker *worker, gpr_timespec now,
gpr_timespec deadline) {
int added_worker = 0;
- worker->links[GRPC_POLLSET_WORKER_LINK_POLLSET].next =
- worker->links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev =
- worker->links[GRPC_POLLSET_WORKER_LINK_GLOBAL].next =
- worker->links[GRPC_POLLSET_WORKER_LINK_GLOBAL].prev =
- NULL;
+ worker->links[GRPC_POLLSET_WORKER_LINK_POLLSET].next =
+ worker->links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev =
+ worker->links[GRPC_POLLSET_WORKER_LINK_GLOBAL].next =
+ worker->links[GRPC_POLLSET_WORKER_LINK_GLOBAL].prev = NULL;
worker->kicked = 0;
worker->pollset = pollset;
gpr_cv_init(&worker->cv);
@@ -157,9 +152,13 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
pollset->is_iocp_worker = 0;
g_active_poller = NULL;
/* try to get a worker from this pollsets worker list */
- next_worker = pop_front_worker(&pollset->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET);
- /* try to get a worker from the global list */
- next_worker = pop_front_worker(&g_global_root_worker, GRPC_POLLSET_WORKER_LINK_GLOBAL);
+ next_worker = pop_front_worker(&pollset->root_worker,
+ GRPC_POLLSET_WORKER_LINK_POLLSET);
+ if (next_worker == NULL) {
+ /* try to get a worker from the global list */
+ next_worker = pop_front_worker(&g_global_root_worker,
+ GRPC_POLLSET_WORKER_LINK_GLOBAL);
+ }
if (next_worker != NULL) {
next_worker->kicked = 1;
gpr_cv_signal(&next_worker->cv);
@@ -171,8 +170,10 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
}
goto done;
}
- push_front_worker(&g_global_root_worker, GRPC_POLLSET_WORKER_LINK_GLOBAL, worker);
- push_front_worker(&pollset->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET, worker);
+ push_front_worker(&g_global_root_worker, GRPC_POLLSET_WORKER_LINK_GLOBAL,
+ worker);
+ push_front_worker(&pollset->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET,
+ worker);
added_worker = 1;
while (!worker->kicked) {
if (gpr_cv_wait(&worker->cv, &grpc_polling_mu, deadline)) {
@@ -198,9 +199,11 @@ done:
void grpc_pollset_kick(grpc_pollset *p, grpc_pollset_worker *specific_worker) {
if (specific_worker != NULL) {
if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) {
- for (specific_worker = p->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next;
+ for (specific_worker =
+ p->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next;
specific_worker != &p->root_worker;
- specific_worker = specific_worker->links[GRPC_POLLSET_WORKER_LINK_POLLSET].next) {
+ specific_worker =
+ specific_worker->links[GRPC_POLLSET_WORKER_LINK_POLLSET].next) {
specific_worker->kicked = 1;
gpr_cv_signal(&specific_worker->cv);
}
@@ -219,7 +222,8 @@ void grpc_pollset_kick(grpc_pollset *p, grpc_pollset_worker *specific_worker) {
}
}
} else {
- specific_worker = pop_front_worker(&p->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET);
+ specific_worker =
+ pop_front_worker(&p->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET);
if (specific_worker != NULL) {
grpc_pollset_kick(p, specific_worker);
} else if (p->is_iocp_worker) {
@@ -230,8 +234,6 @@ void grpc_pollset_kick(grpc_pollset *p, grpc_pollset_worker *specific_worker) {
}
}
-void grpc_kick_poller(void) {
- grpc_iocp_kick();
-}
+void grpc_kick_poller(void) { grpc_iocp_kick(); }
#endif /* GPR_WINSOCK_SOCKET */
diff --git a/src/core/iomgr/tcp_posix.c b/src/core/iomgr/tcp_posix.c
index 54ebad7dbc..4a57037a72 100644
--- a/src/core/iomgr/tcp_posix.c
+++ b/src/core/iomgr/tcp_posix.c
@@ -292,7 +292,7 @@ static flush_result tcp_flush(grpc_tcp *tcp) {
unwind_slice_idx = tcp->outgoing_slice_idx;
unwind_byte_idx = tcp->outgoing_byte_idx;
for (iov_size = 0; tcp->outgoing_slice_idx != tcp->outgoing_buffer->count &&
- iov_size != MAX_WRITE_IOVEC;
+ iov_size != MAX_WRITE_IOVEC;
iov_size++) {
iov[iov_size].iov_base =
GPR_SLICE_START_PTR(
@@ -441,7 +441,7 @@ static char *tcp_get_peer(grpc_endpoint *ep) {
}
static const grpc_endpoint_vtable vtable = {
- tcp_read, tcp_write, tcp_add_to_pollset, tcp_add_to_pollset_set,
+ tcp_read, tcp_write, tcp_add_to_pollset, tcp_add_to_pollset_set,
tcp_shutdown, tcp_destroy, tcp_get_peer};
grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size,
diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c
index 4b11ab0f06..db3319b3c6 100644
--- a/src/core/iomgr/tcp_server_windows.c
+++ b/src/core/iomgr/tcp_server_windows.c
@@ -382,7 +382,7 @@ static int add_socket_to_server(grpc_tcp_server *s, SOCKET sock,
if (s->nports == s->port_capacity) {
/* too many ports, and we need to store their address in a closure */
/* TODO(ctiller): make server_port a linked list */
- abort();
+ abort();
}
sp = &s->ports[s->nports++];
sp->server = s;
diff --git a/src/core/iomgr/tcp_windows.c b/src/core/iomgr/tcp_windows.c
index b67683dbfd..9ceffca065 100644
--- a/src/core/iomgr/tcp_windows.c
+++ b/src/core/iomgr/tcp_windows.c
@@ -382,9 +382,9 @@ static char *win_get_peer(grpc_endpoint *ep) {
return gpr_strdup(tcp->peer_string);
}
-static grpc_endpoint_vtable vtable = {
- win_read, win_write, win_add_to_pollset, win_add_to_pollset_set,
- win_shutdown, win_destroy, win_get_peer};
+static grpc_endpoint_vtable vtable = {win_read, win_write, win_add_to_pollset,
+ win_add_to_pollset_set, win_shutdown,
+ win_destroy, win_get_peer};
grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string) {
grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp));
diff --git a/src/core/iomgr/udp_server.c b/src/core/iomgr/udp_server.c
index a8d611c3f2..59df47fcb3 100644
--- a/src/core/iomgr/udp_server.c
+++ b/src/core/iomgr/udp_server.c
@@ -118,7 +118,7 @@ struct grpc_udp_server {
/* number of pollsets in the pollsets array */
size_t pollset_count;
/* The parent grpc server */
- grpc_server* grpc_server;
+ grpc_server *grpc_server;
};
grpc_udp_server *grpc_udp_server_create(void) {
diff --git a/src/core/security/client_auth_filter.c b/src/core/security/client_auth_filter.c
index 3f4c084ffc..635982b252 100644
--- a/src/core/security/client_auth_filter.c
+++ b/src/core/security/client_auth_filter.c
@@ -355,8 +355,7 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
}
const grpc_channel_filter grpc_client_auth_filter = {
- auth_start_transport_op, grpc_channel_next_op,
- sizeof(call_data), init_call_elem,
- destroy_call_elem, sizeof(channel_data),
- init_channel_elem, destroy_channel_elem,
- grpc_call_next_get_peer, "client-auth"};
+ auth_start_transport_op, grpc_channel_next_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data),
+ init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer,
+ "client-auth"};
diff --git a/src/core/security/secure_endpoint.c b/src/core/security/secure_endpoint.c
index 0288f7128a..fd50abb773 100644
--- a/src/core/security/secure_endpoint.c
+++ b/src/core/security/secure_endpoint.c
@@ -354,9 +354,8 @@ static char *endpoint_get_peer(grpc_endpoint *secure_ep) {
}
static const grpc_endpoint_vtable vtable = {
- endpoint_read, endpoint_write,
- endpoint_add_to_pollset, endpoint_add_to_pollset_set,
- endpoint_shutdown, endpoint_destroy,
+ endpoint_read, endpoint_write, endpoint_add_to_pollset,
+ endpoint_add_to_pollset_set, endpoint_shutdown, endpoint_destroy,
endpoint_get_peer};
grpc_endpoint *grpc_secure_endpoint_create(
diff --git a/src/core/security/server_auth_filter.c b/src/core/security/server_auth_filter.c
index 9638b18e88..30ca9f57a2 100644
--- a/src/core/security/server_auth_filter.c
+++ b/src/core/security/server_auth_filter.c
@@ -273,8 +273,7 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
}
const grpc_channel_filter grpc_server_auth_filter = {
- auth_start_transport_op, grpc_channel_next_op,
- sizeof(call_data), init_call_elem,
- destroy_call_elem, sizeof(channel_data),
- init_channel_elem, destroy_channel_elem,
- grpc_call_next_get_peer, "server-auth"};
+ auth_start_transport_op, grpc_channel_next_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data),
+ init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer,
+ "server-auth"};
diff --git a/src/core/statistics/census_rpc_stats.c b/src/core/statistics/census_rpc_stats.c
index ba2c81d6a3..d6638ed641 100644
--- a/src/core/statistics/census_rpc_stats.c
+++ b/src/core/statistics/census_rpc_stats.c
@@ -85,8 +85,8 @@ static void delete_key(void *key) { gpr_free(key); }
static const census_ht_option ht_opt = {
CENSUS_HT_POINTER /* key type */, 1999 /* n_of_buckets */,
- simple_hash /* hash function */, cmp_str_keys /* key comparator */,
- delete_stats /* data deleter */, delete_key /* key deleter */
+ simple_hash /* hash function */, cmp_str_keys /* key comparator */,
+ delete_stats /* data deleter */, delete_key /* key deleter */
};
static void init_rpc_stats(void *stats) {
diff --git a/src/core/statistics/census_tracing.c b/src/core/statistics/census_tracing.c
index 0eeecfe6c8..ecbe27e536 100644
--- a/src/core/statistics/census_tracing.c
+++ b/src/core/statistics/census_tracing.c
@@ -60,11 +60,8 @@ static void delete_trace_obj(void *obj) {
}
static const census_ht_option ht_opt = {
- CENSUS_HT_UINT64 /* key type */,
- 571 /* n_of_buckets */,
- NULL /* hash */,
- NULL /* compare_keys */,
- delete_trace_obj /* delete data */,
+ CENSUS_HT_UINT64 /* key type */, 571 /* n_of_buckets */, NULL /* hash */,
+ NULL /* compare_keys */, delete_trace_obj /* delete data */,
NULL /* delete key */
};
diff --git a/src/core/support/slice_buffer.c b/src/core/support/slice_buffer.c
index a1aa56fd72..310fbe1350 100644
--- a/src/core/support/slice_buffer.c
+++ b/src/core/support/slice_buffer.c
@@ -208,7 +208,8 @@ void gpr_slice_buffer_move_into(gpr_slice_buffer *src, gpr_slice_buffer *dst) {
src->length = 0;
}
-void gpr_slice_buffer_trim_end(gpr_slice_buffer *sb, size_t n, gpr_slice_buffer *garbage) {
+void gpr_slice_buffer_trim_end(gpr_slice_buffer *sb, size_t n,
+ gpr_slice_buffer *garbage) {
GPR_ASSERT(n <= sb->length);
sb->length -= n;
for (;;) {
diff --git a/src/core/surface/lame_client.c b/src/core/surface/lame_client.c
index 0b22d225d0..9e14ce2191 100644
--- a/src/core/surface/lame_client.c
+++ b/src/core/surface/lame_client.c
@@ -133,16 +133,9 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem) {}
static const grpc_channel_filter lame_filter = {
- lame_start_transport_stream_op,
- lame_start_transport_op,
- sizeof(call_data),
- init_call_elem,
- destroy_call_elem,
- sizeof(channel_data),
- init_channel_elem,
- destroy_channel_elem,
- lame_get_peer,
- "lame-client",
+ lame_start_transport_stream_op, lame_start_transport_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem,
+ destroy_channel_elem, lame_get_peer, "lame-client",
};
#define CHANNEL_STACK_FROM_CHANNEL(c) ((grpc_channel_stack *)((c) + 1))
diff --git a/src/core/surface/server.c b/src/core/surface/server.c
index 41191ebf26..e3ce88b3e6 100644
--- a/src/core/surface/server.c
+++ b/src/core/surface/server.c
@@ -767,16 +767,9 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
}
static const grpc_channel_filter server_surface_filter = {
- server_start_transport_stream_op,
- grpc_channel_next_op,
- sizeof(call_data),
- init_call_elem,
- destroy_call_elem,
- sizeof(channel_data),
- init_channel_elem,
- destroy_channel_elem,
- grpc_call_next_get_peer,
- "server",
+ server_start_transport_stream_op, grpc_channel_next_op, sizeof(call_data),
+ init_call_elem, destroy_call_elem, sizeof(channel_data), init_channel_elem,
+ destroy_channel_elem, grpc_call_next_get_peer, "server",
};
void grpc_server_register_completion_queue(grpc_server *server,
@@ -940,8 +933,7 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s,
channel = grpc_channel_create_from_filters(exec_ctx, NULL, filters,
num_filters, args, mdctx, 0);
chand = (channel_data *)grpc_channel_stack_element(
- grpc_channel_get_channel_stack(channel), 0)
- ->channel_data;
+ grpc_channel_get_channel_stack(channel), 0)->channel_data;
chand->server = s;
server_ref(s);
chand->channel = channel;
@@ -962,7 +954,7 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s,
method = grpc_mdstr_from_string(mdctx, rm->method);
hash = GRPC_MDSTR_KV_HASH(host ? host->hash : 0, method->hash);
for (probes = 0; chand->registered_methods[(hash + probes) % slots]
- .server_registered_method != NULL;
+ .server_registered_method != NULL;
probes++)
;
if (probes > max_probes) max_probes = probes;
diff --git a/src/core/surface/version.c b/src/core/surface/version.c
index 4b90e06a04..e559d51448 100644
--- a/src/core/surface/version.c
+++ b/src/core/surface/version.c
@@ -36,6 +36,4 @@
#include <grpc/grpc.h>
-const char *grpc_version_string(void) {
- return "0.11.0.0";
-}
+const char *grpc_version_string(void) { return "0.11.0.0"; }
diff --git a/src/core/transport/chttp2/bin_encoder.c b/src/core/transport/chttp2/bin_encoder.c
index e21d800083..f1bbf9aa91 100644
--- a/src/core/transport/chttp2/bin_encoder.c
+++ b/src/core/transport/chttp2/bin_encoder.c
@@ -46,18 +46,70 @@ typedef struct {
gpr_uint8 length;
} b64_huff_sym;
-static const b64_huff_sym huff_alphabet[64] = {
- {0x21, 6}, {0x5d, 7}, {0x5e, 7}, {0x5f, 7}, {0x60, 7}, {0x61, 7},
- {0x62, 7}, {0x63, 7}, {0x64, 7}, {0x65, 7}, {0x66, 7}, {0x67, 7},
- {0x68, 7}, {0x69, 7}, {0x6a, 7}, {0x6b, 7}, {0x6c, 7}, {0x6d, 7},
- {0x6e, 7}, {0x6f, 7}, {0x70, 7}, {0x71, 7}, {0x72, 7}, {0xfc, 8},
- {0x73, 7}, {0xfd, 8}, {0x3, 5}, {0x23, 6}, {0x4, 5}, {0x24, 6},
- {0x5, 5}, {0x25, 6}, {0x26, 6}, {0x27, 6}, {0x6, 5}, {0x74, 7},
- {0x75, 7}, {0x28, 6}, {0x29, 6}, {0x2a, 6}, {0x7, 5}, {0x2b, 6},
- {0x76, 7}, {0x2c, 6}, {0x8, 5}, {0x9, 5}, {0x2d, 6}, {0x77, 7},
- {0x78, 7}, {0x79, 7}, {0x7a, 7}, {0x7b, 7}, {0x0, 5}, {0x1, 5},
- {0x2, 5}, {0x19, 6}, {0x1a, 6}, {0x1b, 6}, {0x1c, 6}, {0x1d, 6},
- {0x1e, 6}, {0x1f, 6}, {0x7fb, 11}, {0x18, 6}};
+static const b64_huff_sym huff_alphabet[64] = {{0x21, 6},
+ {0x5d, 7},
+ {0x5e, 7},
+ {0x5f, 7},
+ {0x60, 7},
+ {0x61, 7},
+ {0x62, 7},
+ {0x63, 7},
+ {0x64, 7},
+ {0x65, 7},
+ {0x66, 7},
+ {0x67, 7},
+ {0x68, 7},
+ {0x69, 7},
+ {0x6a, 7},
+ {0x6b, 7},
+ {0x6c, 7},
+ {0x6d, 7},
+ {0x6e, 7},
+ {0x6f, 7},
+ {0x70, 7},
+ {0x71, 7},
+ {0x72, 7},
+ {0xfc, 8},
+ {0x73, 7},
+ {0xfd, 8},
+ {0x3, 5},
+ {0x23, 6},
+ {0x4, 5},
+ {0x24, 6},
+ {0x5, 5},
+ {0x25, 6},
+ {0x26, 6},
+ {0x27, 6},
+ {0x6, 5},
+ {0x74, 7},
+ {0x75, 7},
+ {0x28, 6},
+ {0x29, 6},
+ {0x2a, 6},
+ {0x7, 5},
+ {0x2b, 6},
+ {0x76, 7},
+ {0x2c, 6},
+ {0x8, 5},
+ {0x9, 5},
+ {0x2d, 6},
+ {0x77, 7},
+ {0x78, 7},
+ {0x79, 7},
+ {0x7a, 7},
+ {0x7b, 7},
+ {0x0, 5},
+ {0x1, 5},
+ {0x2, 5},
+ {0x19, 6},
+ {0x1a, 6},
+ {0x1b, 6},
+ {0x1c, 6},
+ {0x1d, 6},
+ {0x1e, 6},
+ {0x1f, 6},
+ {0x7fb, 11},
+ {0x18, 6}};
static const gpr_uint8 tail_xtra[3] = {0, 2, 3};
diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c
index 3b0a5e7207..20ea513375 100644
--- a/src/core/transport/chttp2/hpack_parser.c
+++ b/src/core/transport/chttp2/hpack_parser.c
@@ -150,12 +150,10 @@ typedef enum {
/* jump table of parse state functions -- order must match first_byte_type
above */
static const grpc_chttp2_hpack_parser_state first_byte_action[] = {
- parse_indexed_field, parse_indexed_field_x,
- parse_lithdr_incidx, parse_lithdr_incidx_x,
- parse_lithdr_incidx_v, parse_lithdr_notidx,
- parse_lithdr_notidx_x, parse_lithdr_notidx_v,
- parse_lithdr_nvridx, parse_lithdr_nvridx_x,
- parse_lithdr_nvridx_v, parse_max_tbl_size,
+ parse_indexed_field, parse_indexed_field_x, parse_lithdr_incidx,
+ parse_lithdr_incidx_x, parse_lithdr_incidx_v, parse_lithdr_notidx,
+ parse_lithdr_notidx_x, parse_lithdr_notidx_v, parse_lithdr_nvridx,
+ parse_lithdr_nvridx_x, parse_lithdr_nvridx_v, parse_max_tbl_size,
parse_max_tbl_size_x, parse_error};
/* indexes the first byte to a parse state function - generated by
diff --git a/src/core/transport/chttp2/huffsyms.c b/src/core/transport/chttp2/huffsyms.c
index 6f5cf6a2a9..7b138e9b5d 100644
--- a/src/core/transport/chttp2/huffsyms.c
+++ b/src/core/transport/chttp2/huffsyms.c
@@ -37,69 +37,261 @@
command:
:%s/.* \([0-9a-f]\+\) \[ *\([0-9]\+\)\]/{0x\1, \2},/g */
const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS] = {
- {0x1ff8, 13}, {0x7fffd8, 23}, {0xfffffe2, 28}, {0xfffffe3, 28},
- {0xfffffe4, 28}, {0xfffffe5, 28}, {0xfffffe6, 28}, {0xfffffe7, 28},
- {0xfffffe8, 28}, {0xffffea, 24}, {0x3ffffffc, 30}, {0xfffffe9, 28},
- {0xfffffea, 28}, {0x3ffffffd, 30}, {0xfffffeb, 28}, {0xfffffec, 28},
- {0xfffffed, 28}, {0xfffffee, 28}, {0xfffffef, 28}, {0xffffff0, 28},
- {0xffffff1, 28}, {0xffffff2, 28}, {0x3ffffffe, 30}, {0xffffff3, 28},
- {0xffffff4, 28}, {0xffffff5, 28}, {0xffffff6, 28}, {0xffffff7, 28},
- {0xffffff8, 28}, {0xffffff9, 28}, {0xffffffa, 28}, {0xffffffb, 28},
- {0x14, 6}, {0x3f8, 10}, {0x3f9, 10}, {0xffa, 12},
- {0x1ff9, 13}, {0x15, 6}, {0xf8, 8}, {0x7fa, 11},
- {0x3fa, 10}, {0x3fb, 10}, {0xf9, 8}, {0x7fb, 11},
- {0xfa, 8}, {0x16, 6}, {0x17, 6}, {0x18, 6},
- {0x0, 5}, {0x1, 5}, {0x2, 5}, {0x19, 6},
- {0x1a, 6}, {0x1b, 6}, {0x1c, 6}, {0x1d, 6},
- {0x1e, 6}, {0x1f, 6}, {0x5c, 7}, {0xfb, 8},
- {0x7ffc, 15}, {0x20, 6}, {0xffb, 12}, {0x3fc, 10},
- {0x1ffa, 13}, {0x21, 6}, {0x5d, 7}, {0x5e, 7},
- {0x5f, 7}, {0x60, 7}, {0x61, 7}, {0x62, 7},
- {0x63, 7}, {0x64, 7}, {0x65, 7}, {0x66, 7},
- {0x67, 7}, {0x68, 7}, {0x69, 7}, {0x6a, 7},
- {0x6b, 7}, {0x6c, 7}, {0x6d, 7}, {0x6e, 7},
- {0x6f, 7}, {0x70, 7}, {0x71, 7}, {0x72, 7},
- {0xfc, 8}, {0x73, 7}, {0xfd, 8}, {0x1ffb, 13},
- {0x7fff0, 19}, {0x1ffc, 13}, {0x3ffc, 14}, {0x22, 6},
- {0x7ffd, 15}, {0x3, 5}, {0x23, 6}, {0x4, 5},
- {0x24, 6}, {0x5, 5}, {0x25, 6}, {0x26, 6},
- {0x27, 6}, {0x6, 5}, {0x74, 7}, {0x75, 7},
- {0x28, 6}, {0x29, 6}, {0x2a, 6}, {0x7, 5},
- {0x2b, 6}, {0x76, 7}, {0x2c, 6}, {0x8, 5},
- {0x9, 5}, {0x2d, 6}, {0x77, 7}, {0x78, 7},
- {0x79, 7}, {0x7a, 7}, {0x7b, 7}, {0x7ffe, 15},
- {0x7fc, 11}, {0x3ffd, 14}, {0x1ffd, 13}, {0xffffffc, 28},
- {0xfffe6, 20}, {0x3fffd2, 22}, {0xfffe7, 20}, {0xfffe8, 20},
- {0x3fffd3, 22}, {0x3fffd4, 22}, {0x3fffd5, 22}, {0x7fffd9, 23},
- {0x3fffd6, 22}, {0x7fffda, 23}, {0x7fffdb, 23}, {0x7fffdc, 23},
- {0x7fffdd, 23}, {0x7fffde, 23}, {0xffffeb, 24}, {0x7fffdf, 23},
- {0xffffec, 24}, {0xffffed, 24}, {0x3fffd7, 22}, {0x7fffe0, 23},
- {0xffffee, 24}, {0x7fffe1, 23}, {0x7fffe2, 23}, {0x7fffe3, 23},
- {0x7fffe4, 23}, {0x1fffdc, 21}, {0x3fffd8, 22}, {0x7fffe5, 23},
- {0x3fffd9, 22}, {0x7fffe6, 23}, {0x7fffe7, 23}, {0xffffef, 24},
- {0x3fffda, 22}, {0x1fffdd, 21}, {0xfffe9, 20}, {0x3fffdb, 22},
- {0x3fffdc, 22}, {0x7fffe8, 23}, {0x7fffe9, 23}, {0x1fffde, 21},
- {0x7fffea, 23}, {0x3fffdd, 22}, {0x3fffde, 22}, {0xfffff0, 24},
- {0x1fffdf, 21}, {0x3fffdf, 22}, {0x7fffeb, 23}, {0x7fffec, 23},
- {0x1fffe0, 21}, {0x1fffe1, 21}, {0x3fffe0, 22}, {0x1fffe2, 21},
- {0x7fffed, 23}, {0x3fffe1, 22}, {0x7fffee, 23}, {0x7fffef, 23},
- {0xfffea, 20}, {0x3fffe2, 22}, {0x3fffe3, 22}, {0x3fffe4, 22},
- {0x7ffff0, 23}, {0x3fffe5, 22}, {0x3fffe6, 22}, {0x7ffff1, 23},
- {0x3ffffe0, 26}, {0x3ffffe1, 26}, {0xfffeb, 20}, {0x7fff1, 19},
- {0x3fffe7, 22}, {0x7ffff2, 23}, {0x3fffe8, 22}, {0x1ffffec, 25},
- {0x3ffffe2, 26}, {0x3ffffe3, 26}, {0x3ffffe4, 26}, {0x7ffffde, 27},
- {0x7ffffdf, 27}, {0x3ffffe5, 26}, {0xfffff1, 24}, {0x1ffffed, 25},
- {0x7fff2, 19}, {0x1fffe3, 21}, {0x3ffffe6, 26}, {0x7ffffe0, 27},
- {0x7ffffe1, 27}, {0x3ffffe7, 26}, {0x7ffffe2, 27}, {0xfffff2, 24},
- {0x1fffe4, 21}, {0x1fffe5, 21}, {0x3ffffe8, 26}, {0x3ffffe9, 26},
- {0xffffffd, 28}, {0x7ffffe3, 27}, {0x7ffffe4, 27}, {0x7ffffe5, 27},
- {0xfffec, 20}, {0xfffff3, 24}, {0xfffed, 20}, {0x1fffe6, 21},
- {0x3fffe9, 22}, {0x1fffe7, 21}, {0x1fffe8, 21}, {0x7ffff3, 23},
- {0x3fffea, 22}, {0x3fffeb, 22}, {0x1ffffee, 25}, {0x1ffffef, 25},
- {0xfffff4, 24}, {0xfffff5, 24}, {0x3ffffea, 26}, {0x7ffff4, 23},
- {0x3ffffeb, 26}, {0x7ffffe6, 27}, {0x3ffffec, 26}, {0x3ffffed, 26},
- {0x7ffffe7, 27}, {0x7ffffe8, 27}, {0x7ffffe9, 27}, {0x7ffffea, 27},
- {0x7ffffeb, 27}, {0xffffffe, 28}, {0x7ffffec, 27}, {0x7ffffed, 27},
- {0x7ffffee, 27}, {0x7ffffef, 27}, {0x7fffff0, 27}, {0x3ffffee, 26},
+ {0x1ff8, 13},
+ {0x7fffd8, 23},
+ {0xfffffe2, 28},
+ {0xfffffe3, 28},
+ {0xfffffe4, 28},
+ {0xfffffe5, 28},
+ {0xfffffe6, 28},
+ {0xfffffe7, 28},
+ {0xfffffe8, 28},
+ {0xffffea, 24},
+ {0x3ffffffc, 30},
+ {0xfffffe9, 28},
+ {0xfffffea, 28},
+ {0x3ffffffd, 30},
+ {0xfffffeb, 28},
+ {0xfffffec, 28},
+ {0xfffffed, 28},
+ {0xfffffee, 28},
+ {0xfffffef, 28},
+ {0xffffff0, 28},
+ {0xffffff1, 28},
+ {0xffffff2, 28},
+ {0x3ffffffe, 30},
+ {0xffffff3, 28},
+ {0xffffff4, 28},
+ {0xffffff5, 28},
+ {0xffffff6, 28},
+ {0xffffff7, 28},
+ {0xffffff8, 28},
+ {0xffffff9, 28},
+ {0xffffffa, 28},
+ {0xffffffb, 28},
+ {0x14, 6},
+ {0x3f8, 10},
+ {0x3f9, 10},
+ {0xffa, 12},
+ {0x1ff9, 13},
+ {0x15, 6},
+ {0xf8, 8},
+ {0x7fa, 11},
+ {0x3fa, 10},
+ {0x3fb, 10},
+ {0xf9, 8},
+ {0x7fb, 11},
+ {0xfa, 8},
+ {0x16, 6},
+ {0x17, 6},
+ {0x18, 6},
+ {0x0, 5},
+ {0x1, 5},
+ {0x2, 5},
+ {0x19, 6},
+ {0x1a, 6},
+ {0x1b, 6},
+ {0x1c, 6},
+ {0x1d, 6},
+ {0x1e, 6},
+ {0x1f, 6},
+ {0x5c, 7},
+ {0xfb, 8},
+ {0x7ffc, 15},
+ {0x20, 6},
+ {0xffb, 12},
+ {0x3fc, 10},
+ {0x1ffa, 13},
+ {0x21, 6},
+ {0x5d, 7},
+ {0x5e, 7},
+ {0x5f, 7},
+ {0x60, 7},
+ {0x61, 7},
+ {0x62, 7},
+ {0x63, 7},
+ {0x64, 7},
+ {0x65, 7},
+ {0x66, 7},
+ {0x67, 7},
+ {0x68, 7},
+ {0x69, 7},
+ {0x6a, 7},
+ {0x6b, 7},
+ {0x6c, 7},
+ {0x6d, 7},
+ {0x6e, 7},
+ {0x6f, 7},
+ {0x70, 7},
+ {0x71, 7},
+ {0x72, 7},
+ {0xfc, 8},
+ {0x73, 7},
+ {0xfd, 8},
+ {0x1ffb, 13},
+ {0x7fff0, 19},
+ {0x1ffc, 13},
+ {0x3ffc, 14},
+ {0x22, 6},
+ {0x7ffd, 15},
+ {0x3, 5},
+ {0x23, 6},
+ {0x4, 5},
+ {0x24, 6},
+ {0x5, 5},
+ {0x25, 6},
+ {0x26, 6},
+ {0x27, 6},
+ {0x6, 5},
+ {0x74, 7},
+ {0x75, 7},
+ {0x28, 6},
+ {0x29, 6},
+ {0x2a, 6},
+ {0x7, 5},
+ {0x2b, 6},
+ {0x76, 7},
+ {0x2c, 6},
+ {0x8, 5},
+ {0x9, 5},
+ {0x2d, 6},
+ {0x77, 7},
+ {0x78, 7},
+ {0x79, 7},
+ {0x7a, 7},
+ {0x7b, 7},
+ {0x7ffe, 15},
+ {0x7fc, 11},
+ {0x3ffd, 14},
+ {0x1ffd, 13},
+ {0xffffffc, 28},
+ {0xfffe6, 20},
+ {0x3fffd2, 22},
+ {0xfffe7, 20},
+ {0xfffe8, 20},
+ {0x3fffd3, 22},
+ {0x3fffd4, 22},
+ {0x3fffd5, 22},
+ {0x7fffd9, 23},
+ {0x3fffd6, 22},
+ {0x7fffda, 23},
+ {0x7fffdb, 23},
+ {0x7fffdc, 23},
+ {0x7fffdd, 23},
+ {0x7fffde, 23},
+ {0xffffeb, 24},
+ {0x7fffdf, 23},
+ {0xffffec, 24},
+ {0xffffed, 24},
+ {0x3fffd7, 22},
+ {0x7fffe0, 23},
+ {0xffffee, 24},
+ {0x7fffe1, 23},
+ {0x7fffe2, 23},
+ {0x7fffe3, 23},
+ {0x7fffe4, 23},
+ {0x1fffdc, 21},
+ {0x3fffd8, 22},
+ {0x7fffe5, 23},
+ {0x3fffd9, 22},
+ {0x7fffe6, 23},
+ {0x7fffe7, 23},
+ {0xffffef, 24},
+ {0x3fffda, 22},
+ {0x1fffdd, 21},
+ {0xfffe9, 20},
+ {0x3fffdb, 22},
+ {0x3fffdc, 22},
+ {0x7fffe8, 23},
+ {0x7fffe9, 23},
+ {0x1fffde, 21},
+ {0x7fffea, 23},
+ {0x3fffdd, 22},
+ {0x3fffde, 22},
+ {0xfffff0, 24},
+ {0x1fffdf, 21},
+ {0x3fffdf, 22},
+ {0x7fffeb, 23},
+ {0x7fffec, 23},
+ {0x1fffe0, 21},
+ {0x1fffe1, 21},
+ {0x3fffe0, 22},
+ {0x1fffe2, 21},
+ {0x7fffed, 23},
+ {0x3fffe1, 22},
+ {0x7fffee, 23},
+ {0x7fffef, 23},
+ {0xfffea, 20},
+ {0x3fffe2, 22},
+ {0x3fffe3, 22},
+ {0x3fffe4, 22},
+ {0x7ffff0, 23},
+ {0x3fffe5, 22},
+ {0x3fffe6, 22},
+ {0x7ffff1, 23},
+ {0x3ffffe0, 26},
+ {0x3ffffe1, 26},
+ {0xfffeb, 20},
+ {0x7fff1, 19},
+ {0x3fffe7, 22},
+ {0x7ffff2, 23},
+ {0x3fffe8, 22},
+ {0x1ffffec, 25},
+ {0x3ffffe2, 26},
+ {0x3ffffe3, 26},
+ {0x3ffffe4, 26},
+ {0x7ffffde, 27},
+ {0x7ffffdf, 27},
+ {0x3ffffe5, 26},
+ {0xfffff1, 24},
+ {0x1ffffed, 25},
+ {0x7fff2, 19},
+ {0x1fffe3, 21},
+ {0x3ffffe6, 26},
+ {0x7ffffe0, 27},
+ {0x7ffffe1, 27},
+ {0x3ffffe7, 26},
+ {0x7ffffe2, 27},
+ {0xfffff2, 24},
+ {0x1fffe4, 21},
+ {0x1fffe5, 21},
+ {0x3ffffe8, 26},
+ {0x3ffffe9, 26},
+ {0xffffffd, 28},
+ {0x7ffffe3, 27},
+ {0x7ffffe4, 27},
+ {0x7ffffe5, 27},
+ {0xfffec, 20},
+ {0xfffff3, 24},
+ {0xfffed, 20},
+ {0x1fffe6, 21},
+ {0x3fffe9, 22},
+ {0x1fffe7, 21},
+ {0x1fffe8, 21},
+ {0x7ffff3, 23},
+ {0x3fffea, 22},
+ {0x3fffeb, 22},
+ {0x1ffffee, 25},
+ {0x1ffffef, 25},
+ {0xfffff4, 24},
+ {0xfffff5, 24},
+ {0x3ffffea, 26},
+ {0x7ffff4, 23},
+ {0x3ffffeb, 26},
+ {0x7ffffe6, 27},
+ {0x3ffffec, 26},
+ {0x3ffffed, 26},
+ {0x7ffffe7, 27},
+ {0x7ffffe8, 27},
+ {0x7ffffe9, 27},
+ {0x7ffffea, 27},
+ {0x7ffffeb, 27},
+ {0xffffffe, 28},
+ {0x7ffffec, 27},
+ {0x7ffffed, 27},
+ {0x7ffffee, 27},
+ {0x7ffffef, 27},
+ {0x7fffff0, 27},
+ {0x3ffffee, 26},
{0x3fffffff, 30},
};
diff --git a/src/core/transport/chttp2/stream_encoder.c b/src/core/transport/chttp2/stream_encoder.c
index ec97af3d5d..83227e677d 100644
--- a/src/core/transport/chttp2/stream_encoder.c
+++ b/src/core/transport/chttp2/stream_encoder.c
@@ -278,7 +278,7 @@ static void emit_indexed(grpc_chttp2_hpack_compressor *c, gpr_uint32 elem_index,
framer_state *st) {
gpr_uint32 len = GRPC_CHTTP2_VARINT_LENGTH(elem_index, 1);
GRPC_CHTTP2_WRITE_VARINT(elem_index, 1, 0x80, add_tiny_header_data(st, len),
- len);
+ len);
}
static gpr_slice get_wire_value(grpc_mdelem *elem, gpr_uint8 *huffman_prefix) {
@@ -365,7 +365,7 @@ static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor *c,
}
static gpr_uint32 dynidx(grpc_chttp2_hpack_compressor *c,
- gpr_uint32 elem_index) {
+ gpr_uint32 elem_index) {
return 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY + c->tail_remote_index +
c->table_elems - elem_index;
}
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 0202d53abd..0437dbfadf 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -1114,8 +1114,8 @@ static void recv_data(grpc_exec_ctx *exec_ctx, void *tp, int success) {
grpc_chttp2_prepare_to_read(&t->global, &t->parsing);
gpr_mu_unlock(&t->mu);
for (; i < t->read_buffer.count &&
- grpc_chttp2_perform_read(exec_ctx, &t->parsing,
- t->read_buffer.slices[i]);
+ grpc_chttp2_perform_read(exec_ctx, &t->parsing,
+ t->read_buffer.slices[i]);
i++)
;
gpr_mu_lock(&t->mu);
@@ -1229,13 +1229,9 @@ static char *chttp2_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *t) {
return gpr_strdup(((grpc_chttp2_transport *)t)->peer_string);
}
-static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream),
- init_stream,
- perform_stream_op,
- perform_transport_op,
- destroy_stream,
- destroy_transport,
- chttp2_get_peer};
+static const grpc_transport_vtable vtable = {
+ sizeof(grpc_chttp2_stream), init_stream, perform_stream_op,
+ perform_transport_op, destroy_stream, destroy_transport, chttp2_get_peer};
grpc_transport *grpc_create_chttp2_transport(
grpc_exec_ctx *exec_ctx, const grpc_channel_args *channel_args,
diff --git a/src/core/tsi/fake_transport_security.c b/src/core/tsi/fake_transport_security.c
index 9ef4b163be..cbb6f17ae1 100644
--- a/src/core/tsi/fake_transport_security.c
+++ b/src/core/tsi/fake_transport_security.c
@@ -493,10 +493,8 @@ static void fake_handshaker_destroy(tsi_handshaker *self) {
static const tsi_handshaker_vtable handshaker_vtable = {
fake_handshaker_get_bytes_to_send_to_peer,
- fake_handshaker_process_bytes_from_peer,
- fake_handshaker_get_result,
- fake_handshaker_extract_peer,
- fake_handshaker_create_frame_protector,
+ fake_handshaker_process_bytes_from_peer, fake_handshaker_get_result,
+ fake_handshaker_extract_peer, fake_handshaker_create_frame_protector,
fake_handshaker_destroy,
};
diff --git a/src/core/tsi/ssl_transport_security.c b/src/core/tsi/ssl_transport_security.c
index ad6b2d7684..05789f07d4 100644
--- a/src/core/tsi/ssl_transport_security.c
+++ b/src/core/tsi/ssl_transport_security.c
@@ -976,10 +976,8 @@ static void ssl_handshaker_destroy(tsi_handshaker *self) {
static const tsi_handshaker_vtable handshaker_vtable = {
ssl_handshaker_get_bytes_to_send_to_peer,
- ssl_handshaker_process_bytes_from_peer,
- ssl_handshaker_get_result,
- ssl_handshaker_extract_peer,
- ssl_handshaker_create_frame_protector,
+ ssl_handshaker_process_bytes_from_peer, ssl_handshaker_get_result,
+ ssl_handshaker_extract_peer, ssl_handshaker_create_frame_protector,
ssl_handshaker_destroy,
};