diff options
-rw-r--r-- | src/core/lib/iomgr/buffer_list.h | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_epoll1_linux.cc | 18 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_epollex_linux.cc | 18 | ||||
-rw-r--r-- | src/core/lib/iomgr/ev_epollsig_linux.cc | 18 | ||||
-rw-r--r-- | src/core/lib/iomgr/internal_errqueue.cc | 2 |
5 files changed, 12 insertions, 46 deletions
diff --git a/src/core/lib/iomgr/buffer_list.h b/src/core/lib/iomgr/buffer_list.h index 0f66dcc872..cbbf50a657 100644 --- a/src/core/lib/iomgr/buffer_list.h +++ b/src/core/lib/iomgr/buffer_list.h @@ -31,6 +31,8 @@ namespace grpc_core { struct Timestamps { + /* TODO(yashykt): This would also need to store OPTSTAT once support is added + */ gpr_timespec sendmsg_time; gpr_timespec scheduled_time; gpr_timespec sent_time; diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index e8ee5c4ce9..86a0243d2e 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -386,27 +386,15 @@ static bool fd_is_shutdown(grpc_fd* fd) { } static void fd_notify_on_read(grpc_fd* fd, grpc_closure* closure) { - if (closure != nullptr) { - fd->read_closure->NotifyOn(closure); - } else { - fd->read_closure->SetReady(); - } + fd->read_closure->NotifyOn(closure); } static void fd_notify_on_write(grpc_fd* fd, grpc_closure* closure) { - if (closure != nullptr) { - fd->write_closure->NotifyOn(closure); - } else { - fd->write_closure->SetReady(); - } + fd->write_closure->NotifyOn(closure); } static void fd_notify_on_error(grpc_fd* fd, grpc_closure* closure) { - if (closure != nullptr) { - fd->error_closure->NotifyOn(closure); - } else { - fd->error_closure->SetReady(); - } + fd->error_closure->NotifyOn(closure); } static void fd_become_readable(grpc_fd* fd, grpc_pollset* notifier) { diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc index b17aa90573..7b368410cf 100644 --- a/src/core/lib/iomgr/ev_epollex_linux.cc +++ b/src/core/lib/iomgr/ev_epollex_linux.cc @@ -539,27 +539,15 @@ static void fd_shutdown(grpc_fd* fd, grpc_error* why) { } static void fd_notify_on_read(grpc_fd* fd, grpc_closure* closure) { - if (closure != nullptr) { - fd->read_closure->NotifyOn(closure); - } else { - fd->read_closure->SetReady(); - } + fd->read_closure->NotifyOn(closure); } static void fd_notify_on_write(grpc_fd* fd, grpc_closure* closure) { - if (closure != nullptr) { - fd->write_closure->NotifyOn(closure); - } else { - fd->write_closure->SetReady(); - } + fd->write_closure->NotifyOn(closure); } static void fd_notify_on_error(grpc_fd* fd, grpc_closure* closure) { - if (closure != nullptr) { - fd->error_closure->NotifyOn(closure); - } else { - fd->error_closure->SetReady(); - } + fd->error_closure->NotifyOn(closure); } /******************************************************************************* diff --git a/src/core/lib/iomgr/ev_epollsig_linux.cc b/src/core/lib/iomgr/ev_epollsig_linux.cc index 7bdfa22b8e..2189801c18 100644 --- a/src/core/lib/iomgr/ev_epollsig_linux.cc +++ b/src/core/lib/iomgr/ev_epollsig_linux.cc @@ -947,27 +947,15 @@ static void fd_shutdown(grpc_fd* fd, grpc_error* why) { } static void fd_notify_on_read(grpc_fd* fd, grpc_closure* closure) { - if (closure != nullptr) { - fd->read_closure->NotifyOn(closure); - } else { - fd->read_closure->SetReady(); - } + fd->read_closure->NotifyOn(closure); } static void fd_notify_on_write(grpc_fd* fd, grpc_closure* closure) { - if (closure != nullptr) { - fd->write_closure->NotifyOn(closure); - } else { - fd->write_closure->SetReady(); - } + fd->write_closure->NotifyOn(closure); } static void fd_notify_on_error(grpc_fd* fd, grpc_closure* closure) { - if (closure != nullptr) { - fd->error_closure->NotifyOn(closure); - } else { - fd->error_closure->SetReady(); - } + fd->error_closure->NotifyOn(closure); } /******************************************************************************* diff --git a/src/core/lib/iomgr/internal_errqueue.cc b/src/core/lib/iomgr/internal_errqueue.cc index 3f3da66840..8823737e49 100644 --- a/src/core/lib/iomgr/internal_errqueue.cc +++ b/src/core/lib/iomgr/internal_errqueue.cc @@ -30,7 +30,7 @@ bool kernel_supports_errqueue() { #ifdef LINUX_VERSION_CODE -#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 0, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) return true; #endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(4, 0, 0) */ #endif /* LINUX_VERSION_CODE */ |