Merge remote-tracking branch 'upstream/master' into pubsub

pull/882/head
Yang Gao 10 years ago
commit 91cc48160a
  1. 25
      .travis.yml
  2. 238
      Makefile
  3. 50
      build.json
  4. 6
      examples/pubsub/publisher.h
  5. 6
      examples/pubsub/subscriber.h
  6. 6
      include/grpc++/async_unary_call.h
  7. 6
      include/grpc++/channel_arguments.h
  8. 6
      include/grpc++/channel_interface.h
  9. 6
      include/grpc++/client_context.h
  10. 6
      include/grpc++/completion_queue.h
  11. 6
      include/grpc++/config.h
  12. 6
      include/grpc++/create_channel.h
  13. 6
      include/grpc++/credentials.h
  14. 6
      include/grpc++/impl/call.h
  15. 6
      include/grpc++/impl/client_unary_call.h
  16. 6
      include/grpc++/impl/internal_stub.h
  17. 6
      include/grpc++/impl/rpc_method.h
  18. 6
      include/grpc++/impl/rpc_service_method.h
  19. 6
      include/grpc++/impl/service_type.h
  20. 6
      include/grpc++/server.h
  21. 6
      include/grpc++/server_builder.h
  22. 6
      include/grpc++/server_context.h
  23. 6
      include/grpc++/server_credentials.h
  24. 6
      include/grpc++/status.h
  25. 79
      include/grpc++/status_code_enum.h
  26. 6
      include/grpc++/stream.h
  27. 6
      include/grpc++/thread_pool_interface.h
  28. 6
      include/grpc/byte_buffer.h
  29. 6
      include/grpc/byte_buffer_reader.h
  30. 6
      include/grpc/grpc.h
  31. 6
      include/grpc/grpc_http.h
  32. 6
      include/grpc/grpc_security.h
  33. 79
      include/grpc/status.h
  34. 6
      include/grpc/support/alloc.h
  35. 6
      include/grpc/support/atm.h
  36. 6
      include/grpc/support/atm_gcc_atomic.h
  37. 6
      include/grpc/support/atm_gcc_sync.h
  38. 6
      include/grpc/support/atm_win32.h
  39. 6
      include/grpc/support/cancellable_platform.h
  40. 6
      include/grpc/support/cmdline.h
  41. 6
      include/grpc/support/cpu.h
  42. 6
      include/grpc/support/histogram.h
  43. 6
      include/grpc/support/host_port.h
  44. 6
      include/grpc/support/log.h
  45. 6
      include/grpc/support/log_win32.h
  46. 6
      include/grpc/support/port_platform.h
  47. 6
      include/grpc/support/slice.h
  48. 6
      include/grpc/support/slice_buffer.h
  49. 6
      include/grpc/support/sync.h
  50. 6
      include/grpc/support/sync_generic.h
  51. 6
      include/grpc/support/sync_posix.h
  52. 6
      include/grpc/support/sync_win32.h
  53. 6
      include/grpc/support/thd.h
  54. 6
      include/grpc/support/time.h
  55. 6
      include/grpc/support/useful.h
  56. 16
      src/compiler/cpp_generator.cc
  57. 6
      src/compiler/cpp_generator.h
  58. 6
      src/compiler/cpp_generator_helpers.h
  59. 6
      src/compiler/generator_helpers.h
  60. 204
      src/compiler/python_generator.cc
  61. 6
      src/compiler/python_generator.h
  62. 6
      src/compiler/ruby_generator.h
  63. 6
      src/compiler/ruby_generator_helpers-inl.h
  64. 6
      src/compiler/ruby_generator_map-inl.h
  65. 6
      src/compiler/ruby_generator_string-inl.h
  66. 6
      src/core/channel/census_filter.h
  67. 6
      src/core/channel/channel_args.h
  68. 2
      src/core/channel/channel_stack.c
  69. 10
      src/core/channel/channel_stack.h
  70. 6
      src/core/channel/child_channel.h
  71. 6
      src/core/channel/client_channel.h
  72. 6
      src/core/channel/client_setup.h
  73. 4
      src/core/channel/connected_channel.c
  74. 6
      src/core/channel/connected_channel.h
  75. 6
      src/core/channel/http_client_filter.h
  76. 6
      src/core/channel/http_filter.h
  77. 6
      src/core/channel/http_server_filter.h
  78. 6
      src/core/channel/metadata_buffer.h
  79. 6
      src/core/channel/noop_filter.h
  80. 6
      src/core/compression/algorithm.h
  81. 6
      src/core/compression/message_compress.h
  82. 65
      src/core/debug/trace.c
  83. 29
      src/core/debug/trace.h
  84. 6
      src/core/httpcli/format_request.h
  85. 6
      src/core/httpcli/httpcli.h
  86. 6
      src/core/httpcli/httpcli_security_context.h
  87. 6
      src/core/httpcli/parser.h
  88. 6
      src/core/iomgr/alarm.h
  89. 6
      src/core/iomgr/alarm_heap.h
  90. 6
      src/core/iomgr/alarm_internal.h
  91. 6
      src/core/iomgr/endpoint.h
  92. 6
      src/core/iomgr/endpoint_pair.h
  93. 6
      src/core/iomgr/fd_posix.h
  94. 6
      src/core/iomgr/iocp_windows.h
  95. 6
      src/core/iomgr/iomgr.h
  96. 6
      src/core/iomgr/iomgr_internal.h
  97. 3
      src/core/iomgr/iomgr_posix.c
  98. 6
      src/core/iomgr/iomgr_posix.h
  99. 6
      src/core/iomgr/pollset.h
  100. 6
      src/core/iomgr/pollset_kick.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,14 +1,23 @@
language: cpp
before_install:
- sudo add-apt-repository ppa:yjwong/gflags -y
- sudo add-apt-repository ppa:h-rayflood/llvm -y
- sudo apt-get update -qq
- sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv
- sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv clang-3.5
env:
global:
- RUBY_VERSION=2.1
matrix:
- CONFIG=dbg TEST=c
- CONFIG=dbg TEST=c++
- CONFIG=opt TEST=c
- CONFIG=opt TEST=c++
- CONFIG=opt TEST=node
- CONFIG=opt TEST=ruby
- CONFIG=opt TEST=python
script:
- ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0
- ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0
- make clean
- ./tools/run_tests/run_tests.py -l c -t -j 16 -c opt -s 2.0
- ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt -s 2.0
- ./tools/run_tests/run_tests.py -l node -t -j 16 -c opt
- rvm use $RUBY_VERSION
- gem install bundler
- ./tools/run_tests/run_tests.py -l $TEST -t -j 16 -c $CONFIG -s 4.0
notifications:
email: false
email: false

File diff suppressed because one or more lines are too long

