Revert semantic changes for fd_notify_on_*

reviewable/pr15941/r3
Yash Tibrewal 6 years ago
parent 0d757a659f
commit 0ec6973b74
  1. 2
      src/core/lib/iomgr/buffer_list.h
  2. 18
      src/core/lib/iomgr/ev_epoll1_linux.cc
  3. 18
      src/core/lib/iomgr/ev_epollex_linux.cc
  4. 18
      src/core/lib/iomgr/ev_epollsig_linux.cc
  5. 2
      src/core/lib/iomgr/internal_errqueue.cc

@ -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;

@ -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) {

@ -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);
}
/*******************************************************************************

@ -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);
}
/*******************************************************************************

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

Loading…
Cancel
Save