diff options
author | jiangtaoli2016 <jiangtao@google.com> | 2017-05-05 09:04:59 -0700 |
---|---|---|
committer | jiangtaoli2016 <jiangtao@google.com> | 2017-05-05 09:04:59 -0700 |
commit | 18836bec50138fcd9d3b462fc5fc929241d02bfe (patch) | |
tree | e9d6c4092efb5860639d893032a072e62d67af01 /src/core/lib | |
parent | 14023dd3284c1c170ce9884ad3c99b2ed5ce8ffc (diff) | |
parent | 6815e414a4dbca4d0d4dd62b5ec3c6faa60c9bb9 (diff) |
Merge branch 'master' into handshaker
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/channel/context.h | 3 | ||||
-rw-r--r-- | src/core/lib/http/httpcli.c | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/port.h | 1 | ||||
-rw-r--r-- | src/core/lib/support/cpu_linux.c | 8 | ||||
-rw-r--r-- | src/core/lib/support/wrap_memcpy.c | 4 |
5 files changed, 12 insertions, 6 deletions
diff --git a/src/core/lib/channel/context.h b/src/core/lib/channel/context.h index 6c931ad28a..f0a21113c5 100644 --- a/src/core/lib/channel/context.h +++ b/src/core/lib/channel/context.h @@ -50,6 +50,9 @@ typedef enum { /// Reserved for traffic_class_context. GRPC_CONTEXT_TRAFFIC, + /// Value is a \a grpc_grpclb_client_stats. + GRPC_GRPCLB_CLIENT_STATS, + GRPC_CONTEXT_COUNT } grpc_context_index; diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 453a64b049..0ac2c2ad52 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -105,7 +105,7 @@ static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, grpc_error *error) { grpc_polling_entity_del_from_pollset_set(exec_ctx, req->pollent, req->context->pollset_set); - grpc_closure_sched(exec_ctx, req->on_done, error); + grpc_closure_sched(exec_ctx, req->on_done, GRPC_ERROR_REF(error)); grpc_http_parser_destroy(&req->parser); if (req->addresses != NULL) { grpc_resolved_addresses_destroy(req->addresses); diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 269dc35003..2a553f4114 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -88,6 +88,7 @@ #ifndef __GLIBC__ #define GRPC_LINUX_EPOLL 1 #define GRPC_LINUX_EVENTFD 1 +#define GRPC_MSG_IOVLEN_TYPE int #endif #ifndef GRPC_LINUX_EVENTFD #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 diff --git a/src/core/lib/support/cpu_linux.c b/src/core/lib/support/cpu_linux.c index 1e50f59823..b826dde160 100644 --- a/src/core/lib/support/cpu_linux.c +++ b/src/core/lib/support/cpu_linux.c @@ -67,16 +67,16 @@ unsigned gpr_cpu_num_cores(void) { } unsigned gpr_cpu_current_cpu(void) { -#ifdef __GLIBC__ +#ifdef GPR_MUSL_LIBC_COMPAT + // sched_getcpu() is undefined on musl + return 0; +#else int cpu = sched_getcpu(); if (cpu < 0) { gpr_log(GPR_ERROR, "Error determining current CPU: %s\n", strerror(errno)); return 0; } return (unsigned)cpu; -#else - // sched_getcpu() is undefined on musl - return 0; #endif } diff --git a/src/core/lib/support/wrap_memcpy.c b/src/core/lib/support/wrap_memcpy.c index 050cc6db5e..deb8d6b198 100644 --- a/src/core/lib/support/wrap_memcpy.c +++ b/src/core/lib/support/wrap_memcpy.c @@ -31,6 +31,8 @@ * */ +#include <grpc/support/port_platform.h> + #include <string.h> /* Provide a wrapped memcpy for targets that need to be backwards @@ -40,7 +42,7 @@ */ #ifdef __linux__ -#if defined(__x86_64__) && defined(__GNU_LIBRARY__) +#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT) __asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); void *__wrap_memcpy(void *destination, const void *source, size_t num) { return memcpy(destination, source, num); |