@ -79,6 +79,7 @@
"src/core/surface/client.h",
"src/core/surface/completion_queue.h",
"src/core/surface/event_string.h",
"src/core/surface/init.h",
"src/core/surface/lame_client.h",
"src/core/surface/server.h",
"src/core/surface/surface_trace.h",
@ -180,6 +181,7 @@
"src/core/surface/server.c",
"src/core/surface/server_chttp2.c",
"src/core/surface/server_create.c",
"src/core/surface/surface_trace.c",
"src/core/transport/chttp2/alpn.c",
"src/core/transport/chttp2/bin_encoder.c",
"src/core/transport/chttp2/frame_data.c",
@ -329,6 +331,7 @@
"src/core/security/secure_transport_setup.c",
"src/core/security/security_context.c",
"src/core/security/server_secure_chttp2.c",
"src/core/surface/init_secure.c",
"src/core/surface/secure_channel_create.c",
"src/core/surface/secure_server_create.c",
"src/core/tsi/fake_transport_security.c",
@ -372,6 +375,9 @@
"name": "grpc_unsecure",
"build": "all",
"language": "c",
"src": [
"src/core/surface/init_unsecure.c"
],
"deps": [
"gpr"
],
@ -572,6 +578,7 @@
},
{
"name": "census_statistics_multiple_writers_circular_buffer_test",
"flaky": true,
"build": "test",
"language": "c",
"src": [
@ -628,6 +635,7 @@
},
{
"name": "census_statistics_small_log_test",
"flaky": true,
"build": "test",
"language": "c",
"src": [
@ -866,8 +874,7 @@
"grpc",
"gpr_test_util",
"gpr"
],
"flaky": true
]
},
{
"name": "fling_test",
@ -881,8 +888,7 @@
"grpc",
"gpr_test_util",
"gpr"
],
"flaky": true
]
},
{
"name": "gen_hpack_tables",
@ -1816,6 +1822,24 @@
"gpr"
]
},
{
"name": "qps_client_async",
"build": "test",
"run": false,
"language": "c++",
"src": [
"test/cpp/qps/qpstest.proto",
"test/cpp/qps/client_async.cc"
],
"deps": [
"grpc++_test_util",
"grpc_test_util",
"grpc++",
"grpc",
"gpr_test_util",
"gpr"
]
},
{
"name": "qps_server",
"build": "test",
@ -1834,6 +1858,24 @@
"gpr"
]
},
{
"name": "qps_server_async",
"build": "test",
"run": false,
"language": "c++",
"src": [
"test/cpp/qps/qpstest.proto",
"test/cpp/qps/server_async.cc"
],
"deps": [
"grpc++_test_util",
"grpc_test_util",
"grpc++",
"grpc",
"gpr_test_util",
"gpr"
]
},
{
"name": "status_test",
"build": "test",

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_EXAMPLES_PUBSUB_PUBLISHER_H_
#define __GRPCPP_EXAMPLES_PUBSUB_PUBLISHER_H_
#ifndef GRPC_EXAMPLES_PUBSUB_PUBLISHER_H
#define GRPC_EXAMPLES_PUBSUB_PUBLISHER_H
#include <grpc++/channel_interface.h>
#include <grpc++/status.h>
@ -64,4 +64,4 @@ class Publisher {
} // namespace examples
} // namespace grpc
#endif // __GRPCPP_EXAMPLES_PUBSUB_PUBLISHER_H_
#endif // GRPC_EXAMPLES_PUBSUB_PUBLISHER_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_EXAMPLES_PUBSUB_SUBSCRIBER_H_
#define __GRPCPP_EXAMPLES_PUBSUB_SUBSCRIBER_H_
#ifndef GRPC_EXAMPLES_PUBSUB_SUBSCRIBER_H
#define GRPC_EXAMPLES_PUBSUB_SUBSCRIBER_H
#include <grpc++/channel_interface.h>
#include <grpc++/status.h>
@ -65,4 +65,4 @@ class Subscriber {
} // namespace examples
} // namespace grpc
#endif // __GRPCPP_EXAMPLES_PUBSUB_SUBSCRIBER_H_
#endif // GRPC_EXAMPLES_PUBSUB_SUBSCRIBER_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_ASYNC_UNARY_CALL_H__
#define __GRPCPP_ASYNC_UNARY_CALL_H__
#ifndef GRPCXX_ASYNC_UNARY_CALL_H
#define GRPCXX_ASYNC_UNARY_CALL_H
#include <grpc++/channel_interface.h>
#include <grpc++/client_context.h>
@ -138,4 +138,4 @@ class ServerAsyncResponseWriter GRPC_FINAL
} // namespace grpc
#endif // __GRPCPP_ASYNC_UNARY_CALL_H__
#endif // GRPCXX_ASYNC_UNARY_CALL_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_CHANNEL_ARGUMENTS_H_
#define __GRPCPP_CHANNEL_ARGUMENTS_H_
#ifndef GRPCXX_CHANNEL_ARGUMENTS_H
#define GRPCXX_CHANNEL_ARGUMENTS_H
#include <vector>
#include <list>
@ -82,4 +82,4 @@ class ChannelArguments {
} // namespace grpc
#endif // __GRPCPP_CHANNEL_ARGUMENTS_H_
#endif // GRPCXX_CHANNEL_ARGUMENTS_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_CHANNEL_INTERFACE_H__
#define __GRPCPP_CHANNEL_INTERFACE_H__
#ifndef GRPCXX_CHANNEL_INTERFACE_H
#define GRPCXX_CHANNEL_INTERFACE_H
#include <grpc++/status.h>
#include <grpc++/impl/call.h>
@ -63,4 +63,4 @@ class ChannelInterface : public CallHook {
} // namespace grpc
#endif // __GRPCPP_CHANNEL_INTERFACE_H__
#endif // GRPCXX_CHANNEL_INTERFACE_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_CLIENT_CONTEXT_H__
#define __GRPCPP_CLIENT_CONTEXT_H__
#ifndef GRPCXX_CLIENT_CONTEXT_H
#define GRPCXX_CLIENT_CONTEXT_H
#include <chrono>
#include <map>
@ -151,4 +151,4 @@ class ClientContext {
} // namespace grpc
#endif // __GRPCPP_CLIENT_CONTEXT_H__
#endif // GRPCXX_CLIENT_CONTEXT_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_COMPLETION_QUEUE_H__
#define __GRPCPP_COMPLETION_QUEUE_H__
#ifndef GRPCXX_COMPLETION_QUEUE_H
#define GRPCXX_COMPLETION_QUEUE_H
#include <grpc++/impl/client_unary_call.h>
@ -121,4 +121,4 @@ class CompletionQueue {
} // namespace grpc
#endif // __GRPCPP_COMPLETION_QUEUE_H__
#endif // GRPCXX_COMPLETION_QUEUE_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_CONFIG_H__
#define __GRPCPP_CONFIG_H__
#ifndef GRPCXX_CONFIG_H
#define GRPCXX_CONFIG_H
#include <string>
@ -50,4 +50,4 @@ typedef std::string string;
} // namespace grpc
#endif // __GRPCPP_CONFIG_H__
#endif // GRPCXX_CONFIG_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_CREATE_CHANNEL_H__
#define __GRPCPP_CREATE_CHANNEL_H__
#ifndef GRPCXX_CREATE_CHANNEL_H
#define GRPCXX_CREATE_CHANNEL_H
#include <memory>
@ -55,4 +55,4 @@ std::shared_ptr<ChannelInterface> CreateChannel(
} // namespace grpc
#endif // __GRPCPP_CREATE_CHANNEL_H__
#endif // GRPCXX_CREATE_CHANNEL_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_CREDENTIALS_H_
#define __GRPCPP_CREDENTIALS_H_
#ifndef GRPCXX_CREDENTIALS_H
#define GRPCXX_CREDENTIALS_H
#include <chrono>
#include <memory>
@ -133,4 +133,4 @@ class CredentialsFactory {
} // namespace grpc
#endif // __GRPCPP_CREDENTIALS_H_
#endif // GRPCXX_CREDENTIALS_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_CALL_H__
#define __GRPCPP_CALL_H__
#ifndef GRPCXX_IMPL_CALL_H
#define GRPCXX_IMPL_CALL_H
#include <grpc/grpc.h>
#include <grpc++/config.h>
@ -143,4 +143,4 @@ class Call GRPC_FINAL {
} // namespace grpc
#endif // __GRPCPP_CALL_INTERFACE_H__
#endif // GRPCXX_IMPL_CALL_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_CLIENT_UNARY_CALL_H__
#define __GRPCPP_CLIENT_UNARY_CALL_H__
#ifndef GRPCXX_IMPL_CLIENT_UNARY_CALL_H
#define GRPCXX_IMPL_CLIENT_UNARY_CALL_H
namespace google {
namespace protobuf {
@ -56,4 +56,4 @@ Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method,
} // namespace grpc
#endif
#endif // GRPCXX_IMPL_CLIENT_UNARY_CALL_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_IMPL_INTERNAL_STUB_H__
#define __GRPCPP_IMPL_INTERNAL_STUB_H__
#ifndef GRPCXX_IMPL_INTERNAL_STUB_H
#define GRPCXX_IMPL_INTERNAL_STUB_H
#include <memory>
@ -57,4 +57,4 @@ class InternalStub {
} // namespace grpc
#endif // __GRPCPP_IMPL_INTERNAL_STUB_H__
#endif // GRPCXX_IMPL_INTERNAL_STUB_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_IMPL_RPC_METHOD_H__
#define __GRPCPP_IMPL_RPC_METHOD_H__
#ifndef GRPCXX_IMPL_RPC_METHOD_H
#define GRPCXX_IMPL_RPC_METHOD_H
namespace google {
namespace protobuf {
@ -66,4 +66,4 @@ class RpcMethod {
} // namespace grpc
#endif // __GRPCPP_IMPL_RPC_METHOD_H__
#endif // GRPCXX_IMPL_RPC_METHOD_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_IMPL_RPC_SERVICE_METHOD_H__
#define __GRPCPP_IMPL_RPC_SERVICE_METHOD_H__
#ifndef GRPCXX_IMPL_RPC_SERVICE_METHOD_H
#define GRPCXX_IMPL_RPC_SERVICE_METHOD_H
#include <functional>
#include <map>
@ -203,4 +203,4 @@ class RpcService {
} // namespace grpc
#endif // __GRPCPP_IMPL_RPC_SERVICE_METHOD_H__
#endif // GRPCXX_IMPL_RPC_SERVICE_METHOD_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_IMPL_SERVICE_TYPE_H__
#define __GRPCPP_IMPL_SERVICE_TYPE_H__
#ifndef GRPCXX_IMPL_SERVICE_TYPE_H
#define GRPCXX_IMPL_SERVICE_TYPE_H
namespace google {
namespace protobuf {
@ -128,4 +128,4 @@ class AsynchronousService {
} // namespace grpc
#endif // __GRPCPP_IMPL_SERVICE_TYPE_H__
#endif // GRPCXX_IMPL_SERVICE_TYPE_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_SERVER_H__
#define __GRPCPP_SERVER_H__
#ifndef GRPCXX_SERVER_H
#define GRPCXX_SERVER_H
#include <condition_variable>
#include <list>
@ -130,4 +130,4 @@ class Server GRPC_FINAL : private CallHook,
} // namespace grpc
#endif // __GRPCPP_SERVER_H__
#endif // GRPCXX_SERVER_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_SERVER_BUILDER_H__
#define __GRPCPP_SERVER_BUILDER_H__
#ifndef GRPCXX_SERVER_BUILDER_H
#define GRPCXX_SERVER_BUILDER_H
#include <memory>
#include <vector>
@ -88,4 +88,4 @@ class ServerBuilder {
} // namespace grpc
#endif // __GRPCPP_SERVER_BUILDER_H__
#endif // GRPCXX_SERVER_BUILDER_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_SERVER_CONTEXT_H_
#define __GRPCPP_SERVER_CONTEXT_H_
#ifndef GRPCXX_SERVER_CONTEXT_H
#define GRPCXX_SERVER_CONTEXT_H
#include <chrono>
#include <map>
@ -121,4 +121,4 @@ class ServerContext GRPC_FINAL {
} // namespace grpc
#endif // __GRPCPP_SERVER_CONTEXT_H_
#endif // GRPCXX_SERVER_CONTEXT_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_SERVER_CREDENTIALS_H_
#define __GRPCPP_SERVER_CREDENTIALS_H_
#ifndef GRPCXX_SERVER_CREDENTIALS_H
#define GRPCXX_SERVER_CREDENTIALS_H
#include <memory>
#include <vector>
@ -79,4 +79,4 @@ class ServerCredentialsFactory {
} // namespace grpc
#endif // __GRPCPP_SERVER_CREDENTIALS_H_
#endif // GRPCXX_SERVER_CREDENTIALS_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_STATUS_H__
#define __GRPCPP_STATUS_H__
#ifndef GRPCXX_STATUS_H
#define GRPCXX_STATUS_H
#include <grpc++/status_code_enum.h>
#include <grpc++/config.h>
@ -62,4 +62,4 @@ class Status {
} // namespace grpc
#endif // __GRPCPP_STATUS_H__
#endif // GRPCXX_STATUS_H

@ -31,57 +31,43 @@
*
*/
#ifndef __GRPCPP_STATUS_CODE_ENUM_H__
#define __GRPCPP_STATUS_CODE_ENUM_H__
#ifndef GRPCXX_STATUS_CODE_ENUM_H
#define GRPCXX_STATUS_CODE_ENUM_H
namespace grpc {
enum StatusCode {
/* Not an error; returned on success
HTTP Mapping: 200 OK */
/* Not an error; returned on success */
OK = 0,
/* The operation was cancelled (typically by the caller).
HTTP Mapping: 499 Client Closed Request */
/* The operation was cancelled (typically by the caller). */
CANCELLED = 1,
/* Unknown error. An example of where this error may be returned is
if a Status value received from another address space belongs to
an error-space that is not known in this address space. Also
errors raised by APIs that do not return enough error information
may be converted to this error.
HTTP Mapping: 500 Internal Server Error */
may be converted to this error. */
UNKNOWN = 2,
/* Client specified an invalid argument. Note that this differs
from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments
that are problematic regardless of the state of the system
(e.g., a malformed file name).
HTTP Mapping: 400 Bad Request */
(e.g., a malformed file name). */
INVALID_ARGUMENT = 3,
/* Deadline expired before operation could complete. For operations
that change the state of the system, this error may be returned
even if the operation has completed successfully. For example, a
successful response from a server could have been delayed long
enough for the deadline to expire.
HTTP Mapping: 504 Gateway Timeout */
enough for the deadline to expire. */
DEADLINE_EXCEEDED = 4,
/* Some requested entity (e.g., file or directory) was not found.
HTTP Mapping: 404 Not Found */
/* Some requested entity (e.g., file or directory) was not found. */
NOT_FOUND = 5,
/* Some entity that we attempted to create (e.g., file or directory)
already exists.
HTTP Mapping: 409 Conflict */
already exists. */
ALREADY_EXISTS = 6,
/* The caller does not have permission to execute the specified
@ -89,21 +75,15 @@ enum StatusCode {
caused by exhausting some resource (use RESOURCE_EXHAUSTED
instead for those errors). PERMISSION_DENIED must not be
used if the caller can not be identified (use UNAUTHENTICATED
instead for those errors).
HTTP Mapping: 403 Forbidden */
instead for those errors). */
PERMISSION_DENIED = 7,
/* The request does not have valid authentication credentials for the
operation.
HTTP Mapping: 401 Unauthorized */
operation. */
UNAUTHENTICATED = 16,
/* Some resource has been exhausted, perhaps a per-user quota, or
perhaps the entire file system is out of space.
HTTP Mapping: 429 Too Many Requests */
perhaps the entire file system is out of space. */
RESOURCE_EXHAUSTED = 8,
/* Operation was rejected because the system is not in a state
@ -124,23 +104,14 @@ enum StatusCode {
(d) Use FAILED_PRECONDITION if the client performs conditional
REST Get/Update/Delete on a resource and the resource on the
server does not match the condition. E.g., conflicting
read-modify-write on the same resource.
HTTP Mapping: 400 Bad Request
NOTE: HTTP spec says 412 Precondition Failed should only be used if
the request contains Etag related headers. So if the server does see
Etag related headers in the request, it may choose to return 412
instead of 400 for this error code. */
read-modify-write on the same resource. */
FAILED_PRECONDITION = 9,
/* The operation was aborted, typically due to a concurrency issue
like sequencer check failures, transaction aborts, etc.
See litmus test above for deciding between FAILED_PRECONDITION,
ABORTED, and UNAVAILABLE.
HTTP Mapping: 409 Conflict */
ABORTED, and UNAVAILABLE. */
ABORTED = 10,
/* Operation was attempted past the valid range. E.g., seeking or
@ -157,21 +128,15 @@ enum StatusCode {
OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific
error) when it applies so that callers who are iterating through
a space can easily look for an OUT_OF_RANGE error to detect when
they are done.
HTTP Mapping: 400 Bad Request */
they are done. */
OUT_OF_RANGE = 11,
/* Operation is not implemented or not supported/enabled in this service.
HTTP Mapping: 501 Not Implemented */
/* Operation is not implemented or not supported/enabled in this service. */
UNIMPLEMENTED = 12,
/* Internal errors. Means some invariants expected by underlying
system has been broken. If you see one of these errors,
something is very broken.
HTTP Mapping: 500 Internal Server Error */
something is very broken. */
INTERNAL = 13,
/* The service is currently unavailable. This is a most likely a
@ -179,14 +144,10 @@ enum StatusCode {
a backoff.
See litmus test above for deciding between FAILED_PRECONDITION,
ABORTED, and UNAVAILABLE.
HTTP Mapping: 503 Service Unavailable */
ABORTED, and UNAVAILABLE. */
UNAVAILABLE = 14,
/* Unrecoverable data loss or corruption.
HTTP Mapping: 500 Internal Server Error */
/* Unrecoverable data loss or corruption. */
DATA_LOSS = 15,
/* Force users to include a default branch: */
@ -195,4 +156,4 @@ enum StatusCode {
} // namespace grpc
#endif // __GRPCPP_STATUS_CODE_ENUM_H_
#endif // GRPCXX_STATUS_CODE_ENUM_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_STREAM_H__
#define __GRPCPP_STREAM_H__
#ifndef GRPCXX_STREAM_H
#define GRPCXX_STREAM_H
#include <grpc++/channel_interface.h>
#include <grpc++/client_context.h>
@ -710,4 +710,4 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface,
} // namespace grpc
#endif // __GRPCPP_STREAM_H__
#endif // GRPCXX_STREAM_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPCPP_THREAD_POOL_INTERFACE_H__
#define __GRPCPP_THREAD_POOL_INTERFACE_H__
#ifndef GRPCXX_THREAD_POOL_INTERFACE_H
#define GRPCXX_THREAD_POOL_INTERFACE_H
#include <functional>
@ -49,4 +49,4 @@ class ThreadPoolInterface {
} // namespace grpc
#endif // __GRPCPP_THREAD_POOL_INTERFACE_H__
#endif // GRPCXX_THREAD_POOL_INTERFACE_H

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_BYTE_BUFFER_H__
#define __GRPC_BYTE_BUFFER_H__
#ifndef GRPC_BYTE_BUFFER_H
#define GRPC_BYTE_BUFFER_H
#include <grpc/grpc.h>
#include <grpc/support/slice_buffer.h>
@ -47,4 +47,4 @@ struct grpc_byte_buffer {
} data;
};
#endif /* __GRPC_BYTE_BUFFER_H__ */
#endif /* GRPC_BYTE_BUFFER_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_BYTE_BUFFER_READER_H__
#define __GRPC_BYTE_BUFFER_READER_H__
#ifndef GRPC_BYTE_BUFFER_READER_H
#define GRPC_BYTE_BUFFER_READER_H
#include <grpc/grpc.h>
#include <grpc/byte_buffer.h>
@ -46,4 +46,4 @@ struct grpc_byte_buffer_reader {
} current;
};
#endif /* __GRPC_BYTE_BUFFER_READER_H__ */
#endif /* GRPC_BYTE_BUFFER_READER_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_GRPC_H__
#define __GRPC_GRPC_H__
#ifndef GRPC_GRPC_H
#define GRPC_GRPC_H
#include <grpc/status.h>
@ -632,4 +632,4 @@ void grpc_server_destroy(grpc_server *server);
}
#endif
#endif /* __GRPC_GRPC_H__ */
#endif /* GRPC_GRPC_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_GRPC_HTTP_H__
#define __GRPC_GRPC_HTTP_H__
#ifndef GRPC_GRPC_HTTP_H
#define GRPC_GRPC_HTTP_H
#ifdef __cplusplus
extern "C" {
@ -64,4 +64,4 @@ typedef struct {
}
#endif
#endif /* __GRPC_GRPC_HTTP_H__ */
#endif /* GRPC_GRPC_HTTP_H */

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_SECURITY_H_
#define GRPC_SECURITY_H_
#ifndef GRPC_GRPC_SECURITY_H
#define GRPC_GRPC_SECURITY_H
#include "grpc.h"
#include "status.h"
@ -185,4 +185,4 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr);
}
#endif
#endif /* GRPC_SECURITY_H_ */
#endif /* GRPC_GRPC_SECURITY_H */

