diff options
author | Craig Tiller <ctiller@google.com> | 2017-05-05 10:42:44 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-05-05 10:42:44 -0700 |
commit | bc0ab08652fb93bb030aa97955bd8c109a3d3215 (patch) | |
tree | cf22cb5119acc6f5f3c82b6ac4324bad99bcea96 /src | |
parent | 924353a7173ed6184f3e0baef8c62d3ccbfa39f5 (diff) |
clang-format
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ext/transport/chttp2/transport/internal.h | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_epoll_thread_pool_linux.c | 20 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_epoll_thread_pool_linux.h | 3 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_epollex_linux.h | 3 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_epollsig_linux.c | 9 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_posix.c | 7 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_posix.h | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/iomgr.c | 4 | ||||
-rw-r--r-- | src/core/lib/surface/api_trace.c | 2 |
9 files changed, 29 insertions, 23 deletions
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index bb5ce60872..b9d06a84d3 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -671,7 +671,7 @@ typedef enum { #define GRPC_CHTTP2_FLOW_CREDIT_COMMON(phase, transport, id, dst_context, \ dst_var, amount) \ do { \ - if (GRPC_TRACER_ON(grpc_flowctl_trace)) { \ + if (GRPC_TRACER_ON(grpc_flowctl_trace)) { \ grpc_chttp2_flowctl_trace(__FILE__, __LINE__, phase, \ GRPC_CHTTP2_FLOWCTL_CREDIT, #dst_context, \ #dst_var, NULL, #amount, transport->is_client, \ diff --git a/src/core/lib/iomgr/ev_epoll_thread_pool_linux.c b/src/core/lib/iomgr/ev_epoll_thread_pool_linux.c index cf20fc3346..a3a9e76ed4 100644 --- a/src/core/lib/iomgr/ev_epoll_thread_pool_linux.c +++ b/src/core/lib/iomgr/ev_epoll_thread_pool_linux.c @@ -66,9 +66,9 @@ #include "src/core/lib/support/block_annotate.h" /* TODO: sreek - Move this to init.c and initialize this like other tracers. */ -#define GRPC_POLLING_TRACE(fmt, ...) \ - if (GRPC_TRACER_ON(grpc_polling_trace)) { \ - gpr_log(GPR_INFO, (fmt), __VA_ARGS__); \ +#define GRPC_POLLING_TRACE(fmt, ...) \ + if (GRPC_TRACER_ON(grpc_polling_trace)) { \ + gpr_log(GPR_INFO, (fmt), __VA_ARGS__); \ } /* The alarm system needs to be able to wakeup 'some poller' sometimes @@ -78,7 +78,7 @@ struct epoll_set; -#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker*)1) +#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1) /******************************************************************************* * Fd Declarations @@ -358,8 +358,8 @@ static void epoll_set_add_wakeup_fd_locked(epoll_set *eps, gpr_asprintf(&err_msg, "epoll_ctl (epoll_fd: %d) add wakeup fd: %d failed with " "error: %d (%s)", - eps->epoll_fd, GRPC_WAKEUP_FD_GET_READ_FD(wakeup_fd), - errno, strerror(errno)); + eps->epoll_fd, GRPC_WAKEUP_FD_GET_READ_FD(wakeup_fd), errno, + strerror(errno)); append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); gpr_free(err_msg); } @@ -1291,7 +1291,8 @@ static bool is_epoll_available() { return true; } -const grpc_event_engine_vtable *grpc_init_epoll_thread_pool_linux(bool requested_explicitly) { +const grpc_event_engine_vtable *grpc_init_epoll_thread_pool_linux( + bool requested_explicitly) { if (!requested_explicitly) return NULL; if (!grpc_has_wakeup_fd()) { @@ -1328,6 +1329,9 @@ const grpc_event_engine_vtable *grpc_init_epoll_thread_pool_linux(bool requested #include "src/core/lib/iomgr/ev_posix.h" /* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return * NULL */ -const grpc_event_engine_vtable *grpc_init_epoll_linux(bool requested_explicitly) { return NULL; } +const grpc_event_engine_vtable *grpc_init_epoll_linux( + bool requested_explicitly) { + return NULL; +} #endif /* defined(GRPC_POSIX_SOCKET) */ #endif /* !defined(GRPC_LINUX_EPOLL) */ diff --git a/src/core/lib/iomgr/ev_epoll_thread_pool_linux.h b/src/core/lib/iomgr/ev_epoll_thread_pool_linux.h index b94dbe7d5d..9af776a52e 100644 --- a/src/core/lib/iomgr/ev_epoll_thread_pool_linux.h +++ b/src/core/lib/iomgr/ev_epoll_thread_pool_linux.h @@ -37,6 +37,7 @@ #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" -const grpc_event_engine_vtable *grpc_init_epoll_thread_pool_linux(bool requested_explicitly); +const grpc_event_engine_vtable *grpc_init_epoll_thread_pool_linux( + bool requested_explicitly); #endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL_THREAD_POOL_LINUX_H */ diff --git a/src/core/lib/iomgr/ev_epollex_linux.h b/src/core/lib/iomgr/ev_epollex_linux.h index a865c49116..a078a7f19a 100644 --- a/src/core/lib/iomgr/ev_epollex_linux.h +++ b/src/core/lib/iomgr/ev_epollex_linux.h @@ -37,6 +37,7 @@ #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" -const grpc_event_engine_vtable *grpc_init_epollex_linux(bool explicitly_requested); +const grpc_event_engine_vtable *grpc_init_epollex_linux( + bool explicitly_requested); #endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H */ diff --git a/src/core/lib/iomgr/ev_epollsig_linux.c b/src/core/lib/iomgr/ev_epollsig_linux.c index 32096ed55f..52362a62f4 100644 --- a/src/core/lib/iomgr/ev_epollsig_linux.c +++ b/src/core/lib/iomgr/ev_epollsig_linux.c @@ -65,9 +65,9 @@ #define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1) -#define GRPC_POLLING_TRACE(fmt, ...) \ - if (GRPC_TRACER_ON(grpc_polling_trace)) { \ - gpr_log(GPR_INFO, (fmt), __VA_ARGS__); \ +#define GRPC_POLLING_TRACE(fmt, ...) \ + if (GRPC_TRACER_ON(grpc_polling_trace)) { \ + gpr_log(GPR_INFO, (fmt), __VA_ARGS__); \ } /* Uncomment the following to enable extra checks on poll_object operations */ @@ -1920,7 +1920,8 @@ const grpc_event_engine_vtable *grpc_init_epollsig_linux( } if (!is_grpc_wakeup_signal_initialized) { - /* TODO(ctiller): when other epoll engines are ready, remove the true || to force this to be explitly chosen if needed */ + /* TODO(ctiller): when other epoll engines are ready, remove the true || to + * force this to be explitly chosen if needed */ if (true || explicit_request) { grpc_use_signal(SIGRTMIN + 6); } else { diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 0b0535c852..02c6c746ac 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -45,14 +45,15 @@ #include <grpc/support/useful.h> #include "src/core/lib/debug/trace.h" -#include "src/core/lib/iomgr/ev_epollex_linux.h" #include "src/core/lib/iomgr/ev_epoll1_linux.h" -#include "src/core/lib/iomgr/ev_epollsig_linux.h" #include "src/core/lib/iomgr/ev_epoll_thread_pool_linux.h" +#include "src/core/lib/iomgr/ev_epollex_linux.h" +#include "src/core/lib/iomgr/ev_epollsig_linux.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/support/env.h" -grpc_tracer_flag grpc_polling_trace = GRPC_TRACER_INITIALIZER(false); /* Disabled by default */ +grpc_tracer_flag grpc_polling_trace = + GRPC_TRACER_INITIALIZER(false); /* Disabled by default */ /** Default poll() function - a pointer so that it can be overridden by some * tests */ diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index e013a6c953..80619aab5f 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -36,12 +36,12 @@ #include <poll.h> +#include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" #include "src/core/lib/iomgr/workqueue.h" -#include "src/core/lib/debug/trace.h" extern grpc_tracer_flag grpc_polling_trace; /* Disabled by default */ diff --git a/src/core/lib/iomgr/iomgr.c b/src/core/lib/iomgr/iomgr.c index 37804d8600..1fd41c2f88 100644 --- a/src/core/lib/iomgr/iomgr.c +++ b/src/core/lib/iomgr/iomgr.c @@ -68,9 +68,7 @@ void grpc_iomgr_init(void) { grpc_iomgr_platform_init(); } -void grpc_iomgr_start(void) { - grpc_timer_manager_init(); -} +void grpc_iomgr_start(void) { grpc_timer_manager_init(); } static size_t count_objects(void) { grpc_iomgr_object *obj; diff --git a/src/core/lib/surface/api_trace.c b/src/core/lib/surface/api_trace.c index 55c69cd5b0..d8941cdf42 100644 --- a/src/core/lib/surface/api_trace.c +++ b/src/core/lib/surface/api_trace.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/debug/trace.h" #include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/debug/trace.h" grpc_tracer_flag grpc_api_trace = GRPC_TRACER_INITIALIZER(false); |