diff options
author | Craig Tiller <ctiller@google.com> | 2015-03-02 08:51:52 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-03-02 08:51:52 -0800 |
commit | 61691f92c37f48cb194754aafefbf1e6462fa3c7 (patch) | |
tree | f7dae4d713a35f0fdac70c66f98599c41336e2eb /src/core | |
parent | 29f131428272e3b0f5c13d9ec6417f9e3b6dbc9b (diff) | |
parent | 7a89026886e9da28194ecdff840040980634ef99 (diff) |
Merge github.com:grpc/grpc into credit
Diffstat (limited to 'src/core')
111 files changed, 352 insertions, 330 deletions
diff --git a/src/core/channel/census_filter.h b/src/core/channel/census_filter.h index 6acf9695f4..4f9759f0db 100644 --- a/src/core/channel/census_filter.h +++ b/src/core/channel/census_filter.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_CENSUS_FILTER_H__ -#define __GRPC_INTERNAL_CHANNEL_CENSUS_FILTER_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_CENSUS_FILTER_H +#define GRPC_INTERNAL_CORE_CHANNEL_CENSUS_FILTER_H #include "src/core/channel/channel_stack.h" @@ -41,4 +41,4 @@ extern const grpc_channel_filter grpc_client_census_filter; extern const grpc_channel_filter grpc_server_census_filter; -#endif /* __GRPC_INTERNAL_CHANNEL_CENSUS_FILTER_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_CENSUS_FILTER_H */ diff --git a/src/core/channel/channel_args.h b/src/core/channel/channel_args.h index 640bbd85a5..eb5bf63986 100644 --- a/src/core/channel/channel_args.h +++ b/src/core/channel/channel_args.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_CHANNEL_ARGS_H__ -#define __GRPC_INTERNAL_CHANNEL_CHANNEL_ARGS_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_ARGS_H +#define GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_ARGS_H #include <grpc/grpc.h> @@ -51,4 +51,4 @@ void grpc_channel_args_destroy(grpc_channel_args *a); is specified in channel args, otherwise returns 0. */ int grpc_channel_args_is_census_enabled(const grpc_channel_args *a); -#endif /* __GRPC_INTERNAL_CHANNEL_CHANNEL_ARGS_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_ARGS_H */ diff --git a/src/core/channel/channel_stack.h b/src/core/channel/channel_stack.h index 1ca95e7f1a..c136f5c17c 100644 --- a/src/core/channel/channel_stack.h +++ b/src/core/channel/channel_stack.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_CHANNEL_STACK_H__ -#define __GRPC_INTERNAL_CHANNEL_CHANNEL_STACK_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H +#define GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H /* A channel filter defines how operations on a channel are implemented. Channel filters are chained together to create full channels, and if those @@ -301,4 +301,4 @@ void grpc_call_element_send_finish(grpc_call_element *cur_elem); #define GRPC_CALL_LOG_OP(sev, elem, op) \ if (grpc_trace_bits & GRPC_TRACE_CHANNEL) grpc_call_log_op(sev, elem, op) -#endif /* __GRPC_INTERNAL_CHANNEL_CHANNEL_STACK_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H */ diff --git a/src/core/channel/child_channel.h b/src/core/channel/child_channel.h index 84a11062cb..38695402ab 100644 --- a/src/core/channel/child_channel.h +++ b/src/core/channel/child_channel.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_CHILD_CHANNEL_H_ -#define __GRPC_INTERNAL_CHANNEL_CHILD_CHANNEL_H_ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_CHILD_CHANNEL_H +#define GRPC_INTERNAL_CORE_CHANNEL_CHILD_CHANNEL_H #include "src/core/channel/channel_stack.h" @@ -61,4 +61,4 @@ grpc_child_call *grpc_child_channel_create_call(grpc_child_channel *channel, grpc_call_element *grpc_child_call_get_top_element(grpc_child_call *call); void grpc_child_call_destroy(grpc_child_call *call); -#endif /* __GRPC_INTERNAL_CHANNEL_CHILD_CHANNEL_H_ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_CHILD_CHANNEL_H */ diff --git a/src/core/channel/client_channel.h b/src/core/channel/client_channel.h index 7da4fc9258..7a67a9f21f 100644 --- a/src/core/channel/client_channel.h +++ b/src/core/channel/client_channel.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_CLIENT_CHANNEL_H__ -#define __GRPC_INTERNAL_CHANNEL_CLIENT_CHANNEL_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H +#define GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H #include "src/core/channel/channel_stack.h" @@ -59,4 +59,4 @@ grpc_transport_setup_result grpc_client_channel_transport_setup_complete( grpc_channel_filter const **channel_filters, size_t num_channel_filters, grpc_mdctx *mdctx); -#endif /* __GRPC_INTERNAL_CHANNEL_CLIENT_CHANNEL_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H */ diff --git a/src/core/channel/client_setup.h b/src/core/channel/client_setup.h index f2b64265bc..70137e1365 100644 --- a/src/core/channel/client_setup.h +++ b/src/core/channel/client_setup.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_CLIENT_SETUP_H__ -#define __GRPC_INTERNAL_CHANNEL_CLIENT_SETUP_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_CLIENT_SETUP_H +#define GRPC_INTERNAL_CORE_CHANNEL_CLIENT_SETUP_H #include "src/core/channel/client_channel.h" #include "src/core/transport/metadata.h" @@ -70,4 +70,4 @@ gpr_timespec grpc_client_setup_request_deadline(grpc_client_setup_request *r); grpc_mdctx *grpc_client_setup_get_mdctx(grpc_client_setup_request *r); -#endif /* __GRPC_INTERNAL_CHANNEL_CLIENT_SETUP_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_CLIENT_SETUP_H */ diff --git a/src/core/channel/connected_channel.h b/src/core/channel/connected_channel.h index e19de62ca9..8b35f69b26 100644 --- a/src/core/channel/connected_channel.h +++ b/src/core/channel/connected_channel.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_CONNECTED_CHANNEL_H__ -#define __GRPC_INTERNAL_CHANNEL_CONNECTED_CHANNEL_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_CONNECTED_CHANNEL_H +#define GRPC_INTERNAL_CORE_CHANNEL_CONNECTED_CHANNEL_H #include "src/core/channel/channel_stack.h" @@ -46,4 +46,4 @@ extern const grpc_channel_filter grpc_connected_channel_filter; grpc_transport_setup_result grpc_connected_channel_bind_transport( grpc_channel_stack *channel_stack, grpc_transport *transport); -#endif /* __GRPC_INTERNAL_CHANNEL_CONNECTED_CHANNEL_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_CONNECTED_CHANNEL_H */ diff --git a/src/core/channel/http_client_filter.h b/src/core/channel/http_client_filter.h index 5882f8fe05..04eb839e00 100644 --- a/src/core/channel/http_client_filter.h +++ b/src/core/channel/http_client_filter.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_HTTP_CLIENT_FILTER_H__ -#define __GRPC_INTERNAL_CHANNEL_HTTP_CLIENT_FILTER_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_HTTP_CLIENT_FILTER_H +#define GRPC_INTERNAL_CORE_CHANNEL_HTTP_CLIENT_FILTER_H #include "src/core/channel/channel_stack.h" @@ -41,4 +41,4 @@ extern const grpc_channel_filter grpc_http_client_filter; #define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme" -#endif /* __GRPC_INTERNAL_CHANNEL_HTTP_CLIENT_FILTER_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_HTTP_CLIENT_FILTER_H */ diff --git a/src/core/channel/http_filter.h b/src/core/channel/http_filter.h index b85cd3956e..1b116ad61f 100644 --- a/src/core/channel/http_filter.h +++ b/src/core/channel/http_filter.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_HTTP_FILTER_H__ -#define __GRPC_INTERNAL_CHANNEL_HTTP_FILTER_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_HTTP_FILTER_H +#define GRPC_INTERNAL_CORE_CHANNEL_HTTP_FILTER_H #include "src/core/channel/channel_stack.h" @@ -40,4 +40,4 @@ transports. */ extern const grpc_channel_filter grpc_http_filter; -#endif /* __GRPC_INTERNAL_CHANNEL_HTTP_FILTER_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_HTTP_FILTER_H */ diff --git a/src/core/channel/http_server_filter.h b/src/core/channel/http_server_filter.h index 0643c7be83..42f76ed17f 100644 --- a/src/core/channel/http_server_filter.h +++ b/src/core/channel/http_server_filter.h @@ -31,12 +31,12 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_HTTP_SERVER_FILTER_H__ -#define __GRPC_INTERNAL_CHANNEL_HTTP_SERVER_FILTER_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_HTTP_SERVER_FILTER_H +#define GRPC_INTERNAL_CORE_CHANNEL_HTTP_SERVER_FILTER_H #include "src/core/channel/channel_stack.h" /* Processes metadata on the client side for HTTP2 transports */ extern const grpc_channel_filter grpc_http_server_filter; -#endif /* __GRPC_INTERNAL_CHANNEL_HTTP_SERVER_FILTER_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_HTTP_SERVER_FILTER_H */ diff --git a/src/core/channel/metadata_buffer.h b/src/core/channel/metadata_buffer.h index 701d69df7c..b7cc5170d1 100644 --- a/src/core/channel/metadata_buffer.h +++ b/src/core/channel/metadata_buffer.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_METADATA_BUFFER_H__ -#define __GRPC_INTERNAL_CHANNEL_METADATA_BUFFER_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_METADATA_BUFFER_H +#define GRPC_INTERNAL_CORE_CHANNEL_METADATA_BUFFER_H #include "src/core/channel/channel_stack.h" @@ -67,4 +67,4 @@ grpc_metadata *grpc_metadata_buffer_extract_elements( grpc_metadata_buffer *buffer); void grpc_metadata_buffer_cleanup_elements(void *elements, grpc_op_error error); -#endif /* __GRPC_INTERNAL_CHANNEL_METADATA_BUFFER_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_METADATA_BUFFER_H */ diff --git a/src/core/channel/noop_filter.h b/src/core/channel/noop_filter.h index 93c2bff9b0..96463e5322 100644 --- a/src/core/channel/noop_filter.h +++ b/src/core/channel/noop_filter.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_CHANNEL_NOOP_FILTER_H__ -#define __GRPC_INTERNAL_CHANNEL_NOOP_FILTER_H__ +#ifndef GRPC_INTERNAL_CORE_CHANNEL_NOOP_FILTER_H +#define GRPC_INTERNAL_CORE_CHANNEL_NOOP_FILTER_H #include "src/core/channel/channel_stack.h" @@ -41,4 +41,4 @@ customize for their own filters */ extern const grpc_channel_filter grpc_no_op_filter; -#endif /* __GRPC_INTERNAL_CHANNEL_NOOP_FILTER_H__ */ +#endif /* GRPC_INTERNAL_CORE_CHANNEL_NOOP_FILTER_H */ diff --git a/src/core/compression/algorithm.h b/src/core/compression/algorithm.h index e398ae34b4..9dd9f57b56 100644 --- a/src/core/compression/algorithm.h +++ b/src/core/compression/algorithm.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_COMPRESSION_ALGORITHM_H__ -#define __GRPC_INTERNAL_COMPRESSION_ALGORITHM_H__ +#ifndef GRPC_INTERNAL_CORE_COMPRESSION_ALGORITHM_H +#define GRPC_INTERNAL_CORE_COMPRESSION_ALGORITHM_H /* The various compression algorithms supported by GRPC */ typedef enum { @@ -46,4 +46,4 @@ typedef enum { const char *grpc_compression_algorithm_name( grpc_compression_algorithm algorithm); -#endif /* __GRPC_INTERNAL_COMPRESSION_ALGORITHM_H__ */ +#endif /* GRPC_INTERNAL_CORE_COMPRESSION_ALGORITHM_H */ diff --git a/src/core/compression/message_compress.h b/src/core/compression/message_compress.h index 666da2ed0d..e8aef1a713 100644 --- a/src/core/compression/message_compress.h +++ b/src/core/compression/message_compress.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_COMPRESSION_MESSAGE_COMPRESS_H__ -#define __GRPC_INTERNAL_COMPRESSION_MESSAGE_COMPRESS_H__ +#ifndef GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H +#define GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H #include "src/core/compression/algorithm.h" #include <grpc/support/slice_buffer.h> @@ -49,4 +49,4 @@ int grpc_msg_compress(grpc_compression_algorithm algorithm, int grpc_msg_decompress(grpc_compression_algorithm algorithm, gpr_slice_buffer *input, gpr_slice_buffer *output); -#endif /* __GRPC_INTERNAL_COMPRESSION_MESSAGE_COMPRESS_H__ */ +#endif /* GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H */ diff --git a/src/core/debug/trace.h b/src/core/debug/trace.h index bf9b8a3642..2059599a7d 100644 --- a/src/core/debug/trace.h +++ b/src/core/debug/trace.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_DEBUG_TRACE_H -#define GRPC_CORE_DEBUG_TRACE_H +#ifndef GRPC_INTERNAL_CORE_DEBUG_TRACE_H +#define GRPC_INTERNAL_CORE_DEBUG_TRACE_H #include <grpc/support/port_platform.h> @@ -57,5 +57,4 @@ extern gpr_uint32 grpc_trace_bits; void grpc_init_trace_bits(); -#endif - +#endif /* GRPC_INTERNAL_CORE_DEBUG_TRACE_H */ diff --git a/src/core/httpcli/format_request.h b/src/core/httpcli/format_request.h index e06b632990..8bfb20bfd0 100644 --- a/src/core/httpcli/format_request.h +++ b/src/core/httpcli/format_request.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_HTTPCLI_FORMAT_REQUEST_H__ -#define __GRPC_INTERNAL_HTTPCLI_FORMAT_REQUEST_H__ +#ifndef GRPC_INTERNAL_CORE_HTTPCLI_FORMAT_REQUEST_H +#define GRPC_INTERNAL_CORE_HTTPCLI_FORMAT_REQUEST_H #include "src/core/httpcli/httpcli.h" #include <grpc/support/slice.h> @@ -42,4 +42,4 @@ gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, const char *body_bytes, size_t body_size); -#endif /* __GRPC_INTERNAL_HTTPCLI_FORMAT_REQUEST_H__ */ +#endif /* GRPC_INTERNAL_CORE_HTTPCLI_FORMAT_REQUEST_H */ diff --git a/src/core/httpcli/httpcli.h b/src/core/httpcli/httpcli.h index f620987768..255c5ed90f 100644 --- a/src/core/httpcli/httpcli.h +++ b/src/core/httpcli/httpcli.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_HTTPCLI_HTTPCLI_H__ -#define __GRPC_INTERNAL_HTTPCLI_HTTPCLI_H__ +#ifndef GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H +#define GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H #include <stddef.h> @@ -115,4 +115,4 @@ typedef int (*grpc_httpcli_post_override)(const grpc_httpcli_request *request, void grpc_httpcli_set_override(grpc_httpcli_get_override get, grpc_httpcli_post_override post); -#endif /* __GRPC_INTERNAL_HTTPCLI_HTTPCLI_H__ */ +#endif /* GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H */ diff --git a/src/core/httpcli/httpcli_security_context.h b/src/core/httpcli/httpcli_security_context.h index 5a1311e7a4..a776828a69 100644 --- a/src/core/httpcli/httpcli_security_context.h +++ b/src/core/httpcli/httpcli_security_context.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_HTTPCLI_HTTPCLI_SECURITY_CONTEXT_H__ -#define __GRPC_INTERNAL_HTTPCLI_HTTPCLI_SECURITY_CONTEXT_H__ +#ifndef GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_SECURITY_CONTEXT_H +#define GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_SECURITY_CONTEXT_H #include "src/core/security/security_context.h" @@ -40,4 +40,4 @@ grpc_security_status grpc_httpcli_ssl_channel_security_context_create( const unsigned char *pem_root_certs, size_t pem_root_certs_size, const char *secure_peer_name, grpc_channel_security_context **ctx); -#endif /* __GRPC_INTERNAL_HTTPCLI_HTTPCLI_SECURITY_CONTEXT_H__ */ +#endif /* GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_SECURITY_CONTEXT_H */ diff --git a/src/core/httpcli/parser.h b/src/core/httpcli/parser.h index db1fa0a33c..71280e7479 100644 --- a/src/core/httpcli/parser.h +++ b/src/core/httpcli/parser.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_HTTPCLI_PARSER_H__ -#define __GRPC_INTERNAL_HTTPCLI_PARSER_H__ +#ifndef GRPC_INTERNAL_CORE_HTTPCLI_PARSER_H +#define GRPC_INTERNAL_CORE_HTTPCLI_PARSER_H #include "src/core/httpcli/httpcli.h" #include <grpc/support/port_platform.h> @@ -61,4 +61,4 @@ void grpc_httpcli_parser_destroy(grpc_httpcli_parser *parser); int grpc_httpcli_parser_parse(grpc_httpcli_parser *parser, gpr_slice slice); int grpc_httpcli_parser_eof(grpc_httpcli_parser *parser); -#endif /* __GRPC_INTERNAL_HTTPCLI_PARSER_H__ */ +#endif /* GRPC_INTERNAL_CORE_HTTPCLI_PARSER_H */ diff --git a/src/core/iomgr/alarm.h b/src/core/iomgr/alarm.h index 6dcc63a6d5..e5262e2199 100644 --- a/src/core/iomgr/alarm.h +++ b/src/core/iomgr/alarm.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_ALARM_H__ -#define __GRPC_INTERNAL_IOMGR_ALARM_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_ALARM_H +#define GRPC_INTERNAL_CORE_IOMGR_ALARM_H #include "src/core/iomgr/iomgr.h" #include <grpc/support/port_platform.h> @@ -86,4 +86,4 @@ void grpc_alarm_init(grpc_alarm *alarm, gpr_timespec deadline, Requires: cancel() must happen after add() on a given alarm */ void grpc_alarm_cancel(grpc_alarm *alarm); -#endif /* __GRPC_INTERNAL_IOMGR_ALARM_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_ALARM_H */ diff --git a/src/core/iomgr/alarm_heap.h b/src/core/iomgr/alarm_heap.h index bb6e5e3a89..c5adfc6d31 100644 --- a/src/core/iomgr/alarm_heap.h +++ b/src/core/iomgr/alarm_heap.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_ALARM_HEAP_H_ -#define __GRPC_INTERNAL_IOMGR_ALARM_HEAP_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_ALARM_HEAP_H +#define GRPC_INTERNAL_CORE_IOMGR_ALARM_HEAP_H #include "src/core/iomgr/alarm.h" @@ -54,4 +54,4 @@ void grpc_alarm_heap_pop(grpc_alarm_heap *heap); int grpc_alarm_heap_is_empty(grpc_alarm_heap *heap); -#endif /* __GRPC_INTERNAL_IOMGR_ALARM_HEAP_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_ALARM_HEAP_H */ diff --git a/src/core/iomgr/alarm_internal.h b/src/core/iomgr/alarm_internal.h index cbd8fa9421..0268a01bad 100644 --- a/src/core/iomgr/alarm_internal.h +++ b/src/core/iomgr/alarm_internal.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_ALARM_INTERNAL_H_ -#define __GRPC_INTERNAL_IOMGR_ALARM_INTERNAL_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_ALARM_INTERNAL_H +#define GRPC_INTERNAL_CORE_IOMGR_ALARM_INTERNAL_H #include <grpc/support/sync.h> #include <grpc/support/time.h> @@ -59,4 +59,4 @@ gpr_timespec grpc_alarm_list_next_timeout(void); void grpc_kick_poller(void); -#endif /* __GRPC_INTERNAL_IOMGR_ALARM_INTERNAL_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_ALARM_INTERNAL_H */ diff --git a/src/core/iomgr/endpoint.h b/src/core/iomgr/endpoint.h index e89cf6691c..881e851800 100644 --- a/src/core/iomgr/endpoint.h +++ b/src/core/iomgr/endpoint.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_ENDPOINT_H__ -#define __GRPC_INTERNAL_IOMGR_ENDPOINT_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H +#define GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H #include "src/core/iomgr/pollset.h" #include <grpc/support/slice.h> @@ -103,4 +103,4 @@ struct grpc_endpoint { const grpc_endpoint_vtable *vtable; }; -#endif /* __GRPC_INTERNAL_IOMGR_ENDPOINT_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H */ diff --git a/src/core/iomgr/endpoint_pair.h b/src/core/iomgr/endpoint_pair.h index 2e46aab228..dffbd36d4c 100644 --- a/src/core/iomgr/endpoint_pair.h +++ b/src/core/iomgr/endpoint_pair.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_ENDPOINT_PAIR_H_ -#define __GRPC_INTERNAL_IOMGR_ENDPOINT_PAIR_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_PAIR_H +#define GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_PAIR_H #include "src/core/iomgr/endpoint.h" @@ -43,4 +43,4 @@ typedef struct { grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(size_t read_slice_size); -#endif /* __GRPC_INTERNAL_IOMGR_ENDPOINT_PAIR_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_PAIR_H */ diff --git a/src/core/iomgr/fd_posix.h b/src/core/iomgr/fd_posix.h index 2a308c8ae2..be21f2b55f 100644 --- a/src/core/iomgr/fd_posix.h +++ b/src/core/iomgr/fd_posix.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_FD_POSIX_H_ -#define __GRPC_INTERNAL_IOMGR_FD_POSIX_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_FD_POSIX_H +#define GRPC_INTERNAL_CORE_IOMGR_FD_POSIX_H #include "src/core/iomgr/iomgr.h" #include "src/core/iomgr/pollset.h" @@ -143,4 +143,4 @@ void grpc_fd_unref(grpc_fd *fd); void grpc_fd_global_init(void); void grpc_fd_global_shutdown(void); -#endif /* __GRPC_INTERNAL_IOMGR_FD_POSIX_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_FD_POSIX_H */ diff --git a/src/core/iomgr/iocp_windows.h b/src/core/iomgr/iocp_windows.h index d0231702a1..33133193a1 100644 --- a/src/core/iomgr/iocp_windows.h +++ b/src/core/iomgr/iocp_windows.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_IOCP_WINDOWS_H_ -#define __GRPC_INTERNAL_IOMGR_IOCP_WINDOWS_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H +#define GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H #include <windows.h> #include <grpc/support/sync.h> @@ -49,4 +49,4 @@ void grpc_socket_notify_on_write(grpc_winsocket *, void(*cb)(void *, int success void grpc_socket_notify_on_read(grpc_winsocket *, void(*cb)(void *, int success), void *opaque); -#endif /* __GRPC_INTERNAL_IOMGR_IOCP_WINDOWS_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H */ diff --git a/src/core/iomgr/iomgr.h b/src/core/iomgr/iomgr.h index 18a7d151fc..1f5d23fdda 100644 --- a/src/core/iomgr/iomgr.h +++ b/src/core/iomgr/iomgr.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_IOMGR_H__ -#define __GRPC_INTERNAL_IOMGR_IOMGR_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_H +#define GRPC_INTERNAL_CORE_IOMGR_IOMGR_H /* gRPC Callback definition */ typedef void (*grpc_iomgr_cb_func)(void *arg, int success); @@ -44,4 +44,4 @@ void grpc_iomgr_shutdown(void); and causes the invocation of a callback at some point in the future */ void grpc_iomgr_add_callback(grpc_iomgr_cb_func cb, void *cb_arg); -#endif /* __GRPC_INTERNAL_IOMGR_IOMGR_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_H */ diff --git a/src/core/iomgr/iomgr_internal.h b/src/core/iomgr/iomgr_internal.h index 7f29f44f7f..07923258b9 100644 --- a/src/core/iomgr/iomgr_internal.h +++ b/src/core/iomgr/iomgr_internal.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_IOMGR_INTERNAL_H_ -#define __GRPC_INTERNAL_IOMGR_IOMGR_INTERNAL_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_INTERNAL_H +#define GRPC_INTERNAL_CORE_IOMGR_IOMGR_INTERNAL_H #include "src/core/iomgr/iomgr.h" #include "src/core/iomgr/iomgr_internal.h" @@ -48,4 +48,4 @@ void grpc_iomgr_unref(void); void grpc_iomgr_platform_init(void); void grpc_iomgr_platform_shutdown(void); -#endif /* __GRPC_INTERNAL_IOMGR_IOMGR_INTERNAL_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_INTERNAL_H */ diff --git a/src/core/iomgr/iomgr_posix.h b/src/core/iomgr/iomgr_posix.h index f9e9b3d6ee..a404f6433e 100644 --- a/src/core/iomgr/iomgr_posix.h +++ b/src/core/iomgr/iomgr_posix.h @@ -31,12 +31,12 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_IOMGR_POSIX_H_ -#define __GRPC_INTERNAL_IOMGR_IOMGR_POSIX_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_POSIX_H +#define GRPC_INTERNAL_CORE_IOMGR_IOMGR_POSIX_H #include "src/core/iomgr/iomgr_internal.h" void grpc_pollset_global_init(void); void grpc_pollset_global_shutdown(void); -#endif /* __GRPC_INTERNAL_IOMGR_IOMGR_POSIX_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_POSIX_H */ diff --git a/src/core/iomgr/pollset.h b/src/core/iomgr/pollset.h index c26947f37c..067af87c93 100644 --- a/src/core/iomgr/pollset.h +++ b/src/core/iomgr/pollset.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_POLLSET_H_ -#define __GRPC_INTERNAL_IOMGR_POLLSET_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_H +#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_H #include <grpc/support/port_platform.h> #include <grpc/support/time.h> @@ -71,4 +71,4 @@ int grpc_pollset_work(grpc_pollset *pollset, gpr_timespec deadline); Requires GRPC_POLLSET_MU(pollset) locked. */ void grpc_pollset_kick(grpc_pollset *pollset); -#endif /* __GRPC_INTERNAL_IOMGR_POLLSET_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_H */ diff --git a/src/core/iomgr/pollset_kick.h b/src/core/iomgr/pollset_kick.h index b224177d31..cc9357de1f 100644 --- a/src/core/iomgr/pollset_kick.h +++ b/src/core/iomgr/pollset_kick.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_POLLSET_KICK_H_ -#define __GRPC_INTERNAL_IOMGR_POLLSET_KICK_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_KICK_H +#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_KICK_H #include <grpc/support/port_platform.h> @@ -71,4 +71,4 @@ void grpc_pollset_kick_post_poll(grpc_pollset_kick_state *kick_state); void grpc_pollset_kick_kick(grpc_pollset_kick_state *kick_state); -#endif /* __GRPC_INTERNAL_IOMGR_POLLSET_KICK_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_KICK_H */ diff --git a/src/core/iomgr/pollset_kick_posix.h b/src/core/iomgr/pollset_kick_posix.h index 162ae5bd8f..427699198c 100644 --- a/src/core/iomgr/pollset_kick_posix.h +++ b/src/core/iomgr/pollset_kick_posix.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_POLLSET_KICK_POSIX_H_ -#define __GRPC_INTERNAL_IOMGR_POLLSET_KICK_POSIX_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_KICK_POSIX_H +#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_KICK_POSIX_H #include "src/core/iomgr/wakeup_fd_posix.h" #include <grpc/support/sync.h> @@ -48,4 +48,4 @@ typedef struct grpc_pollset_kick_state { struct grpc_kick_fd_info *fd_info; } grpc_pollset_kick_state; -#endif /* __GRPC_INTERNALIOMGR_POLLSET_KICK_POSIX_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_KICK_POSIX_H */ diff --git a/src/core/iomgr/pollset_kick_windows.h b/src/core/iomgr/pollset_kick_windows.h index 1053230a98..3836aa0082 100644 --- a/src/core/iomgr/pollset_kick_windows.h +++ b/src/core/iomgr/pollset_kick_windows.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_POLLSET_KICK_WINDOWS_H_ -#define __GRPC_INTERNAL_IOMGR_POLLSET_KICK_WINDOWS_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_KICK_WINDOWS_H +#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_KICK_WINDOWS_H #include <grpc/support/sync.h> @@ -42,4 +42,4 @@ typedef struct grpc_pollset_kick_state { int unused; } grpc_pollset_kick_state; -#endif /* __GRPC_INTERNALIOMGR_POLLSET_KICK_WINDOWS_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_KICK_WINDOWS_H */ diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index 86b6c9f20e..da843f7381 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_POLLSET_POSIX_H_ -#define __GRPC_INTERNAL_IOMGR_POLLSET_POSIX_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H +#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H #include <grpc/support/sync.h> @@ -104,4 +104,4 @@ grpc_pollset *grpc_backup_pollset(void); void grpc_platform_become_multipoller(grpc_pollset *pollset, struct grpc_fd **fds, size_t fd_count); -#endif /* __GRPC_INTERNAL_IOMGR_POLLSET_POSIX_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H */ diff --git a/src/core/iomgr/pollset_windows.h b/src/core/iomgr/pollset_windows.h index 41c193fcad..266175abfb 100644 --- a/src/core/iomgr/pollset_windows.h +++ b/src/core/iomgr/pollset_windows.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_POLLSET_WINDOWS_H_ -#define __GRPC_INTERNAL_IOMGR_POLLSET_WINDOWS_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H +#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H #include <windows.h> #include <grpc/support/sync.h> @@ -53,4 +53,4 @@ typedef struct grpc_pollset { #define GRPC_POLLSET_MU(pollset) (&(pollset)->mu) #define GRPC_POLLSET_CV(pollset) (&(pollset)->cv) -#endif /* __GRPC_INTERNAL_IOMGR_POLLSET_WINDOWS_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H */ diff --git a/src/core/iomgr/resolve_address.h b/src/core/iomgr/resolve_address.h index 65432ec61a..8f1d7a22bb 100644 --- a/src/core/iomgr/resolve_address.h +++ b/src/core/iomgr/resolve_address.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_RESOLVE_ADDRESS_H__ -#define __GRPC_INTERNAL_IOMGR_RESOLVE_ADDRESS_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_RESOLVE_ADDRESS_H +#define GRPC_INTERNAL_CORE_IOMGR_RESOLVE_ADDRESS_H #include <stddef.h> @@ -66,4 +66,4 @@ void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addresses); grpc_resolved_addresses *grpc_blocking_resolve_address( const char *addr, const char *default_port); -#endif /* __GRPC_INTERNAL_IOMGR_RESOLVE_ADDRESS_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_RESOLVE_ADDRESS_H */ diff --git a/src/core/iomgr/sockaddr.h b/src/core/iomgr/sockaddr.h index a5f7c546ec..7528db73b8 100644 --- a/src/core/iomgr/sockaddr.h +++ b/src/core/iomgr/sockaddr.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_SOCKADDR_H_ -#define __GRPC_INTERNAL_IOMGR_SOCKADDR_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_H +#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_H #include <grpc/support/port_platform.h> @@ -44,4 +44,4 @@ #include "src/core/iomgr/sockaddr_posix.h" #endif -#endif /* __GRPC_INTERNAL_IOMGR_SOCKADDR_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_H */ diff --git a/src/core/iomgr/sockaddr_posix.h b/src/core/iomgr/sockaddr_posix.h index 00115e2536..2a3d932f70 100644 --- a/src/core/iomgr/sockaddr_posix.h +++ b/src/core/iomgr/sockaddr_posix.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_SOCKADDR_POSIX_H_ -#define __GRPC_INTERNAL_IOMGR_SOCKADDR_POSIX_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_POSIX_H +#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_POSIX_H #include <arpa/inet.h> #include <sys/socket.h> @@ -41,4 +41,4 @@ #include <netdb.h> #include <unistd.h> -#endif /* __GRPC_INTERNAL_IOMGR_SOCKADDR_POSIX_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_POSIX_H */ diff --git a/src/core/iomgr/sockaddr_utils.h b/src/core/iomgr/sockaddr_utils.h index d3a25ad373..bdfb83479b 100644 --- a/src/core/iomgr/sockaddr_utils.h +++ b/src/core/iomgr/sockaddr_utils.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_SOCKADDR_UTILS_H__ -#define __GRPC_INTERNAL_IOMGR_SOCKADDR_UTILS_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_UTILS_H +#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_UTILS_H #include "src/core/iomgr/sockaddr.h" @@ -84,4 +84,4 @@ int grpc_sockaddr_set_port(const struct sockaddr *addr, int port); int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr, int normalize); -#endif /* __GRPC_INTERNAL_IOMGR_SOCKADDR_UTILS_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_UTILS_H */ diff --git a/src/core/iomgr/sockaddr_win32.h b/src/core/iomgr/sockaddr_win32.h index 6ed164ced1..3a5f27bb34 100644 --- a/src/core/iomgr/sockaddr_win32.h +++ b/src/core/iomgr/sockaddr_win32.h @@ -31,11 +31,11 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_SOCKADDR_WIN32_H_ -#define __GRPC_INTERNAL_IOMGR_SOCKADDR_WIN32_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_WIN32_H +#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_WIN32_H #include <ws2tcpip.h> #include <winsock2.h> #include <mswsock.h> -#endif /* __GRPC_INTERNAL_IOMGR_SOCKADDR_WIN32_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_WIN32_H */ diff --git a/src/core/iomgr/socket_utils_posix.h b/src/core/iomgr/socket_utils_posix.h index b35fe785f1..c161082afc 100644 --- a/src/core/iomgr/socket_utils_posix.h +++ b/src/core/iomgr/socket_utils_posix.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_SOCKET_UTILS_POSIX_H__ -#define __GRPC_INTERNAL_IOMGR_SOCKET_UTILS_POSIX_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKET_UTILS_POSIX_H +#define GRPC_INTERNAL_CORE_IOMGR_SOCKET_UTILS_POSIX_H #include <unistd.h> #include <sys/socket.h> @@ -105,4 +105,4 @@ extern int grpc_forbid_dualstack_sockets_for_testing; int grpc_create_dualstack_socket(const struct sockaddr *addr, int type, int protocol, grpc_dualstack_mode *dsmode); -#endif /* __GRPC_INTERNAL_IOMGR_SOCKET_UTILS_POSIX_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKET_UTILS_POSIX_H */ diff --git a/src/core/iomgr/socket_windows.h b/src/core/iomgr/socket_windows.h index de80e97e7f..d4776ab10f 100644 --- a/src/core/iomgr/socket_windows.h +++ b/src/core/iomgr/socket_windows.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_HANDLE_WINDOWS_H__ -#define __GRPC_INTERNAL_IOMGR_HANDLE_WINDOWS_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKET_WINDOWS_H +#define GRPC_INTERNAL_CORE_IOMGR_SOCKET_WINDOWS_H #include <windows.h> @@ -72,4 +72,4 @@ grpc_winsocket *grpc_winsocket_create(SOCKET socket); void grpc_winsocket_shutdown(grpc_winsocket *socket); void grpc_winsocket_orphan(grpc_winsocket *socket); -#endif /* __GRPC_INTERNAL_IOMGR_HANDLE_WINDOWS_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKET_WINDOWS_H */ diff --git a/src/core/iomgr/tcp_client.h b/src/core/iomgr/tcp_client.h index c919c02440..2e91497fb7 100644 --- a/src/core/iomgr/tcp_client.h +++ b/src/core/iomgr/tcp_client.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_TCP_CLIENT_H__ -#define __GRPC_INTERNAL_IOMGR_TCP_CLIENT_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_CLIENT_H +#define GRPC_INTERNAL_CORE_IOMGR_TCP_CLIENT_H #include "src/core/iomgr/endpoint.h" #include "src/core/iomgr/sockaddr.h" @@ -45,4 +45,4 @@ void grpc_tcp_client_connect(void (*cb)(void *arg, grpc_endpoint *tcp), void *arg, const struct sockaddr *addr, int addr_len, gpr_timespec deadline); -#endif /* __GRPC_INTERNAL_IOMGR_TCP_CLIENT_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_CLIENT_H */ diff --git a/src/core/iomgr/tcp_posix.h b/src/core/iomgr/tcp_posix.h index 6ff87704ef..7e8064bffc 100644 --- a/src/core/iomgr/tcp_posix.h +++ b/src/core/iomgr/tcp_posix.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_TCP_POSIX_H__ -#define __GRPC_INTERNAL_IOMGR_TCP_POSIX_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_POSIX_H +#define GRPC_INTERNAL_CORE_IOMGR_TCP_POSIX_H /* Low level TCP "bottom half" implementation, for use by transports built on top of a TCP connection. @@ -53,4 +53,4 @@ Takes ownership of fd. */ grpc_endpoint *grpc_tcp_create(grpc_fd *fd, size_t read_slice_size); -#endif /* __GRPC_INTERNAL_IOMGR_TCP_POSIX_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_POSIX_H */ diff --git a/src/core/iomgr/tcp_server.h b/src/core/iomgr/tcp_server.h index c1e5f45208..68ee85c5a7 100644 --- a/src/core/iomgr/tcp_server.h +++ b/src/core/iomgr/tcp_server.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_TCP_SERVER_H__ -#define __GRPC_INTERNAL_IOMGR_TCP_SERVER_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H +#define GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H #include "src/core/iomgr/endpoint.h" @@ -73,4 +73,4 @@ int grpc_tcp_server_get_fd(grpc_tcp_server *s, unsigned index); void grpc_tcp_server_destroy(grpc_tcp_server *server); -#endif /* __GRPC_INTERNAL_IOMGR_TCP_SERVER_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H */ diff --git a/src/core/iomgr/tcp_windows.h b/src/core/iomgr/tcp_windows.h index 565d42e5b2..4cbc12c53a 100644 --- a/src/core/iomgr/tcp_windows.h +++ b/src/core/iomgr/tcp_windows.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_TCP_WINDOWS_H__ -#define __GRPC_INTERNAL_IOMGR_TCP_WINDOWS_H__ +#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_WINDOWS_H +#define GRPC_INTERNAL_CORE_IOMGR_TCP_WINDOWS_H /* Low level TCP "bottom half" implementation, for use by transports built on top of a TCP connection. @@ -54,4 +54,4 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket); int grpc_tcp_prepare_socket(SOCKET sock); -#endif /* __GRPC_INTERNAL_IOMGR_TCP_WINDOWS_H__ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_WINDOWS_H */ diff --git a/src/core/iomgr/time_averaged_stats.h b/src/core/iomgr/time_averaged_stats.h index e901f3c33b..13894b2640 100644 --- a/src/core/iomgr/time_averaged_stats.h +++ b/src/core/iomgr/time_averaged_stats.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_TIME_AVERAGED_STATS_H_ -#define __GRPC_INTERNAL_IOMGR_TIME_AVERAGED_STATS_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_TIME_AVERAGED_STATS_H +#define GRPC_INTERNAL_CORE_IOMGR_TIME_AVERAGED_STATS_H /* This tracks a time-decaying weighted average. It works by collecting batches of samples and then mixing their average into a time-decaying @@ -85,4 +85,4 @@ void grpc_time_averaged_stats_add_sample(grpc_time_averaged_stats *stats, value. */ double grpc_time_averaged_stats_update_average(grpc_time_averaged_stats *stats); -#endif /* __GRPC_INTERNAL_IOMGR_TIME_AVERAGED_STATS_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_TIME_AVERAGED_STATS_H */ diff --git a/src/core/iomgr/wakeup_fd_pipe.h b/src/core/iomgr/wakeup_fd_pipe.h index a2fcde5b55..aa8f977ddb 100644 --- a/src/core/iomgr/wakeup_fd_pipe.h +++ b/src/core/iomgr/wakeup_fd_pipe.h @@ -31,11 +31,11 @@ * */ -#ifndef __GRPC_INTERNAL_IOMGR_WAKEUP_FD_PIPE_H_ -#define __GRPC_INTERNAL_IOMGR_WAKEUP_FD_PIPE_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_PIPE_H +#define GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_PIPE_H #include "src/core/iomgr/wakeup_fd_posix.h" extern grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable; -#endif /* __GRPC_INTERNAL_IOMGR_WAKEUP_FD_PIPE_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_PIPE_H */ diff --git a/src/core/iomgr/wakeup_fd_posix.h b/src/core/iomgr/wakeup_fd_posix.h index 75bb9fc766..1b0ff70c7f 100644 --- a/src/core/iomgr/wakeup_fd_posix.h +++ b/src/core/iomgr/wakeup_fd_posix.h @@ -59,8 +59,8 @@ * 2. If the polling thread was awakened by a wakeup_fd event, call * grpc_wakeup_fd_consume_wakeup() on it. */ -#ifndef __GRPC_INTERNAL_IOMGR_WAKEUP_FD_POSIX_H_ -#define __GRPC_INTERNAL_IOMGR_WAKEUP_FD_POSIX_H_ +#ifndef GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_POSIX_H +#define GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_POSIX_H void grpc_wakeup_fd_global_init(void); void grpc_wakeup_fd_global_destroy(void); @@ -96,4 +96,4 @@ void grpc_wakeup_fd_destroy(grpc_wakeup_fd_info *fd_info); * wakeup_fd_nospecial.c if no such implementation exists. */ extern const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable; -#endif /* __GRPC_INTERNAL_IOMGR_WAKEUP_FD_POSIX_H_ */ +#endif /* GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_POSIX_H */ diff --git a/src/core/json/json.h b/src/core/json/json.h index dc519e9d5e..69cbac17dc 100644 --- a/src/core/json/json.h +++ b/src/core/json/json.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_SRC_CORE_JSON_JSON_H__ -#define __GRPC_SRC_CORE_JSON_JSON_H__ +#ifndef GRPC_INTERNAL_CORE_JSON_JSON_H +#define GRPC_INTERNAL_CORE_JSON_JSON_H #include <stdlib.h> @@ -85,4 +85,4 @@ char* grpc_json_dump_to_string(grpc_json* json, int indent); grpc_json* grpc_json_create(grpc_json_type type); void grpc_json_destroy(grpc_json* json); -#endif /* __GRPC_SRC_CORE_JSON_JSON_H__ */ +#endif /* GRPC_INTERNAL_CORE_JSON_JSON_H */ diff --git a/src/core/json/json_common.h b/src/core/json/json_common.h index 60763cc72e..84bf375916 100644 --- a/src/core/json/json_common.h +++ b/src/core/json/json_common.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_SRC_CORE_JSON_JSON_COMMON_H__ -#define __GRPC_SRC_CORE_JSON_JSON_COMMON_H__ +#ifndef GRPC_INTERNAL_CORE_JSON_JSON_COMMON_H +#define GRPC_INTERNAL_CORE_JSON_JSON_COMMON_H /* The various json types. */ typedef enum { @@ -46,4 +46,4 @@ typedef enum { GRPC_JSON_TOP_LEVEL } grpc_json_type; -#endif /* __GRPC_SRC_CORE_JSON_JSON_COMMON_H__ */ +#endif /* GRPC_INTERNAL_CORE_JSON_JSON_COMMON_H */ diff --git a/src/core/json/json_reader.h b/src/core/json/json_reader.h index f7f59127f9..b1a5ace8fb 100644 --- a/src/core/json/json_reader.h +++ b/src/core/json/json_reader.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_SRC_CORE_JSON_JSON_READER_H__ -#define __GRPC_SRC_CORE_JSON_JSON_READER_H__ +#ifndef GRPC_INTERNAL_CORE_JSON_JSON_READER_H +#define GRPC_INTERNAL_CORE_JSON_JSON_READER_H #include <grpc/support/port_platform.h> #include "src/core/json/json_common.h" @@ -157,4 +157,4 @@ void grpc_json_reader_init(grpc_json_reader* reader, */ int grpc_json_reader_is_complete(grpc_json_reader* reader); -#endif /* __GRPC_SRC_CORE_JSON_JSON_READER_H__ */ +#endif /* GRPC_INTERNAL_CORE_JSON_JSON_READER_H */ diff --git a/src/core/json/json_writer.h b/src/core/json/json_writer.h index 5d5d0891a3..dfa61a5fef 100644 --- a/src/core/json/json_writer.h +++ b/src/core/json/json_writer.h @@ -43,8 +43,8 @@ * a valid UTF-8 string overall. */ -#ifndef __GRPC_SRC_CORE_JSON_JSON_WRITER_H__ -#define __GRPC_SRC_CORE_JSON_JSON_WRITER_H__ +#ifndef GRPC_INTERNAL_CORE_JSON_JSON_WRITER_H +#define GRPC_INTERNAL_CORE_JSON_JSON_WRITER_H #include <stdlib.h> @@ -90,4 +90,4 @@ void grpc_json_writer_value_raw_with_len(grpc_json_writer* writer, const char* s /* Sets a string value. It'll be escaped, and utf-8 validated. */ void grpc_json_writer_value_string(grpc_json_writer* writer, const char* string); -#endif /* __GRPC_SRC_CORE_JSON_JSON_WRITER_H__ */ +#endif /* GRPC_INTERNAL_CORE_JSON_JSON_WRITER_H */ diff --git a/src/core/security/auth.h b/src/core/security/auth.h index fee75c40e1..08dc4152ba 100644 --- a/src/core/security/auth.h +++ b/src/core/security/auth.h @@ -31,11 +31,11 @@ * */ -#ifndef __GRPC_INTERNAL_SECURITY_AUTH_H__ -#define __GRPC_INTERNAL_SECURITY_AUTH_H__ +#ifndef GRPC_INTERNAL_CORE_SECURITY_AUTH_H +#define GRPC_INTERNAL_CORE_SECURITY_AUTH_H #include "src/core/channel/channel_stack.h" extern const grpc_channel_filter grpc_client_auth_filter; -#endif /* __GRPC_INTERNAL_SECURITY_AUTH_H__ */ +#endif /* GRPC_INTERNAL_CORE_SECURITY_AUTH_H */ diff --git a/src/core/security/base64.h b/src/core/security/base64.h index 0eb69d0ccb..6a7cd8e96c 100644 --- a/src/core/security/base64.h +++ b/src/core/security/base64.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SECURITY_BASE64_H_ -#define __GRPC_INTERNAL_SECURITY_BASE64_H_ +#ifndef GRPC_INTERNAL_CORE_SECURITY_BASE64_H +#define GRPC_INTERNAL_CORE_SECURITY_BASE64_H #include <grpc/support/slice.h> @@ -45,4 +45,4 @@ char *grpc_base64_encode(const void *data, size_t data_size, int url_safe, slice in case of failure. */ gpr_slice grpc_base64_decode(const char *b64, int url_safe); -#endif /* __GRPC_INTERNAL_SECURITY_BASE64_H_ */ +#endif /* GRPC_INTERNAL_CORE_SECURITY_BASE64_H */ diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h index 0a0074c1d5..454e66845d 100644 --- a/src/core/security/credentials.h +++ b/src/core/security/credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SECURITY_CREDENTIALS_H__ -#define __GRPC_INTERNAL_SECURITY_CREDENTIALS_H__ +#ifndef GRPC_INTERNAL_CORE_SECURITY_CREDENTIALS_H +#define GRPC_INTERNAL_CORE_SECURITY_CREDENTIALS_H #include "src/core/transport/stream_op.h" #include <grpc/grpc.h> @@ -160,4 +160,4 @@ typedef struct { const grpc_ssl_server_config *grpc_ssl_server_credentials_get_config( const grpc_server_credentials *ssl_creds); -#endif /* __GRPC_INTERNAL_SECURITY_CREDENTIALS_H__ */ +#endif /* GRPC_INTERNAL_CORE_SECURITY_CREDENTIALS_H */ diff --git a/src/core/security/json_token.h b/src/core/security/json_token.h index 1ef9682f52..029ede3955 100644 --- a/src/core/security/json_token.h +++ b/src/core/security/json_token.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SECURITY_JSON_TOKEN_H_ -#define __GRPC_INTERNAL_SECURITY_JSON_TOKEN_H_ +#ifndef GRPC_INTERNAL_CORE_SECURITY_JSON_TOKEN_H +#define GRPC_INTERNAL_CORE_SECURITY_JSON_TOKEN_H #include <grpc/support/slice.h> #include <openssl/rsa.h> @@ -79,4 +79,4 @@ typedef char *(*grpc_jwt_encode_and_sign_override)( void grpc_jwt_encode_and_sign_set_override( grpc_jwt_encode_and_sign_override func); -#endif /* __GRPC_INTERNAL_SECURITY_JSON_TOKEN_H_ */ +#endif /* GRPC_INTERNAL_CORE_SECURITY_JSON_TOKEN_H */ diff --git a/src/core/security/secure_endpoint.h b/src/core/security/secure_endpoint.h index 82ba4082e3..808889bf04 100644 --- a/src/core/security/secure_endpoint.h +++ b/src/core/security/secure_endpoint.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_ENDPOINT_SECURE_ENDPOINT_H__ -#define __GRPC_INTERNAL_ENDPOINT_SECURE_ENDPOINT_H__ +#ifndef GRPC_INTERNAL_CORE_SECURITY_SECURE_ENDPOINT_H +#define GRPC_INTERNAL_CORE_SECURITY_SECURE_ENDPOINT_H #include "src/core/iomgr/endpoint.h" #include <grpc/support/slice.h> @@ -44,4 +44,4 @@ grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *to_wrap, gpr_slice *leftover_slices, size_t leftover_nslices); -#endif /* __GRPC_INTERNAL_ENDPOINT_SECURE_ENDPOINT_H__ */ +#endif /* GRPC_INTERNAL_CORE_SECURITY_SECURE_ENDPOINT_H */ diff --git a/src/core/security/secure_transport_setup.h b/src/core/security/secure_transport_setup.h index 21f41fd682..e1f8ed7830 100644 --- a/src/core/security/secure_transport_setup.h +++ b/src/core/security/secure_transport_setup.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SECURITY_SECURE_TRANSPORT_SETUP_H__ -#define __GRPC_INTERNAL_SECURITY_SECURE_TRANSPORT_SETUP_H__ +#ifndef GRPC_INTERNAL_CORE_SECURITY_SECURE_TRANSPORT_SETUP_H +#define GRPC_INTERNAL_CORE_SECURITY_SECURE_TRANSPORT_SETUP_H #include "src/core/iomgr/endpoint.h" #include "src/core/security/security_context.h" @@ -50,4 +50,4 @@ void grpc_setup_secure_transport(grpc_security_context *ctx, grpc_secure_transport_setup_done_cb cb, void *user_data); -#endif /* __GRPC_INTERNAL_SECURITY_SECURE_TRANSPORT_SETUP_H__ */ +#endif /* GRPC_INTERNAL_CORE_SECURITY_SECURE_TRANSPORT_SETUP_H */ diff --git a/src/core/security/security_context.h b/src/core/security/security_context.h index 40e2daceb8..0b5821c3c0 100644 --- a/src/core/security/security_context.h +++ b/src/core/security/security_context.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SECURITY_SECURITY_CONTEXT_H__ -#define __GRPC_INTERNAL_SECURITY_SECURITY_CONTEXT_H__ +#ifndef GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONTEXT_H +#define GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONTEXT_H #include <grpc/grpc_security.h> #include "src/core/iomgr/endpoint.h" @@ -212,4 +212,4 @@ grpc_server *grpc_secure_server_create_internal(grpc_completion_queue *cq, const grpc_channel_args *args, grpc_security_context *ctx); -#endif /* __GRPC_INTERNAL_SECURITY_SECURITY_CONTEXT_H__ */ +#endif /* GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONTEXT_H */ diff --git a/src/core/statistics/census_interface.h b/src/core/statistics/census_interface.h index 0bb0a9f328..eb4349c311 100644 --- a/src/core/statistics/census_interface.h +++ b/src/core/statistics/census_interface.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_STATISTICS_CENSUS_INTERFACE_H__ -#define __GRPC_INTERNAL_STATISTICS_CENSUS_INTERFACE_H__ +#ifndef GRPC_INTERNAL_CORE_STATISTICS_CENSUS_INTERFACE_H +#define GRPC_INTERNAL_CORE_STATISTICS_CENSUS_INTERFACE_H #include <grpc/support/port_platform.h> @@ -73,4 +73,4 @@ census_op_id census_tracing_start_op(void); /* Ends tracing. Calling this function will invalidate the input op_id. */ void census_tracing_end_op(census_op_id op_id); -#endif /* __GRPC_INTERNAL_STATISTICS_CENSUS_INTERFACE_H__ */ +#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_INTERFACE_H */ diff --git a/src/core/statistics/census_log.h b/src/core/statistics/census_log.h index 01fd63aca3..06869b7a33 100644 --- a/src/core/statistics/census_log.h +++ b/src/core/statistics/census_log.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_STATISTICS_LOG_H__ -#define __GRPC_INTERNAL_STATISTICS_LOG_H__ +#ifndef GRPC_INTERNAL_CORE_STATISTICS_CENSUS_LOG_H +#define GRPC_INTERNAL_CORE_STATISTICS_CENSUS_LOG_H #include <stddef.h> @@ -88,4 +88,4 @@ size_t census_log_remaining_space(void); out-of-space. */ int census_log_out_of_space_count(void); -#endif /* __GRPC_INTERNAL_STATISTICS_LOG_H__ */ +#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_LOG_H */ diff --git a/src/core/statistics/census_rpc_stats.h b/src/core/statistics/census_rpc_stats.h index 942de81b88..9336dce1f8 100644 --- a/src/core/statistics/census_rpc_stats.h +++ b/src/core/statistics/census_rpc_stats.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_STATISTICS_CENSUS_RPC_STATS_H__ -#define __GRPC_INTERNAL_STATISTICS_CENSUS_RPC_STATS_H__ +#ifndef GRPC_INTERNAL_CORE_STATISTICS_CENSUS_RPC_STATS_H +#define GRPC_INTERNAL_CORE_STATISTICS_CENSUS_RPC_STATS_H #include "src/core/statistics/census_interface.h" #include <grpc/support/port_platform.h> @@ -98,4 +98,4 @@ void census_stats_store_shutdown(void); } #endif -#endif /* __GRPC_INTERNAL_STATISTICS_CENSUS_RPC_STATS_H__ */ +#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_RPC_STATS_H */ diff --git a/src/core/statistics/census_tracing.h b/src/core/statistics/census_tracing.h index 51aa578c0c..a4494b510c 100644 --- a/src/core/statistics/census_tracing.h +++ b/src/core/statistics/census_tracing.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_STATISTICS_CENSUS_TRACING_H_ -#define __GRPC_INTERNAL_STATISTICS_CENSUS_TRACING_H_ +#ifndef GRPC_INTERNAL_CORE_STATISTICS_CENSUS_TRACING_H +#define GRPC_INTERNAL_CORE_STATISTICS_CENSUS_TRACING_H #include <grpc/support/time.h> #include "src/core/statistics/census_rpc_stats.h" @@ -93,4 +93,4 @@ census_trace_obj** census_get_active_ops(int* num_active_ops); } #endif -#endif /* __GRPC_INTERNAL_STATISTICS_CENSUS_TRACING_H_ */ +#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_TRACING_H */ diff --git a/src/core/statistics/hash_table.h b/src/core/statistics/hash_table.h index 2c2386d1ab..7bcb4bcd9b 100644 --- a/src/core/statistics/hash_table.h +++ b/src/core/statistics/hash_table.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_STATISTICS_HASH_TABLE_H_ -#define __GRPC_INTERNAL_STATISTICS_HASH_TABLE_H_ +#ifndef GRPC_INTERNAL_CORE_STATISTICS_HASH_TABLE_H +#define GRPC_INTERNAL_CORE_STATISTICS_HASH_TABLE_H #include <stddef.h> @@ -128,4 +128,4 @@ typedef void (*census_ht_itr_cb)(census_ht_key key, const void* val_ptr, should not invalidate data entries. */ gpr_uint64 census_ht_for_all(const census_ht* ht, census_ht_itr_cb); -#endif /* __GRPC_INTERNAL_STATISTICS_HASH_TABLE_H_ */ +#endif /* GRPC_INTERNAL_CORE_STATISTICS_HASH_TABLE_H */ diff --git a/src/core/statistics/window_stats.h b/src/core/statistics/window_stats.h index 98f8dac559..d733d8d247 100644 --- a/src/core/statistics/window_stats.h +++ b/src/core/statistics/window_stats.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_STATISTICS_WINDOW_STATS_H_ -#define __GRPC_INTERNAL_STATISTICS_WINDOW_STATS_H_ +#ifndef GRPC_INTERNAL_CORE_STATISTICS_WINDOW_STATS_H +#define GRPC_INTERNAL_CORE_STATISTICS_WINDOW_STATS_H #include <grpc/support/time.h> @@ -170,4 +170,4 @@ void census_window_stats_get_sums(const struct census_window_stats* wstats, assertion failure). This function is thread-compatible. */ void census_window_stats_destroy(struct census_window_stats* wstats); -#endif /* __GRPC_INTERNAL_STATISTICS_WINDOW_STATS_H_ */ +#endif /* GRPC_INTERNAL_CORE_STATISTICS_WINDOW_STATS_H */ diff --git a/src/core/support/env.h b/src/core/support/env.h index 0c6091b84b..4f2e394d14 100644 --- a/src/core/support/env.h +++ b/src/core/support/env.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_SUPPORT_ENV_H__ -#define __GRPC_SUPPORT_ENV_H__ +#ifndef GRPC_INTERNAL_CORE_SUPPORT_ENV_H +#define GRPC_INTERNAL_CORE_SUPPORT_ENV_H #include <stdio.h> @@ -57,4 +57,4 @@ void gpr_setenv(const char *name, const char *value); } #endif -#endif /* __GRPC_SUPPORT_ENV_H__ */ +#endif /* GRPC_INTERNAL_CORE_SUPPORT_ENV_H */ diff --git a/src/core/support/file.h b/src/core/support/file.h index 600850e03d..ee6ca7b230 100644 --- a/src/core/support/file.h +++ b/src/core/support/file.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_SUPPORT_FILE_H__ -#define __GRPC_SUPPORT_FILE_H__ +#ifndef GRPC_INTERNAL_CORE_SUPPORT_FILE_H +#define GRPC_INTERNAL_CORE_SUPPORT_FILE_H #include <stdio.h> @@ -58,4 +58,4 @@ FILE *gpr_tmpfile(const char *prefix, char **tmp_filename); } #endif -#endif /* __GRPC_SUPPORT_FILE_H__ */ +#endif /* GRPC_INTERNAL_CORE_SUPPORT_FILE_H */ diff --git a/src/core/support/log_posix.c b/src/core/support/log_posix.c index 8f85791466..afca792c40 100644 --- a/src/core/support/log_posix.c +++ b/src/core/support/log_posix.c @@ -64,7 +64,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, } else { message = allocated = gpr_malloc(ret + 1); va_start(args, format); - vsnprintf(message, ret, format, args); + vsnprintf(message, ret + 1, format, args); va_end(args); } gpr_log_message(file, line, severity, message); diff --git a/src/core/support/murmur_hash.h b/src/core/support/murmur_hash.h index 06c0c56079..85ab2fe4bf 100644 --- a/src/core/support/murmur_hash.h +++ b/src/core/support/murmur_hash.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SUPPORT_MURMUR_HASH_H__ -#define __GRPC_INTERNAL_SUPPORT_MURMUR_HASH_H__ +#ifndef GRPC_INTERNAL_CORE_SUPPORT_MURMUR_HASH_H +#define GRPC_INTERNAL_CORE_SUPPORT_MURMUR_HASH_H #include <grpc/support/port_platform.h> @@ -41,4 +41,4 @@ /* compute the hash of key (length len) */ gpr_uint32 gpr_murmur_hash3(const void *key, size_t len, gpr_uint32 seed); -#endif /* __GRPC_INTERNAL_SUPPORT_MURMUR_HASH_H__ */ +#endif /* GRPC_INTERNAL_CORE_SUPPORT_MURMUR_HASH_H */ diff --git a/src/core/support/string.h b/src/core/support/string.h index eaa1826439..faf3342708 100644 --- a/src/core/support/string.h +++ b/src/core/support/string.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_SUPPORT_STRING_H__ -#define __GRPC_SUPPORT_STRING_H__ +#ifndef GRPC_INTERNAL_CORE_SUPPORT_STRING_H +#define GRPC_INTERNAL_CORE_SUPPORT_STRING_H #include <stddef.h> @@ -106,4 +106,4 @@ char *gpr_strvec_flatten(gpr_strvec *strs, size_t *total_length); } #endif -#endif /* __GRPC_SUPPORT_STRING_H__ */ +#endif /* GRPC_INTERNAL_CORE_SUPPORT_STRING_H */ diff --git a/src/core/support/string_win32.h b/src/core/support/string_win32.h index 5dbb40dbc3..0bc3247d9d 100644 --- a/src/core/support/string_win32.h +++ b/src/core/support/string_win32.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_SUPPORT_STRING_WIN32_H__ -#define __GRPC_SUPPORT_STRING_WIN32_H__ +#ifndef GRPC_INTERNAL_CORE_SUPPORT_STRING_WIN32_H +#define GRPC_INTERNAL_CORE_SUPPORT_STRING_WIN32_H #include <grpc/support/port_platform.h> @@ -46,4 +46,4 @@ LPSTR gpr_tchar_to_char(LPCTSTR input); #endif /* GPR_WIN32 */ -#endif /* __GRPC_SUPPORT_STRING_WIN32_H__ */ +#endif /* GRPC_INTERNAL_CORE_SUPPORT_STRING_WIN32_H */ diff --git a/src/core/support/thd_internal.h b/src/core/support/thd_internal.h index 0fb1447e48..4683c37742 100644 --- a/src/core/support/thd_internal.h +++ b/src/core/support/thd_internal.h @@ -31,9 +31,9 @@ * */ -#ifndef __GRPC_INTERNAL_SUPPORT_THD_INTERNAL_H__ -#define __GRPC_INTERNAL_SUPPORT_THD_INTERNAL_H__ +#ifndef GRPC_INTERNAL_CORE_SUPPORT_THD_INTERNAL_H +#define GRPC_INTERNAL_CORE_SUPPORT_THD_INTERNAL_H /* Internal interfaces between modules within the gpr support library. */ -#endif /* __GRPC_INTERNAL_SUPPORT_THD_INTERNAL_H__ */ +#endif /* GRPC_INTERNAL_CORE_SUPPORT_THD_INTERNAL_H */ diff --git a/src/core/surface/byte_buffer_queue.h b/src/core/surface/byte_buffer_queue.h index 9d3b5257a7..32c57f8756 100644 --- a/src/core/surface/byte_buffer_queue.h +++ b/src/core/surface/byte_buffer_queue.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SURFACE_BYTE_BUFFER_QUEUE_H__ -#define __GRPC_INTERNAL_SURFACE_BYTE_BUFFER_QUEUE_H__ +#ifndef GRPC_INTERNAL_CORE_SURFACE_BYTE_BUFFER_QUEUE_H +#define GRPC_INTERNAL_CORE_SURFACE_BYTE_BUFFER_QUEUE_H #include <grpc/byte_buffer.h> @@ -57,4 +57,4 @@ void grpc_bbq_flush(grpc_byte_buffer_queue *q); int grpc_bbq_empty(grpc_byte_buffer_queue *q); void grpc_bbq_push(grpc_byte_buffer_queue *q, grpc_byte_buffer *bb); -#endif /* __GRPC_INTERNAL_SURFACE_BYTE_BUFFER_QUEUE_H__ */ +#endif /* GRPC_INTERNAL_CORE_SURFACE_BYTE_BUFFER_QUEUE_H */ diff --git a/src/core/surface/call.h b/src/core/surface/call.h index dd3ad124e6..cb81cb52c2 100644 --- a/src/core/surface/call.h +++ b/src/core/surface/call.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SURFACE_CALL_H__ -#define __GRPC_INTERNAL_SURFACE_CALL_H__ +#ifndef GRPC_INTERNAL_CORE_SURFACE_CALL_H +#define GRPC_INTERNAL_CORE_SURFACE_CALL_H #include "src/core/channel/channel_stack.h" #include "src/core/channel/metadata_buffer.h" @@ -119,4 +119,4 @@ grpc_call_stack *grpc_call_get_call_stack(grpc_call *call); /* Given the top call_element, get the call object. */ grpc_call *grpc_call_from_top_element(grpc_call_element *surface_element); -#endif /* __GRPC_INTERNAL_SURFACE_CALL_H__ */ +#endif /* GRPC_INTERNAL_CORE_SURFACE_CALL_H */ diff --git a/src/core/surface/channel.h b/src/core/surface/channel.h index 6bdfd474d2..d3e51185ee 100644 --- a/src/core/surface/channel.h +++ b/src/core/surface/channel.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SURFACE_CHANNEL_H__ -#define __GRPC_INTERNAL_SURFACE_CHANNEL_H__ +#ifndef GRPC_INTERNAL_CORE_SURFACE_CHANNEL_H +#define GRPC_INTERNAL_CORE_SURFACE_CHANNEL_H #include "src/core/channel/channel_stack.h" @@ -50,4 +50,4 @@ void grpc_client_channel_closed(grpc_channel_element *elem); void grpc_channel_internal_ref(grpc_channel *channel); void grpc_channel_internal_unref(grpc_channel *channel); -#endif /* __GRPC_INTERNAL_SURFACE_CHANNEL_H__ */ +#endif /* GRPC_INTERNAL_CORE_SURFACE_CHANNEL_H */ diff --git a/src/core/surface/client.h b/src/core/surface/client.h index 06ce8f6656..9db2ccf3d2 100644 --- a/src/core/surface/client.h +++ b/src/core/surface/client.h @@ -31,11 +31,11 @@ * */ -#ifndef __GRPC_INTERNAL_SURFACE_CLIENT_H__ -#define __GRPC_INTERNAL_SURFACE_CLIENT_H__ +#ifndef GRPC_INTERNAL_CORE_SURFACE_CLIENT_H +#define GRPC_INTERNAL_CORE_SURFACE_CLIENT_H #include "src/core/channel/channel_stack.h" extern const grpc_channel_filter grpc_client_surface_filter; -#endif /* __GRPC_INTERNAL_SURFACE_CLIENT_H__ */ +#endif /* GRPC_INTERNAL_CORE_SURFACE_CLIENT_H */ diff --git a/src/core/surface/completion_queue.h b/src/core/surface/completion_queue.h index a7688b844c..3054264cad 100644 --- a/src/core/surface/completion_queue.h +++ b/src/core/surface/completion_queue.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SURFACE_COMPLETION_QUEUE_H__ -#define __GRPC_INTERNAL_SURFACE_COMPLETION_QUEUE_H__ +#ifndef GRPC_INTERNAL_CORE_SURFACE_COMPLETION_QUEUE_H +#define GRPC_INTERNAL_CORE_SURFACE_COMPLETION_QUEUE_H /* Internal API for completion channels */ @@ -114,4 +114,4 @@ void grpc_cq_dump_pending_ops(grpc_completion_queue *cc); grpc_pollset *grpc_cq_pollset(grpc_completion_queue *cc); -#endif /* __GRPC_INTERNAL_SURFACE_COMPLETION_QUEUE_H__ */ +#endif /* GRPC_INTERNAL_CORE_SURFACE_COMPLETION_QUEUE_H */ diff --git a/src/core/surface/event_string.h b/src/core/surface/event_string.h index d9b1e4e074..e8a8f93518 100644 --- a/src/core/surface/event_string.h +++ b/src/core/surface/event_string.h @@ -31,12 +31,12 @@ * */ -#ifndef __GRPC_INTERNAL_SURFACE_EVENT_STRING_H__ -#define __GRPC_INTERNAL_SURFACE_EVENT_STRING_H__ +#ifndef GRPC_INTERNAL_CORE_SURFACE_EVENT_STRING_H +#define GRPC_INTERNAL_CORE_SURFACE_EVENT_STRING_H #include <grpc/grpc.h> /* Returns a string describing an event. Must be later freed with gpr_free() */ char *grpc_event_string(grpc_event *ev); -#endif /* __GRPC_INTERNAL_SURFACE_EVENT_STRING_H__ */ +#endif /* GRPC_INTERNAL_CORE_SURFACE_EVENT_STRING_H */ diff --git a/src/core/surface/server.h b/src/core/surface/server.h index 5ae59b2255..e33f69b8c7 100644 --- a/src/core/surface/server.h +++ b/src/core/surface/server.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SURFACE_SERVER_H__ -#define __GRPC_INTERNAL_SURFACE_SERVER_H__ +#ifndef GRPC_INTERNAL_CORE_SURFACE_SERVER_H +#define GRPC_INTERNAL_CORE_SURFACE_SERVER_H #include "src/core/channel/channel_stack.h" #include <grpc/grpc.h> @@ -60,4 +60,4 @@ grpc_transport_setup_result grpc_server_setup_transport( const grpc_channel_args *grpc_server_get_channel_args(grpc_server *server); -#endif /* __GRPC_INTERNAL_SURFACE_SERVER_H__ */ +#endif /* GRPC_INTERNAL_CORE_SURFACE_SERVER_H */ diff --git a/src/core/surface/surface_trace.h b/src/core/surface/surface_trace.h index 4d478d6470..50071ee317 100644 --- a/src/core/surface/surface_trace.h +++ b/src/core/surface/surface_trace.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_SURFACE_SURFACE_TRACE_H__ -#define __GRPC_INTERNAL_SURFACE_SURFACE_TRACE_H__ +#ifndef GRPC_INTERNAL_CORE_SURFACE_SURFACE_TRACE_H +#define GRPC_INTERNAL_CORE_SURFACE_SURFACE_TRACE_H #include "src/core/debug/trace.h" #include <grpc/support/log.h> @@ -44,4 +44,4 @@ gpr_free(_ev); \ } -#endif /* __GRPC_INTERNAL_SURFACE_SURFACE_TRACE_H__ */ +#endif /* GRPC_INTERNAL_CORE_SURFACE_SURFACE_TRACE_H */ diff --git a/src/core/transport/chttp2/alpn.h b/src/core/transport/chttp2/alpn.h index 796f514f19..fcbefc060f 100644 --- a/src/core/transport/chttp2/alpn.h +++ b/src/core/transport/chttp2/alpn.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_ALPN_H_ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_ALPN_H_ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_ALPN_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_ALPN_H #include <string.h> @@ -46,4 +46,4 @@ size_t grpc_chttp2_num_alpn_versions(void); * grpc_chttp2_num_alpn_versions()) */ const char *grpc_chttp2_get_alpn_version_index(size_t i); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_ALPN_H_ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_ALPN_H */ diff --git a/src/core/transport/chttp2/bin_encoder.h b/src/core/transport/chttp2/bin_encoder.h index 2368fdd738..9c88ac9725 100644 --- a/src/core/transport/chttp2/bin_encoder.h +++ b/src/core/transport/chttp2/bin_encoder.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_BIN_ENCODER_H_ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_BIN_ENCODER_H_ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H #include <grpc/support/slice.h> @@ -53,4 +53,4 @@ gpr_slice grpc_chttp2_base64_encode_and_huffman_compress(gpr_slice input); int grpc_is_binary_header(const char *key, size_t length); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_BIN_ENCODER_H_ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H */ diff --git a/src/core/transport/chttp2/frame.h b/src/core/transport/chttp2/frame.h index 733dd5eec4..fbb941969e 100644 --- a/src/core/transport/chttp2/frame.h +++ b/src/core/transport/chttp2/frame.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H #include <grpc/support/port_platform.h> #include <grpc/support/slice.h> @@ -77,4 +77,4 @@ typedef struct { #define GRPC_CHTTP2_DATA_FLAG_PADDED 8 #define GRPC_CHTTP2_FLAG_HAS_PRIORITY 0x20 -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H */ diff --git a/src/core/transport/chttp2/frame_data.h b/src/core/transport/chttp2/frame_data.h index 4d05a5f452..24e557accd 100644 --- a/src/core/transport/chttp2/frame_data.h +++ b/src/core/transport/chttp2/frame_data.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_DATA_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_DATA_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_DATA_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_DATA_H /* Parser for GRPC streams embedded in DATA frames */ @@ -77,4 +77,4 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( /* create a slice with an empty data frame and is_last set */ gpr_slice grpc_chttp2_data_frame_create_empty_close(gpr_uint32 id); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_DATA_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_DATA_H */ diff --git a/src/core/transport/chttp2/frame_goaway.h b/src/core/transport/chttp2/frame_goaway.h index 9ccef27634..7638891514 100644 --- a/src/core/transport/chttp2/frame_goaway.h +++ b/src/core/transport/chttp2/frame_goaway.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_GOAWAY_H_ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_GOAWAY_H_ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_GOAWAY_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_GOAWAY_H #include "src/core/transport/chttp2/frame.h" #include <grpc/support/port_platform.h> @@ -71,4 +71,4 @@ void grpc_chttp2_goaway_append(gpr_uint32 last_stream_id, gpr_uint32 error_code, gpr_slice debug_data, gpr_slice_buffer *slice_buffer); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_GOAWAY_H_ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_GOAWAY_H */ diff --git a/src/core/transport/chttp2/frame_ping.h b/src/core/transport/chttp2/frame_ping.h index d9d6f7ef15..11d38b80ea 100644 --- a/src/core/transport/chttp2/frame_ping.h +++ b/src/core/transport/chttp2/frame_ping.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_PING_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_PING_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_PING_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_PING_H #include <grpc/support/slice.h> #include "src/core/transport/chttp2/frame.h" @@ -50,4 +50,4 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_begin_frame( grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_PING_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_PING_H */ diff --git a/src/core/transport/chttp2/frame_rst_stream.h b/src/core/transport/chttp2/frame_rst_stream.h index 83fc3806eb..2d3ee18637 100644 --- a/src/core/transport/chttp2/frame_rst_stream.h +++ b/src/core/transport/chttp2/frame_rst_stream.h @@ -31,11 +31,11 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H #include <grpc/support/slice.h> gpr_slice grpc_chttp2_rst_stream_create(gpr_uint32 stream_id, gpr_uint32 code); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H */ diff --git a/src/core/transport/chttp2/frame_settings.h b/src/core/transport/chttp2/frame_settings.h index 6cde2c6e47..18765631a6 100644 --- a/src/core/transport/chttp2/frame_settings.h +++ b/src/core/transport/chttp2/frame_settings.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_SETTINGS_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_SETTINGS_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_SETTINGS_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_SETTINGS_H #include <grpc/support/port_platform.h> #include <grpc/support/slice.h> @@ -96,4 +96,4 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_SETTINGS_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_SETTINGS_H */ diff --git a/src/core/transport/chttp2/frame_window_update.h b/src/core/transport/chttp2/frame_window_update.h index 093263db17..85475a8f9e 100644 --- a/src/core/transport/chttp2/frame_window_update.h +++ b/src/core/transport/chttp2/frame_window_update.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H #include <grpc/support/slice.h> #include "src/core/transport/chttp2/frame.h" @@ -52,4 +52,4 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H */ diff --git a/src/core/transport/chttp2/hpack_parser.h b/src/core/transport/chttp2/hpack_parser.h index 94acc8864f..bb4c1a1f49 100644 --- a/src/core/transport/chttp2/hpack_parser.h +++ b/src/core/transport/chttp2/hpack_parser.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_PARSER_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_PARSER_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_PARSER_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_PARSER_H #include <stddef.h> @@ -108,4 +108,4 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( void *hpack_parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_PARSER_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_PARSER_H */ diff --git a/src/core/transport/chttp2/hpack_table.h b/src/core/transport/chttp2/hpack_table.h index ea0fc1d030..d3bf41bbc5 100644 --- a/src/core/transport/chttp2/hpack_table.h +++ b/src/core/transport/chttp2/hpack_table.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_TABLE_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_TABLE_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_TABLE_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_TABLE_H #include "src/core/transport/metadata.h" #include <grpc/support/port_platform.h> @@ -94,4 +94,4 @@ typedef struct { grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find( const grpc_chttp2_hptbl *tbl, grpc_mdelem *md); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HPACK_TABLE_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_TABLE_H */ diff --git a/src/core/transport/chttp2/http2_errors.h b/src/core/transport/chttp2/http2_errors.h index 1eecd17540..4ab2ec0220 100644 --- a/src/core/transport/chttp2/http2_errors.h +++ b/src/core/transport/chttp2/http2_errors.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_HTTP2_ERRORS_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_HTTP2_ERRORS_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H /* error codes for RST_STREAM from http2 draft 14 section 7 */ typedef enum { @@ -53,4 +53,4 @@ typedef enum { GRPC_CHTTP2__ERROR_DO_NOT_USE = -1 } grpc_chttp2_error_code; -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HTTP2_ERRORS_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H */ diff --git a/src/core/transport/chttp2/huffsyms.h b/src/core/transport/chttp2/huffsyms.h index 131c4acbeb..f9c1447966 100644 --- a/src/core/transport/chttp2/huffsyms.h +++ b/src/core/transport/chttp2/huffsyms.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_HUFFSYMS_H_ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_HUFFSYMS_H_ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HUFFSYMS_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HUFFSYMS_H /* HPACK static huffman table */ @@ -45,4 +45,4 @@ typedef struct { extern const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS]; -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_HUFFSYMS_H_ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HUFFSYMS_H */ diff --git a/src/core/transport/chttp2/status_conversion.h b/src/core/transport/chttp2/status_conversion.h index 8e2672008c..cf06c3576e 100644 --- a/src/core/transport/chttp2/status_conversion.h +++ b/src/core/transport/chttp2/status_conversion.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_STATUS_CONVERSION_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_STATUS_CONVERSION_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STATUS_CONVERSION_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STATUS_CONVERSION_H #include <grpc/grpc.h> #include "src/core/transport/chttp2/http2_errors.h" @@ -47,4 +47,4 @@ grpc_status_code grpc_chttp2_http2_error_to_grpc_status( grpc_status_code grpc_chttp2_http2_status_to_grpc_status(int status); int grpc_chttp2_grpc_status_to_http2_status(grpc_status_code status); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_STATUS_CONVERSION_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STATUS_CONVERSION_H */ diff --git a/src/core/transport/chttp2/stream_encoder.h b/src/core/transport/chttp2/stream_encoder.h index a99d61a553..50c58ad5ca 100644 --- a/src/core/transport/chttp2/stream_encoder.h +++ b/src/core/transport/chttp2/stream_encoder.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_ENCODER_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_ENCODER_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_ENCODER_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_ENCODER_H #include "src/core/transport/chttp2/frame.h" #include "src/core/transport/metadata.h" @@ -90,4 +90,4 @@ void grpc_chttp2_encode(grpc_stream_op *ops, size_t ops_count, int eof, grpc_chttp2_hpack_compressor *compressor, gpr_slice_buffer *output); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_ENCODER_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_ENCODER_H */ diff --git a/src/core/transport/chttp2/stream_map.h b/src/core/transport/chttp2/stream_map.h index 3fb91fc88f..d338d2f892 100644 --- a/src/core/transport/chttp2/stream_map.h +++ b/src/core/transport/chttp2/stream_map.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_MAP_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_MAP_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_MAP_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_MAP_H #include <grpc/support/port_platform.h> @@ -78,4 +78,4 @@ void grpc_chttp2_stream_map_for_each(grpc_chttp2_stream_map *map, void *value), void *user_data); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_STREAM_MAP_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_MAP_H */ diff --git a/src/core/transport/chttp2/timeout_encoding.h b/src/core/transport/chttp2/timeout_encoding.h index 2bef8ba67f..e6664c6262 100644 --- a/src/core/transport/chttp2/timeout_encoding.h +++ b/src/core/transport/chttp2/timeout_encoding.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H_ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H_ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H #include "src/core/support/string.h" #include <grpc/support/time.h> @@ -44,4 +44,4 @@ void grpc_chttp2_encode_timeout(gpr_timespec timeout, char *buffer); int grpc_chttp2_decode_timeout(const char *buffer, gpr_timespec *timeout); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H_ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H */ diff --git a/src/core/transport/chttp2/varint.h b/src/core/transport/chttp2/varint.h index 8c353c66a7..ee04ed7fb2 100644 --- a/src/core/transport/chttp2/varint.h +++ b/src/core/transport/chttp2/varint.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_VARINT_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_VARINT_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_VARINT_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_VARINT_H #include <grpc/support/port_platform.h> @@ -71,4 +71,4 @@ void grpc_chttp2_hpack_write_varint_tail(gpr_uint32 tail_value, } \ } while (0) -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_VARINT_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_VARINT_H */ diff --git a/src/core/transport/chttp2_transport.h b/src/core/transport/chttp2_transport.h index 6fbc5961a1..c5b65bd4f7 100644 --- a/src/core/transport/chttp2_transport.h +++ b/src/core/transport/chttp2_transport.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_CHTTP2_TRANSPORT_H__ -#define __GRPC_INTERNAL_TRANSPORT_CHTTP2_TRANSPORT_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TRANSPORT_H +#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TRANSPORT_H #include "src/core/iomgr/endpoint.h" #include "src/core/transport/transport.h" @@ -44,4 +44,4 @@ void grpc_create_chttp2_transport(grpc_transport_setup_callback setup, size_t nslices, grpc_mdctx *metadata_context, int is_client); -#endif /* __GRPC_INTERNAL_TRANSPORT_CHTTP2_TRANSPORT_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TRANSPORT_H */ diff --git a/src/core/transport/metadata.h b/src/core/transport/metadata.h index 7a56e34690..b8afbeb1e3 100644 --- a/src/core/transport/metadata.h +++ b/src/core/transport/metadata.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_METADATA_H__ -#define __GRPC_INTERNAL_TRANSPORT_METADATA_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_METADATA_H +#define GRPC_INTERNAL_CORE_TRANSPORT_METADATA_H #include <grpc/support/slice.h> #include <grpc/support/useful.h> @@ -137,4 +137,4 @@ const char *grpc_mdstr_as_c_string(grpc_mdstr *s); #define GRPC_MDSTR_KV_HASH(k_hash, v_hash) (GPR_ROTL((k_hash), 2) ^ (v_hash)) -#endif /* __GRPC_INTERNAL_TRANSPORT_METADATA_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_METADATA_H */ diff --git a/src/core/transport/stream_op.h b/src/core/transport/stream_op.h index 828a7f7226..2ffbcce87b 100644 --- a/src/core/transport/stream_op.h +++ b/src/core/transport/stream_op.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_STREAM_OP_H__ -#define __GRPC_INTERNAL_TRANSPORT_STREAM_OP_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_STREAM_OP_H +#define GRPC_INTERNAL_CORE_TRANSPORT_STREAM_OP_H #include <grpc/grpc.h> #include <grpc/support/port_platform.h> @@ -131,4 +131,4 @@ void grpc_sopb_add_flow_ctl_cb(grpc_stream_op_buffer *sopb, void grpc_sopb_append(grpc_stream_op_buffer *sopb, grpc_stream_op *ops, size_t nops); -#endif /* __GRPC_INTERNAL_TRANSPORT_STREAM_OP_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_STREAM_OP_H */ diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index 60193b1844..ce8c17c322 100644 --- a/src/core/transport/transport.h +++ b/src/core/transport/transport.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_TRANSPORT_H__ -#define __GRPC_INTERNAL_TRANSPORT_TRANSPORT_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_H +#define GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_H #include <stddef.h> @@ -254,4 +254,4 @@ void grpc_transport_setup_initiate(grpc_transport_setup *setup); used as a destruction call by setup). */ void grpc_transport_setup_cancel(grpc_transport_setup *setup); -#endif /* __GRPC_INTERNAL_TRANSPORT_TRANSPORT_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_H */ diff --git a/src/core/transport/transport_impl.h b/src/core/transport/transport_impl.h index d1e0b1920e..ac275c7560 100644 --- a/src/core/transport/transport_impl.h +++ b/src/core/transport/transport_impl.h @@ -31,8 +31,8 @@ * */ -#ifndef __GRPC_INTERNAL_TRANSPORT_TRANSPORT_IMPL_H__ -#define __GRPC_INTERNAL_TRANSPORT_TRANSPORT_IMPL_H__ +#ifndef GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_IMPL_H +#define GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_IMPL_H #include "src/core/transport/transport.h" @@ -84,4 +84,4 @@ struct grpc_transport { const grpc_transport_vtable *vtable; }; -#endif /* __GRPC_INTERNAL_TRANSPORT_TRANSPORT_IMPL_H__ */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_IMPL_H */ diff --git a/src/core/tsi/fake_transport_security.c b/src/core/tsi/fake_transport_security.c index e8af200284..f58f04ea20 100644 --- a/src/core/tsi/fake_transport_security.c +++ b/src/core/tsi/fake_transport_security.c @@ -392,8 +392,10 @@ static tsi_result fake_handshaker_get_bytes_to_send_to_peer( if (next_message_to_send > TSI_FAKE_HANDSHAKE_MESSAGE_MAX) { next_message_to_send = TSI_FAKE_HANDSHAKE_MESSAGE_MAX; } - gpr_log(GPR_INFO, "%s prepared %s.", impl->is_client ? "Client" : "Server", - tsi_fake_handshake_message_to_string(impl->next_message_to_send)); + if (tsi_tracing_enabled) { + gpr_log(GPR_INFO, "%s prepared %s.", impl->is_client ? "Client" : "Server", + tsi_fake_handshake_message_to_string(impl->next_message_to_send)); + } impl->next_message_to_send = next_message_to_send; } result = drain_frame_to_bytes(bytes, bytes_size, &impl->outgoing); @@ -401,7 +403,9 @@ static tsi_result fake_handshaker_get_bytes_to_send_to_peer( if (!impl->is_client && impl->next_message_to_send == TSI_FAKE_HANDSHAKE_MESSAGE_MAX) { /* We're done. */ - gpr_log(GPR_INFO, "Server is done."); + if (tsi_tracing_enabled) { + gpr_log(GPR_INFO, "Server is done."); + } impl->result = TSI_OK; } else { impl->needs_incoming_message = 1; @@ -436,13 +440,17 @@ static tsi_result fake_handshaker_process_bytes_from_peer( tsi_fake_handshake_message_to_string(received_msg), tsi_fake_handshake_message_to_string(expected_msg)); } - gpr_log(GPR_INFO, "%s received %s.", impl->is_client ? "Client" : "Server", - tsi_fake_handshake_message_to_string(received_msg)); + if (tsi_tracing_enabled) { + gpr_log(GPR_INFO, "%s received %s.", impl->is_client ? "Client" : "Server", + tsi_fake_handshake_message_to_string(received_msg)); + } tsi_fake_frame_reset(&impl->incoming, 0 /* needs_draining */); impl->needs_incoming_message = 0; if (impl->next_message_to_send == TSI_FAKE_HANDSHAKE_MESSAGE_MAX) { /* We're done. */ - gpr_log(GPR_INFO, "%s is done.", impl->is_client ? "Client" : "Server"); + if (tsi_tracing_enabled) { + gpr_log(GPR_INFO, "%s is done.", impl->is_client ? "Client" : "Server"); + } impl->result = TSI_OK; } return TSI_OK; diff --git a/src/core/tsi/fake_transport_security.h b/src/core/tsi/fake_transport_security.h index 36e62bce3d..af9730b90e 100644 --- a/src/core/tsi/fake_transport_security.h +++ b/src/core/tsi/fake_transport_security.h @@ -31,8 +31,8 @@ * */ -#ifndef __FAKE_TRANSPORT_SECURITY_H_ -#define __FAKE_TRANSPORT_SECURITY_H_ +#ifndef GRPC_INTERNAL_CORE_TSI_FAKE_TRANSPORT_SECURITY_H +#define GRPC_INTERNAL_CORE_TSI_FAKE_TRANSPORT_SECURITY_H #include "src/core/tsi/transport_security_interface.h" @@ -58,4 +58,4 @@ tsi_frame_protector* tsi_create_fake_protector( } #endif -#endif /* __FAKE_TRANSPORT_SECURITY_H_ */ +#endif /* GRPC_INTERNAL_CORE_TSI_FAKE_TRANSPORT_SECURITY_H */ diff --git a/src/core/tsi/ssl_transport_security.c b/src/core/tsi/ssl_transport_security.c index 8446cc4fdc..dc43f7e270 100644 --- a/src/core/tsi/ssl_transport_security.c +++ b/src/core/tsi/ssl_transport_security.c @@ -162,7 +162,7 @@ static const char* ssl_error_string(int error) { /* TODO(jboeuf): Remove when we are past the debugging phase with this code. */ static void ssl_log_where_info(const SSL* ssl, int where, int flag, const char* msg) { - if (where & flag) { + if ((where & flag) && tsi_tracing_enabled) { gpr_log(GPR_INFO, "%20.20s - %30.30s - %5.10s", msg, SSL_state_string_long(ssl), SSL_state_string(ssl)); } diff --git a/src/core/tsi/ssl_transport_security.h b/src/core/tsi/ssl_transport_security.h index eecf2d7c2d..192f7acf0e 100644 --- a/src/core/tsi/ssl_transport_security.h +++ b/src/core/tsi/ssl_transport_security.h @@ -31,8 +31,8 @@ * */ -#ifndef __SSL_TRANSPORT_SECURITY_H_ -#define __SSL_TRANSPORT_SECURITY_H_ +#ifndef GRPC_INTERNAL_CORE_TSI_SSL_TRANSPORT_SECURITY_H +#define GRPC_INTERNAL_CORE_TSI_SSL_TRANSPORT_SECURITY_H #include "src/core/tsi/transport_security_interface.h" @@ -170,4 +170,4 @@ int tsi_ssl_peer_matches_name(const tsi_peer* peer, const char* name); } #endif -#endif /* __SSL_TRANSPORT_SECURITY_H_ */ +#endif /* GRPC_INTERNAL_CORE_TSI_SSL_TRANSPORT_SECURITY_H */ diff --git a/src/core/tsi/transport_security.c b/src/core/tsi/transport_security.c index aeb9b3fc17..04b30004fc 100644 --- a/src/core/tsi/transport_security.c +++ b/src/core/tsi/transport_security.c @@ -36,6 +36,14 @@ #include <stdlib.h> #include <string.h> +/* --- Tracing. --- */ + +int tsi_tracing_enabled = 0; + +void tsi_enable_tracing() { + tsi_tracing_enabled = 1; +} + /* --- Utils. --- */ char* tsi_strdup(const char* src) { diff --git a/src/core/tsi/transport_security.h b/src/core/tsi/transport_security.h index 432da07346..59e5dcff9a 100644 --- a/src/core/tsi/transport_security.h +++ b/src/core/tsi/transport_security.h @@ -31,8 +31,8 @@ * */ -#ifndef __TRANSPORT_SECURITY_H_ -#define __TRANSPORT_SECURITY_H_ +#ifndef GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_H +#define GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_H #include "src/core/tsi/transport_security_interface.h" @@ -40,6 +40,8 @@ extern "C" { #endif +extern int tsi_tracing_enabled; + /* Base for tsi_frame_protector implementations. See transport_security_interface.h for documentation. */ typedef struct { @@ -115,4 +117,4 @@ char* tsi_strdup(const char* src); /* Sadly, no strdup in C89. */ } #endif -#endif /* __TRANSPORT_SECURITY_H_ */ +#endif /* GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_H */ diff --git a/src/core/tsi/transport_security_interface.h b/src/core/tsi/transport_security_interface.h index 90e119ca8e..33a19bef0d 100644 --- a/src/core/tsi/transport_security_interface.h +++ b/src/core/tsi/transport_security_interface.h @@ -31,8 +31,8 @@ * */ -#ifndef __TRANSPORT_SECURITY_INTERFACE_H_ -#define __TRANSPORT_SECURITY_INTERFACE_H_ +#ifndef GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H +#define GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H #include <stdint.h> #include <stdlib.h> @@ -61,6 +61,11 @@ typedef enum { const char* tsi_result_to_string(tsi_result result); +/* --- tsi tracing --- */ + +/* Call this function before any other tsi function to avoid races. */ +void tsi_enable_tracing(void); + /* --- tsi_frame_protector object --- This object protects and unprotects buffers once the handshake is done. @@ -361,4 +366,4 @@ void tsi_handshaker_destroy(tsi_handshaker* self); } #endif -#endif /* __TRANSPORT_SECURITY_INTERFACE_H_ */ +#endif /* GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H */ |