@ -31,59 +31,45 @@
*
*/
#ifndef __GRPC_STATUS_H__
#define __GRPC_STATUS_H__
#ifndef GRPC_STATUS_H
#define GRPC_STATUS_H
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
/* Not an error; returned on success
HTTP Mapping: 200 OK */
/* Not an error; returned on success */
GRPC_STATUS_OK = 0,
/* The operation was cancelled (typically by the caller).
HTTP Mapping: 499 Client Closed Request */
/* The operation was cancelled (typically by the caller). */
GRPC_STATUS_CANCELLED = 1,
/* Unknown error. An example of where this error may be returned is
if a Status value received from another address space belongs to
an error-space that is not known in this address space. Also
errors raised by APIs that do not return enough error information
may be converted to this error.
HTTP Mapping: 500 Internal Server Error */
may be converted to this error. */
GRPC_STATUS_UNKNOWN = 2,
/* Client specified an invalid argument. Note that this differs
from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments
that are problematic regardless of the state of the system
(e.g., a malformed file name).
HTTP Mapping: 400 Bad Request */
(e.g., a malformed file name). */
GRPC_STATUS_INVALID_ARGUMENT = 3,
/* Deadline expired before operation could complete. For operations
that change the state of the system, this error may be returned
even if the operation has completed successfully. For example, a
successful response from a server could have been delayed long
enough for the deadline to expire.
HTTP Mapping: 504 Gateway Timeout */
enough for the deadline to expire. */
GRPC_STATUS_DEADLINE_EXCEEDED = 4,
/* Some requested entity (e.g., file or directory) was not found.
HTTP Mapping: 404 Not Found */
/* Some requested entity (e.g., file or directory) was not found. */
GRPC_STATUS_NOT_FOUND = 5,
/* Some entity that we attempted to create (e.g., file or directory)
already exists.
HTTP Mapping: 409 Conflict */
already exists. */
GRPC_STATUS_ALREADY_EXISTS = 6,
/* The caller does not have permission to execute the specified
@ -91,21 +77,15 @@ typedef enum {
caused by exhausting some resource (use RESOURCE_EXHAUSTED
instead for those errors). PERMISSION_DENIED must not be
used if the caller can not be identified (use UNAUTHENTICATED
instead for those errors).
HTTP Mapping: 403 Forbidden */
instead for those errors). */
GRPC_STATUS_PERMISSION_DENIED = 7,
/* The request does not have valid authentication credentials for the
operation.
HTTP Mapping: 401 Unauthorized */
operation. */
GRPC_STATUS_UNAUTHENTICATED = 16,
/* Some resource has been exhausted, perhaps a per-user quota, or
perhaps the entire file system is out of space.
HTTP Mapping: 429 Too Many Requests */
perhaps the entire file system is out of space. */
GRPC_STATUS_RESOURCE_EXHAUSTED = 8,
/* Operation was rejected because the system is not in a state
@ -126,23 +106,14 @@ typedef enum {
(d) Use FAILED_PRECONDITION if the client performs conditional
REST Get/Update/Delete on a resource and the resource on the
server does not match the condition. E.g., conflicting
read-modify-write on the same resource.
HTTP Mapping: 400 Bad Request
NOTE: HTTP spec says 412 Precondition Failed should only be used if
the request contains Etag related headers. So if the server does see
Etag related headers in the request, it may choose to return 412
instead of 400 for this error code. */
read-modify-write on the same resource. */
GRPC_STATUS_FAILED_PRECONDITION = 9,
/* The operation was aborted, typically due to a concurrency issue
like sequencer check failures, transaction aborts, etc.
See litmus test above for deciding between FAILED_PRECONDITION,
ABORTED, and UNAVAILABLE.
HTTP Mapping: 409 Conflict */
ABORTED, and UNAVAILABLE. */
GRPC_STATUS_ABORTED = 10,
/* Operation was attempted past the valid range. E.g., seeking or
@ -159,21 +130,15 @@ typedef enum {
OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific
error) when it applies so that callers who are iterating through
a space can easily look for an OUT_OF_RANGE error to detect when
they are done.
HTTP Mapping: 400 Bad Request */
they are done. */
GRPC_STATUS_OUT_OF_RANGE = 11,
/* Operation is not implemented or not supported/enabled in this service.
HTTP Mapping: 501 Not Implemented */
/* Operation is not implemented or not supported/enabled in this service. */
GRPC_STATUS_UNIMPLEMENTED = 12,
/* Internal errors. Means some invariants expected by underlying
system has been broken. If you see one of these errors,
something is very broken.
HTTP Mapping: 500 Internal Server Error */
something is very broken. */
GRPC_STATUS_INTERNAL = 13,
/* The service is currently unavailable. This is a most likely a
@ -181,14 +146,10 @@ typedef enum {
a backoff.
See litmus test above for deciding between FAILED_PRECONDITION,
ABORTED, and UNAVAILABLE.
HTTP Mapping: 503 Service Unavailable */
ABORTED, and UNAVAILABLE. */
GRPC_STATUS_UNAVAILABLE = 14,
/* Unrecoverable data loss or corruption.
HTTP Mapping: 500 Internal Server Error */
/* Unrecoverable data loss or corruption. */
GRPC_STATUS_DATA_LOSS = 15,
/* Force users to include a default branch: */
@ -199,4 +160,4 @@ typedef enum {
}
#endif
#endif /* __GRPC_STATUS_H__ */
#endif /* GRPC_STATUS_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_ALLOC_H__
#define __GRPC_SUPPORT_ALLOC_H__
#ifndef GRPC_SUPPORT_ALLOC_H
#define GRPC_SUPPORT_ALLOC_H
#include <stddef.h>
@ -55,4 +55,4 @@ void gpr_free_aligned(void *ptr);
}
#endif
#endif /* __GRPC_SUPPORT_ALLOC_H__ */
#endif /* GRPC_SUPPORT_ALLOC_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_ATM_H__
#define __GRPC_SUPPORT_ATM_H__
#ifndef GRPC_SUPPORT_ATM_H
#define GRPC_SUPPORT_ATM_H
/* This interface provides atomic operations and barriers.
It is internal to gpr support code and should not be used outside it.
@ -89,4 +89,4 @@
#error could not determine platform for atm
#endif
#endif /* __GRPC_SUPPORT_ATM_H__ */
#endif /* GRPC_SUPPORT_ATM_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_ATM_GCC_ATOMIC_H__
#define __GRPC_SUPPORT_ATM_GCC_ATOMIC_H__
#ifndef GRPC_SUPPORT_ATM_GCC_ATOMIC_H
#define GRPC_SUPPORT_ATM_GCC_ATOMIC_H
/* atm_platform.h for gcc and gcc-like compilers with the
__atomic_* interface. */
@ -66,4 +66,4 @@ static __inline int gpr_atm_rel_cas(gpr_atm *p, gpr_atm o, gpr_atm n) {
__ATOMIC_RELAXED);
}
#endif /* __GRPC_SUPPORT_ATM_GCC_ATOMIC_H__ */
#endif /* GRPC_SUPPORT_ATM_GCC_ATOMIC_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_ATM_GCC_SYNC_H__
#define __GRPC_SUPPORT_ATM_GCC_SYNC_H__
#ifndef GRPC_SUPPORT_ATM_GCC_SYNC_H
#define GRPC_SUPPORT_ATM_GCC_SYNC_H
/* variant of atm_platform.h for gcc and gcc-like compiers with __sync_*
interface */
@ -70,4 +70,4 @@ static __inline void gpr_atm_rel_store(gpr_atm *p, gpr_atm value) {
#define gpr_atm_acq_cas(p, o, n) (__sync_bool_compare_and_swap((p), (o), (n)))
#define gpr_atm_rel_cas(p, o, n) gpr_atm_acq_cas((p), (o), (n))
#endif /* __GRPC_SUPPORT_ATM_GCC_SYNC_H__ */
#endif /* GRPC_SUPPORT_ATM_GCC_SYNC_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_ATM_WIN32_H__
#define __GRPC_SUPPORT_ATM_WIN32_H__
#ifndef GRPC_SUPPORT_ATM_WIN32_H
#define GRPC_SUPPORT_ATM_WIN32_H
/* Win32 variant of atm_platform.h */
#include <grpc/support/port_platform.h>
@ -105,4 +105,4 @@ static __inline gpr_atm gpr_atm_full_fetch_add(gpr_atm *p, gpr_atm delta) {
return old;
}
#endif /* __GRPC_SUPPORT_ATM_WIN32_H__ */
#endif /* GRPC_SUPPORT_ATM_WIN32_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_CANCELLABLE_PLATFORM_H__
#define __GRPC_SUPPORT_CANCELLABLE_PLATFORM_H__
#ifndef GRPC_SUPPORT_CANCELLABLE_PLATFORM_H
#define GRPC_SUPPORT_CANCELLABLE_PLATFORM_H
#include <grpc/support/atm.h>
#include <grpc/support/sync.h>
@ -53,4 +53,4 @@ typedef struct {
struct gpr_cancellable_list_ waiters;
} gpr_cancellable;
#endif /* __GRPC_SUPPORT_CANCELLABLE_PLATFORM_H__ */
#endif /* GRPC_SUPPORT_CANCELLABLE_PLATFORM_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_CMDLINE_H__
#define __GRPC_SUPPORT_CMDLINE_H__
#ifndef GRPC_SUPPORT_CMDLINE_H
#define GRPC_SUPPORT_CMDLINE_H
#ifdef __cplusplus
extern "C" {
@ -92,4 +92,4 @@ void gpr_cmdline_destroy(gpr_cmdline *cl);
}
#endif
#endif /* __GRPC_SUPPORT_CMDLINE_H__ */
#endif /* GRPC_SUPPORT_CMDLINE_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_INTERNAL_SUPPORT_CPU_H__
#define __GRPC_INTERNAL_SUPPORT_CPU_H__
#ifndef GRPC_SUPPORT_CPU_H
#define GRPC_SUPPORT_CPU_H
#ifdef __cplusplus
extern "C" {
@ -54,4 +54,4 @@ unsigned gpr_cpu_current_cpu(void);
} // extern "C"
#endif
#endif /* __GRPC_INTERNAL_SUPPORT_CPU_H__ */
#endif /* GRPC_SUPPORT_CPU_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_HISTOGRAM_H__
#define __GRPC_SUPPORT_HISTOGRAM_H__
#ifndef GRPC_SUPPORT_HISTOGRAM_H
#define GRPC_SUPPORT_HISTOGRAM_H
#ifdef __cplusplus
extern "C" {
@ -63,4 +63,4 @@ double gpr_histogram_sum_of_squares(gpr_histogram *histogram);
}
#endif
#endif /* __GRPC_SUPPORT_HISTOGRAM_H__ */
#endif /* GRPC_SUPPORT_HISTOGRAM_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_HOST_PORT_H__
#define __GRPC_SUPPORT_HOST_PORT_H__
#ifndef GRPC_SUPPORT_HOST_PORT_H
#define GRPC_SUPPORT_HOST_PORT_H
#ifdef __cplusplus
extern "C" {
@ -59,4 +59,4 @@ void gpr_split_host_port(const char *name, char **host, char **port);
}
#endif
#endif /* __GRPC_SUPPORT_HOST_PORT_H__ */
#endif /* GRPC_SUPPORT_HOST_PORT_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_LOG_H__
#define __GRPC_SUPPORT_LOG_H__
#ifndef GRPC_SUPPORT_LOG_H
#define GRPC_SUPPORT_LOG_H
#include <stdlib.h> /* for abort() */
#include <stdarg.h>
@ -105,4 +105,4 @@ void gpr_set_log_function(gpr_log_func func);
}
#endif
#endif /* __GRPC_SUPPORT_LOG_H__ */
#endif /* GRPC_SUPPORT_LOG_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_LOG_WIN32_H__
#define __GRPC_SUPPORT_LOG_WIN32_H__
#ifndef GRPC_SUPPORT_LOG_WIN32_H
#define GRPC_SUPPORT_LOG_WIN32_H
#include <windows.h>
@ -50,4 +50,4 @@ char *gpr_format_message(DWORD messageid);
}
#endif
#endif /* __GRPC_SUPPORT_LOG_H__ */
#endif /* GRPC_SUPPORT_LOG_WIN32_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_PORT_PLATFORM_H__
#define __GRPC_SUPPORT_PORT_PLATFORM_H__
#ifndef GRPC_SUPPORT_PORT_PLATFORM_H
#define GRPC_SUPPORT_PORT_PLATFORM_H
/* Override this file with one for your platform if you need to redefine
things. */
@ -206,4 +206,4 @@ typedef uintptr_t gpr_uintptr;
power of two */
#define GPR_MAX_ALIGNMENT 16
#endif /* __GRPC_SUPPORT_PORT_PLATFORM_H__ */
#endif /* GRPC_SUPPORT_PORT_PLATFORM_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_SLICE_H__
#define __GRPC_SUPPORT_SLICE_H__
#ifndef GRPC_SUPPORT_SLICE_H
#define GRPC_SUPPORT_SLICE_H
#include <grpc/support/sync.h>
@ -175,4 +175,4 @@ int gpr_slice_str_cmp(gpr_slice a, const char *b);
}
#endif
#endif /* __GRPC_SUPPORT_SLICE_H__ */
#endif /* GRPC_SUPPORT_SLICE_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_SLICE_BUFFER_H__
#define __GRPC_SUPPORT_SLICE_BUFFER_H__
#ifndef GRPC_SUPPORT_SLICE_BUFFER_H
#define GRPC_SUPPORT_SLICE_BUFFER_H
#include <grpc/support/slice.h>
@ -81,4 +81,4 @@ void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb);
}
#endif
#endif /* __GRPC_SUPPORT_SLICE_BUFFER_H__ */
#endif /* GRPC_SUPPORT_SLICE_BUFFER_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_SYNC_H__
#define __GRPC_SUPPORT_SYNC_H__
#ifndef GRPC_SUPPORT_SYNC_H
#define GRPC_SUPPORT_SYNC_H
/* Synchronization primitives for GPR.
The type gpr_mu provides a non-reentrant mutex (lock).
@ -345,4 +345,4 @@ gpr_intptr gpr_stats_read(const gpr_stats_counter *c);
}
#endif
#endif /* __GRPC_SUPPORT_SYNC_H__ */
#endif /* GRPC_SUPPORT_SYNC_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_SYNC_GENERIC_H__
#define __GRPC_SUPPORT_SYNC_GENERIC_H__
#ifndef GRPC_SUPPORT_SYNC_GENERIC_H
#define GRPC_SUPPORT_SYNC_GENERIC_H
/* Generic type defintions for gpr_sync. */
#include <grpc/support/atm.h>
@ -58,4 +58,4 @@ typedef struct {
#define GPR_STATS_INIT \
{ 0 }
#endif /* __GRPC_SUPPORT_SYNC_GENERIC_H__ */
#endif /* GRPC_SUPPORT_SYNC_GENERIC_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_SYNC_POSIX_H__
#define __GRPC_SUPPORT_SYNC_POSIX_H__
#ifndef GRPC_SUPPORT_SYNC_POSIX_H
#define GRPC_SUPPORT_SYNC_POSIX_H
#include <grpc/support/sync_generic.h>
@ -44,4 +44,4 @@ typedef pthread_once_t gpr_once;
#define GPR_ONCE_INIT PTHREAD_ONCE_INIT
#endif /* __GRPC_SUPPORT_SYNC_POSIX_H__ */
#endif /* GRPC_SUPPORT_SYNC_POSIX_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_SYNC_WIN32_H__
#define __GRPC_SUPPORT_SYNC_WIN32_H__
#ifndef GRPC_SUPPORT_SYNC_WIN32_H
#define GRPC_SUPPORT_SYNC_WIN32_H
#include <grpc/support/sync_generic.h>
@ -48,4 +48,4 @@ typedef CONDITION_VARIABLE gpr_cv;
typedef INIT_ONCE gpr_once;
#define GPR_ONCE_INIT INIT_ONCE_STATIC_INIT
#endif /* __GRPC_SUPPORT_SYNC_WIN32_H__ */
#endif /* GRPC_SUPPORT_SYNC_WIN32_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_THD_H__
#define __GRPC_SUPPORT_THD_H__
#ifndef GRPC_SUPPORT_THD_H
#define GRPC_SUPPORT_THD_H
/* Thread interface for GPR.
Types
@ -73,4 +73,4 @@ gpr_thd_id gpr_thd_currentid(void);
}
#endif
#endif /* __GRPC_SUPPORT_THD_H__ */
#endif /* GRPC_SUPPORT_THD_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_TIME_H__
#define __GRPC_SUPPORT_TIME_H__
#ifndef GRPC_SUPPORT_TIME_H
#define GRPC_SUPPORT_TIME_H
/* Time support.
We use gpr_timespec, which is analogous to struct timespec. On some
machines, absolute times may be in local time. */
@ -100,4 +100,4 @@ double gpr_timespec_to_micros(gpr_timespec t);
}
#endif
#endif /* __GRPC_SUPPORT_TIME_H__ */
#endif /* GRPC_SUPPORT_TIME_H */

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_SUPPORT_USEFUL_H__
#define __GRPC_SUPPORT_USEFUL_H__
#ifndef GRPC_SUPPORT_USEFUL_H
#define GRPC_SUPPORT_USEFUL_H
/* useful macros that don't belong anywhere else */
@ -45,4 +45,4 @@
#define GPR_ARRAY_SIZE(array) (sizeof(array) / sizeof(*(array)))
#endif /* __GRPC_SUPPORT_USEFUL_H__ */
#endif /* GRPC_SUPPORT_USEFUL_H */

