aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-02-08 11:08:41 -0800
committerGravatar Vijay Pai <vpai@google.com>2018-02-08 11:08:41 -0800
commit239b7d4b0be55975e5fc0b62e28f3d3e2a54fa9b (patch)
tree30c6d791eed6e7eaa8dfefe29b8b60651e56b059 /src/core/lib/iomgr
parent8f4fbb1c550c99e25f42ceafec3af92b34279db5 (diff)
parent100e0a78ebc1ecfaefb57c5105506b3091d4b86c (diff)
Merge branch 'master' into gpr_review
Diffstat (limited to 'src/core/lib/iomgr')
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.cc6
-rw-r--r--src/core/lib/iomgr/ev_poll_posix.cc12
-rw-r--r--src/core/lib/iomgr/resolve_address_posix.cc2
-rw-r--r--src/core/lib/iomgr/resolve_address_uv.cc2
-rw-r--r--src/core/lib/iomgr/resolve_address_windows.cc3
-rw-r--r--src/core/lib/iomgr/sockaddr_utils.cc2
-rw-r--r--src/core/lib/iomgr/socket_utils_common_posix.cc3
7 files changed, 16 insertions, 14 deletions
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
index aaace58dd5..7697a85f2e 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.cc
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -57,7 +57,7 @@
//#define GRPC_EPOLLEX_CREATE_WORKERS_ON_HEAP 1
#define MAX_EPOLL_EVENTS 100
-#define MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL 5
+#define MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL 1
grpc_core::DebugOnlyTraceFlag grpc_trace_pollable_refcount(false,
"pollable_refcount");
@@ -1452,10 +1452,6 @@ static const grpc_event_engine_vtable vtable = {
const grpc_event_engine_vtable* grpc_init_epollex_linux(
bool explicitly_requested) {
- if (!explicitly_requested) {
- return nullptr;
- }
-
if (!grpc_has_wakeup_fd()) {
gpr_log(GPR_ERROR, "Skipping epollex because of no wakeup fd.");
return nullptr;
diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc
index 84be1804a2..179512b373 100644
--- a/src/core/lib/iomgr/ev_poll_posix.cc
+++ b/src/core/lib/iomgr/ev_poll_posix.cc
@@ -457,16 +457,20 @@ static grpc_error* fd_shutdown_error(grpc_fd* fd) {
if (!fd->shutdown) {
return GRPC_ERROR_NONE;
} else {
- return GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
- "FD shutdown", &fd->shutdown_error, 1);
+ return grpc_error_set_int(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
+ "FD shutdown", &fd->shutdown_error, 1),
+ GRPC_ERROR_INT_GRPC_STATUS,
+ GRPC_STATUS_UNAVAILABLE);
}
}
static void notify_on_locked(grpc_fd* fd, grpc_closure** st,
grpc_closure* closure) {
if (fd->shutdown || gpr_atm_no_barrier_load(&fd->pollhup)) {
- GRPC_CLOSURE_SCHED(closure,
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("FD shutdown"));
+ GRPC_CLOSURE_SCHED(
+ closure, grpc_error_set_int(
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("FD shutdown"),
+ GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
} else if (*st == CLOSURE_NOT_READY) {
/* not ready ==> switch to a waiting state by setting the closure */
*st = closure;
diff --git a/src/core/lib/iomgr/resolve_address_posix.cc b/src/core/lib/iomgr/resolve_address_posix.cc
index 131a8de30a..3eea709ce4 100644
--- a/src/core/lib/iomgr/resolve_address_posix.cc
+++ b/src/core/lib/iomgr/resolve_address_posix.cc
@@ -27,12 +27,12 @@
#include <sys/types.h>
#include <grpc/support/alloc.h>
-#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/block_annotate.h"
diff --git a/src/core/lib/iomgr/resolve_address_uv.cc b/src/core/lib/iomgr/resolve_address_uv.cc
index 886c06cdb7..6eb6fe3af5 100644
--- a/src/core/lib/iomgr/resolve_address_uv.cc
+++ b/src/core/lib/iomgr/resolve_address_uv.cc
@@ -22,10 +22,10 @@
#include <uv.h>
#include <grpc/support/alloc.h>
-#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
diff --git a/src/core/lib/iomgr/resolve_address_windows.cc b/src/core/lib/iomgr/resolve_address_windows.cc
index e44ab396b3..e875d77fd8 100644
--- a/src/core/lib/iomgr/resolve_address_windows.cc
+++ b/src/core/lib/iomgr/resolve_address_windows.cc
@@ -28,12 +28,13 @@
#include <sys/types.h>
#include <grpc/support/alloc.h>
-#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/log_windows.h>
#include <grpc/support/string_util.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/executor.h"
diff --git a/src/core/lib/iomgr/sockaddr_utils.cc b/src/core/lib/iomgr/sockaddr_utils.cc
index 71e3e38624..ac97af4dee 100644
--- a/src/core/lib/iomgr/sockaddr_utils.cc
+++ b/src/core/lib/iomgr/sockaddr_utils.cc
@@ -23,11 +23,11 @@
#include <string.h>
#include <grpc/support/alloc.h>
-#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/string_util.h>
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/socket_utils.h"
diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc
index 5068a8081d..d02d77eb02 100644
--- a/src/core/lib/iomgr/socket_utils_common_posix.cc
+++ b/src/core/lib/iomgr/socket_utils_common_posix.cc
@@ -36,10 +36,11 @@
#include <unistd.h>
#include <grpc/support/alloc.h>
-#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/sync.h>
+
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"