@ -186,7 +186,7 @@ void PrintHeaderClientMethod(google::protobuf::io::Printer *printer,
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientAsyncResponseReader< $Response$>> "
"$Method$(::grpc::ClientContext* context, "
"Async$Method$(::grpc::ClientContext* context, "
"const $Request$& request, "
"::grpc::CompletionQueue* cq, void* tag);\n");
} else if (ClientOnlyStreaming(method)) {
@ -196,7 +196,7 @@ void PrintHeaderClientMethod(google::protobuf::io::Printer *printer,
"::grpc::ClientContext* context, $Response$* response);\n");
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientAsyncWriter< $Request$>> $Method$("
"std::unique_ptr< ::grpc::ClientAsyncWriter< $Request$>> Async$Method$("
"::grpc::ClientContext* context, $Response$* response, "
"::grpc::CompletionQueue* cq, void* tag);\n");
} else if (ServerOnlyStreaming(method)) {
@ -206,7 +206,7 @@ void PrintHeaderClientMethod(google::protobuf::io::Printer *printer,
"::grpc::ClientContext* context, const $Request$& request);\n");
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientAsyncReader< $Response$>> $Method$("
"std::unique_ptr< ::grpc::ClientAsyncReader< $Response$>> Async$Method$("
"::grpc::ClientContext* context, const $Request$& request, "
"::grpc::CompletionQueue* cq, void* tag);\n");
} else if (BidiStreaming(method)) {
@ -217,7 +217,7 @@ void PrintHeaderClientMethod(google::protobuf::io::Printer *printer,
printer->Print(*vars,
"std::unique_ptr< ::grpc::ClientAsyncReaderWriter< "
"$Request$, $Response$>> "
"$Method$(::grpc::ClientContext* context, "
"Async$Method$(::grpc::ClientContext* context, "
"::grpc::CompletionQueue* cq, void* tag);\n");
}
}
@ -390,7 +390,7 @@ void PrintSourceClientMethod(google::protobuf::io::Printer *printer,
printer->Print(
*vars,
"std::unique_ptr< ::grpc::ClientAsyncResponseReader< $Response$>> "
"$Service$::Stub::$Method$(::grpc::ClientContext* context, "
"$Service$::Stub::Async$Method$(::grpc::ClientContext* context, "
"const $Request$& request, "
"::grpc::CompletionQueue* cq, void* tag) {\n");
printer->Print(*vars,
@ -416,7 +416,7 @@ void PrintSourceClientMethod(google::protobuf::io::Printer *printer,
"}\n\n");
printer->Print(*vars,
"std::unique_ptr< ::grpc::ClientAsyncWriter< $Request$>> "
"$Service$::Stub::$Method$("
"$Service$::Stub::Async$Method$("
"::grpc::ClientContext* context, $Response$* response, "
"::grpc::CompletionQueue* cq, void* tag) {\n");
printer->Print(*vars,
@ -443,7 +443,7 @@ void PrintSourceClientMethod(google::protobuf::io::Printer *printer,
"}\n\n");
printer->Print(*vars,
"std::unique_ptr< ::grpc::ClientAsyncReader< $Response$>> "
"$Service$::Stub::$Method$("
"$Service$::Stub::Async$Method$("
"::grpc::ClientContext* context, const $Request$& request, "
"::grpc::CompletionQueue* cq, void* tag) {\n");
printer->Print(*vars,
@ -471,7 +471,7 @@ void PrintSourceClientMethod(google::protobuf::io::Printer *printer,
printer->Print(*vars,
"std::unique_ptr< ::grpc::ClientAsyncReaderWriter< "
"$Request$, $Response$>> "
"$Service$::Stub::$Method$(::grpc::ClientContext* context, "
"$Service$::Stub::Async$Method$(::grpc::ClientContext* context, "
"::grpc::CompletionQueue* cq, void* tag) {\n");
printer->Print(*vars,
" return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< "

@ -31,8 +31,8 @@
*
*/
#ifndef NET_GRPC_COMPILER_CPP_GENERATOR_H_
#define NET_GRPC_COMPILER_CPP_GENERATOR_H_
#ifndef GRPC_INTERNAL_COMPILER_CPP_GENERATOR_H
#define GRPC_INTERNAL_COMPILER_CPP_GENERATOR_H
#include <string>
@ -58,4 +58,4 @@ std::string GetSourceServices(const google::protobuf::FileDescriptor *file);
} // namespace grpc_cpp_generator
#endif // NET_GRPC_COMPILER_CPP_GENERATOR_H_
#endif // GRPC_INTERNAL_COMPILER_CPP_GENERATOR_H

@ -31,8 +31,8 @@
*
*/
#ifndef NET_GRPC_COMPILER_CPP_GENERATOR_HELPERS_H__
#define NET_GRPC_COMPILER_CPP_GENERATOR_HELPERS_H__
#ifndef GRPC_INTERNAL_COMPILER_CPP_GENERATOR_HELPERS_H
#define GRPC_INTERNAL_COMPILER_CPP_GENERATOR_HELPERS_H
#include <map>
#include <string>
@ -69,4 +69,4 @@ inline std::string ClassName(const google::protobuf::Descriptor *descriptor,
} // namespace grpc_cpp_generator
#endif // NET_GRPC_COMPILER_CPP_GENERATOR_HELPERS_H__
#endif // GRPC_INTERNAL_COMPILER_CPP_GENERATOR_HELPERS_H

@ -31,8 +31,8 @@
*
*/
#ifndef NET_GRPC_COMPILER_GENERATOR_HELPERS_H__
#define NET_GRPC_COMPILER_GENERATOR_HELPERS_H__
#ifndef GRPC_INTERNAL_COMPILER_GENERATOR_HELPERS_H
#define GRPC_INTERNAL_COMPILER_GENERATOR_HELPERS_H
#include <map>
#include <string>
@ -76,4 +76,4 @@ inline std::string StringReplace(std::string str, const std::string &from,
} // namespace grpc_generator
#endif // NET_GRPC_COMPILER_GENERATOR_HELPERS_H__
#endif // GRPC_INTERNAL_COMPILER_GENERATOR_HELPERS_H

@ -237,54 +237,70 @@ bool PrintServerFactory(const ServiceDescriptor* service, Printer* out) {
"Service", service->name());
{
IndentScope raii_create_server_indent(out);
map<string, pair<string, string>> method_to_module_and_message;
out->Print("method_implementations = {\n");
map<string, string> method_description_constructors;
map<string, pair<string, string>> input_message_modules_and_classes;
map<string, pair<string, string>> output_message_modules_and_classes;
for (int i = 0; i < service->method_count(); ++i) {
IndentScope raii_implementations_indent(out);
const MethodDescriptor* meth = service->method(i);
string meth_type =
string(meth->client_streaming() ? "stream" : "unary") +
string(meth->server_streaming() ? "_stream" : "_unary") + "_inline";
out->Print("\"$Method$\": utilities.$Type$(servicer.$Method$),\n",
"Method", meth->name(),
"Type", meth_type);
// Maintain information on the input type of the service method for later
// use in constructing the service assembly's activated fore link.
const Descriptor* input_type = meth->input_type();
pair<string, string> module_and_message;
if (!GetModuleAndMessagePath(input_type, &module_and_message)) {
const MethodDescriptor* method = service->method(i);
const string method_description_constructor =
string(method->client_streaming() ? "stream_" : "unary_") +
string(method->server_streaming() ? "stream_" : "unary_") +
"service_description";
pair<string, string> input_message_module_and_class;
if (!GetModuleAndMessagePath(method->input_type(),
&input_message_module_and_class)) {
return false;
}
method_to_module_and_message.insert(
make_pair(meth->name(), module_and_message));
}
out->Print("}\n");
// Ensure that we've imported all of the relevant messages.
for (auto& meth_vals : method_to_module_and_message) {
out->Print("import $Module$\n",
"Module", meth_vals.second.first);
}
out->Print("request_deserializers = {\n");
for (auto& meth_vals : method_to_module_and_message) {
IndentScope raii_serializers_indent(out);
string full_input_type_path = meth_vals.second.first + "." +
meth_vals.second.second;
out->Print("\"$Method$\": $Type$.FromString,\n",
"Method", meth_vals.first,
"Type", full_input_type_path);
pair<string, string> output_message_module_and_class;
if (!GetModuleAndMessagePath(method->output_type(),
&output_message_module_and_class)) {
return false;
}
// Import the modules that define the messages used in RPCs.
out->Print("import $Module$\n", "Module",
input_message_module_and_class.first);
out->Print("import $Module$\n", "Module",
output_message_module_and_class.first);
method_description_constructors.insert(
make_pair(method->name(), method_description_constructor));
input_message_modules_and_classes.insert(
make_pair(method->name(), input_message_module_and_class));
output_message_modules_and_classes.insert(
make_pair(method->name(), output_message_module_and_class));
}
out->Print("}\n");
out->Print("response_serializers = {\n");
for (auto& meth_vals : method_to_module_and_message) {
IndentScope raii_serializers_indent(out);
out->Print("\"$Method$\": lambda x: x.SerializeToString(),\n",
"Method", meth_vals.first);
out->Print("method_service_descriptions = {\n");
for (auto& name_and_description_constructor :
method_description_constructors) {
IndentScope raii_descriptions_indent(out);
const string method_name = name_and_description_constructor.first;
auto input_message_module_and_class =
input_message_modules_and_classes.find(method_name);
auto output_message_module_and_class =
output_message_modules_and_classes.find(method_name);
out->Print("\"$Method$\": utilities.$Constructor$(\n", "Method",
method_name, "Constructor",
name_and_description_constructor.second);
{
IndentScope raii_description_arguments_indent(out);
out->Print("servicer.$Method$,\n", "Method", method_name);
out->Print(
"$InputTypeModule$.$InputTypeClass$.FromString,\n",
"InputTypeModule", input_message_module_and_class->second.first,
"InputTypeClass", input_message_module_and_class->second.second);
out->Print(
"$OutputTypeModule$.$OutputTypeClass$.SerializeToString,\n",
"OutputTypeModule", output_message_module_and_class->second.first,
"OutputTypeClass", output_message_module_and_class->second.second);
}
out->Print("),\n");
}
out->Print("}\n");
out->Print("link = fore.activated_fore_link(port, request_deserializers, "
"response_serializers, root_certificates, key_chain_pairs)\n");
out->Print("return implementations.assemble_service("
"method_implementations, link)\n");
// out->Print("return implementations.insecure_server("
// "method_service_descriptions, port)\n");
out->Print(
"return implementations.secure_server("
"method_service_descriptions, port, root_certificates,"
" key_chain_pairs)\n");
}
return true;
}
@ -296,66 +312,74 @@ bool PrintStubFactory(const ServiceDescriptor* service, Printer* out) {
out->Print(dict, "def early_adopter_create_$Service$_stub(host, port):\n");
{
IndentScope raii_create_server_indent(out);
map<string, pair<string, string>> method_to_module_and_message;
out->Print("method_implementations = {\n");
map<string, string> method_description_constructors;
map<string, pair<string, string>> input_message_modules_and_classes;
map<string, pair<string, string>> output_message_modules_and_classes;
for (int i = 0; i < service->method_count(); ++i) {
IndentScope raii_implementations_indent(out);
const MethodDescriptor* meth = service->method(i);
string meth_type =
string(meth->client_streaming() ? "stream" : "unary") +
string(meth->server_streaming() ? "_stream" : "_unary") + "_inline";
// TODO(atash): once the expected input to assemble_dynamic_inline_stub is
// cleaned up, change this to the expected argument's dictionary values.
out->Print("\"$Method$\": utilities.$Type$(None),\n",
"Method", meth->name(),
"Type", meth_type);
// Maintain information on the input type of the service method for later
// use in constructing the service assembly's activated fore link.
const Descriptor* output_type = meth->output_type();
pair<string, string> module_and_message;
if (!GetModuleAndMessagePath(output_type, &module_and_message)) {
const MethodDescriptor* method = service->method(i);
const string method_description_constructor =
string(method->client_streaming() ? "stream_" : "unary_") +
string(method->server_streaming() ? "stream_" : "unary_") +
"invocation_description";
pair<string, string> input_message_module_and_class;
if (!GetModuleAndMessagePath(method->input_type(),
&input_message_module_and_class)) {
return false;
}
method_to_module_and_message.insert(
make_pair(meth->name(), module_and_message));
}
out->Print("}\n");
// Ensure that we've imported all of the relevant messages.
for (auto& meth_vals : method_to_module_and_message) {
out->Print("import $Module$\n",
"Module", meth_vals.second.first);
}
out->Print("response_deserializers = {\n");
for (auto& meth_vals : method_to_module_and_message) {
IndentScope raii_serializers_indent(out);
string full_output_type_path = meth_vals.second.first + "." +
meth_vals.second.second;
out->Print("\"$Method$\": $Type$.FromString,\n",
"Method", meth_vals.first,
"Type", full_output_type_path);
pair<string, string> output_message_module_and_class;
if (!GetModuleAndMessagePath(method->output_type(),
&output_message_module_and_class)) {
return false;
}
// Import the modules that define the messages used in RPCs.
out->Print("import $Module$\n", "Module",
input_message_module_and_class.first);
out->Print("import $Module$\n", "Module",
output_message_module_and_class.first);
method_description_constructors.insert(
make_pair(method->name(), method_description_constructor));
input_message_modules_and_classes.insert(
make_pair(method->name(), input_message_module_and_class));
output_message_modules_and_classes.insert(
make_pair(method->name(), output_message_module_and_class));
}
out->Print("}\n");
out->Print("request_serializers = {\n");
for (auto& meth_vals : method_to_module_and_message) {
IndentScope raii_serializers_indent(out);
out->Print("\"$Method$\": lambda x: x.SerializeToString(),\n",
"Method", meth_vals.first);
out->Print("method_invocation_descriptions = {\n");
for (auto& name_and_description_constructor :
method_description_constructors) {
IndentScope raii_descriptions_indent(out);
const string method_name = name_and_description_constructor.first;
auto input_message_module_and_class =
input_message_modules_and_classes.find(method_name);
auto output_message_module_and_class =
output_message_modules_and_classes.find(method_name);
out->Print("\"$Method$\": utilities.$Constructor$(\n", "Method",
method_name, "Constructor",
name_and_description_constructor.second);
{
IndentScope raii_description_arguments_indent(out);
out->Print(
"$InputTypeModule$.$InputTypeClass$.SerializeToString,\n",
"InputTypeModule", input_message_module_and_class->second.first,
"InputTypeClass", input_message_module_and_class->second.second);
out->Print(
"$OutputTypeModule$.$OutputTypeClass$.FromString,\n",
"OutputTypeModule", output_message_module_and_class->second.first,
"OutputTypeClass", output_message_module_and_class->second.second);
}
out->Print("),\n");
}
out->Print("}\n");
out->Print("link = rear.activated_rear_link("
"host, port, request_serializers, response_deserializers)\n");
out->Print("return implementations.assemble_dynamic_inline_stub("
"method_implementations, link)\n");
out->Print(
"return implementations.insecure_stub("
"method_invocation_descriptions, host, port)\n");
}
return true;
}
bool PrintPreamble(const FileDescriptor* file, Printer* out) {
out->Print("import abc\n");
out->Print("from grpc._adapter import fore\n");
out->Print("from grpc._adapter import rear\n");
out->Print("from grpc.framework.assembly import implementations\n");
out->Print("from grpc.framework.assembly import utilities\n");
out->Print("from grpc.early_adopter import implementations\n");
out->Print("from grpc.early_adopter import utilities\n");
return true;
}

@ -31,8 +31,8 @@
*
*/
#ifndef __GRPC_COMPILER_PYTHON_GENERATOR_H__
#define __GRPC_COMPILER_PYTHON_GENERATOR_H__
#ifndef GRPC_INTERNAL_COMPILER_PYTHON_GENERATOR_H
#define GRPC_INTERNAL_COMPILER_PYTHON_GENERATOR_H
#include <string>
#include <utility>
@ -49,4 +49,4 @@ std::pair<bool, std::string> GetServices(const google::protobuf::FileDescriptor*
} // namespace grpc_python_generator
#endif // __GRPC_COMPILER_PYTHON_GENERATOR_H__
#endif // GRPC_INTERNAL_COMPILER_PYTHON_GENERATOR_H

@ -31,8 +31,8 @@
*
*/
#ifndef NET_GRPC_COMPILER_RUBY_GENERATOR_H_
#define NET_GRPC_COMPILER_RUBY_GENERATOR_H_
#ifndef GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_H
#define GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_H
#include <string>
@ -48,4 +48,4 @@ std::string GetServices(const google::protobuf::FileDescriptor *file);
} // namespace grpc_ruby_generator
#endif // NET_GRPC_COMPILER_RUBY_GENERATOR_H_
#endif // GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_H

@ -31,8 +31,8 @@
*
*/
#ifndef NET_GRPC_COMPILER_RUBY_GENERATOR_HELPERS_INL_H_
#define NET_GRPC_COMPILER_RUBY_GENERATOR_HELPERS_INL_H_
#ifndef GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_HELPERS_INL_H
#define GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_HELPERS_INL_H
#include <string>
@ -64,4 +64,4 @@ inline std::string MessagesRequireName(
} // namespace grpc_ruby_generator
#endif // NET_GRPC_COMPILER_RUBY_GENERATOR_HELPERS_INL_H_
#endif // GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_HELPERS_INL_H

@ -31,8 +31,8 @@
*
*/
#ifndef NET_GRPC_COMPILER_RUBY_GENERATOR_MAP_INL_H_
#define NET_GRPC_COMPILER_RUBY_GENERATOR_MAP_INL_H_
#ifndef GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_MAP_INL_H
#define GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_MAP_INL_H
#include <iostream>
#include <initializer_list>
@ -69,4 +69,4 @@ inline std::map<std::string, std::string> ListToDict(
} // namespace grpc_ruby_generator
#endif // NET_GRPC_COMPILER_RUBY_GENERATOR_MAP_INL_H_
#endif // GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_MAP_INL_H

@ -31,8 +31,8 @@
*
*/
#ifndef NET_GRPC_COMPILER_RUBY_GENERATOR_STRING_INL_H_
#define NET_GRPC_COMPILER_RUBY_GENERATOR_STRING_INL_H_
#ifndef GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_STRING_INL_H
#define GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_STRING_INL_H
#include <algorithm>
#include <string>
@ -130,4 +130,4 @@ inline std::string RubyTypeOf(const std::string &a_type,
} // namespace grpc_ruby_generator
#endif // NET_GRPC_COMPILER_RUBY_GENERATOR_STRING_INL_H_
#endif // GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_STRING_INL_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 */

@ -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 */

@ -36,6 +36,8 @@
#include <stdlib.h>
int grpc_trace_channel = 0;
/* Memory layouts.
Channel stack is laid out as: {

@ -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
@ -298,7 +298,9 @@ void grpc_call_element_recv_metadata(grpc_call_element *cur_elem,
void grpc_call_element_send_cancel(grpc_call_element *cur_elem);
void grpc_call_element_send_finish(grpc_call_element *cur_elem);
extern int grpc_trace_channel;
#define GRPC_CALL_LOG_OP(sev, elem, op) \
if (grpc_trace_bits & GRPC_TRACE_CHANNEL) grpc_call_log_op(sev, elem, op)
if (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 */

@ -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 */

@ -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 */

@ -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 */

@ -48,12 +48,12 @@
/* the protobuf library will (by default) start warning at 100megs */
#define DEFAULT_MAX_MESSAGE_LENGTH (100 * 1024 * 1024)
typedef struct {
typedef struct connected_channel_channel_data {
grpc_transport *transport;
gpr_uint32 max_message_length;
} channel_data;
typedef struct {
typedef struct connected_channel_call_data {
grpc_call_element *elem;
grpc_stream_op_buffer outgoing_sopb;

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -39,8 +39,21 @@
#include <grpc/support/log.h>
#include "src/core/support/env.h"
#if GRPC_ENABLE_TRACING
gpr_uint32 grpc_trace_bits = 0;
typedef struct tracer {
const char *name;
int *flag;
struct tracer *next;
} tracer;
static tracer *tracers;
void grpc_register_tracer(const char *name, int *flag) {
tracer *t = gpr_malloc(sizeof(*t));
t->name = name;
t->flag = flag;
t->next = tracers;
*flag = 0;
tracers = t;
}
static void add(const char *beg, const char *end, char ***ss, size_t *ns) {
size_t n = *ns;
@ -67,26 +80,26 @@ static void parse(const char *s) {
char **strings = NULL;
size_t nstrings = 0;
size_t i;
tracer *t;
split(s, &strings, &nstrings);
grpc_trace_bits = 0;
for (i = 0; i < nstrings; i++) {
const char *s = strings[i];
if (0 == strcmp(s, "surface")) {
grpc_trace_bits |= GRPC_TRACE_SURFACE;
} else if (0 == strcmp(s, "channel")) {
grpc_trace_bits |= GRPC_TRACE_CHANNEL;
} else if (0 == strcmp(s, "tcp")) {
grpc_trace_bits |= GRPC_TRACE_TCP;
} else if (0 == strcmp(s, "secure_endpoint")) {
grpc_trace_bits |= GRPC_TRACE_SECURE_ENDPOINT;
} else if (0 == strcmp(s, "http")) {
grpc_trace_bits |= GRPC_TRACE_HTTP;
} else if (0 == strcmp(s, "all")) {
grpc_trace_bits = -1;
if (0 == strcmp(s, "all")) {
for (t = tracers; t; t = t->next) {
*t->flag = 1;
}
} else {
gpr_log(GPR_ERROR, "Unknown trace var: '%s'", s);
int found = 0;
for (t = tracers; t; t = t->next) {
if (0 == strcmp(s, t->name)) {
*t->flag = 1;
found = 1;
}
}
if (!found) {
gpr_log(GPR_ERROR, "Unknown trace var: '%s'", s);
}
}
}
@ -96,17 +109,15 @@ static void parse(const char *s) {
gpr_free(strings);
}
void grpc_init_trace_bits() {
char *e = gpr_getenv("GRPC_TRACE");
if (e == NULL) {
grpc_trace_bits = 0;
} else {
void grpc_tracer_init(const char *env_var) {
char *e = gpr_getenv(env_var);
if (e != NULL) {
parse(e);
gpr_free(e);
}
while (tracers) {
tracer *t = tracers;
tracers = t->next;
gpr_free(t);
}
}
#else
void grpc_init_trace_bits() {
}
#endif

@ -31,31 +31,12 @@
*
*/
#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>
/* set to zero to remove all debug trace code */
#ifndef GRPC_ENABLE_TRACING
# define GRPC_ENABLE_TRACING 1
#endif
typedef enum {
GRPC_TRACE_SURFACE = 1 << 0,
GRPC_TRACE_CHANNEL = 1 << 1,
GRPC_TRACE_TCP = 1 << 2,
GRPC_TRACE_SECURE_ENDPOINT = 1 << 3,
GRPC_TRACE_HTTP = 1 << 4
} grpc_trace_bit_value;
#if GRPC_ENABLE_TRACING
extern gpr_uint32 grpc_trace_bits;
#else
# define grpc_trace_bits 0
#endif
void grpc_init_trace_bits();
#endif
void grpc_register_tracer(const char *name, int *flag);
void grpc_tracer_init(const char *env_var_name);
#endif /* GRPC_INTERNAL_CORE_DEBUG_TRACE_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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -36,11 +36,14 @@
#ifdef GPR_POSIX_SOCKET
#include "src/core/iomgr/iomgr_posix.h"
#include "src/core/debug/trace.h"
#include "src/core/iomgr/fd_posix.h"
#include "src/core/iomgr/tcp_posix.h"
void grpc_iomgr_platform_init(void) {
grpc_fd_global_init();
grpc_pollset_global_init();
grpc_register_tracer("tcp", &grpc_tcp_trace);
}
void grpc_iomgr_platform_shutdown(void) {

@ -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 */

@ -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 */

@ -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 */

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save