|
|
|
@ -36,6 +36,7 @@ |
|
|
|
|
#include "src/core/lib/iomgr/ev_epoll1_linux.h" |
|
|
|
|
#include "src/core/lib/iomgr/ev_epollex_linux.h" |
|
|
|
|
#include "src/core/lib/iomgr/ev_poll_posix.h" |
|
|
|
|
#include "src/core/lib/iomgr/internal_errqueue.h" |
|
|
|
|
|
|
|
|
|
grpc_core::TraceFlag grpc_polling_trace(false, |
|
|
|
|
"polling"); /* Disabled by default */ |
|
|
|
@ -236,19 +237,18 @@ void grpc_event_engine_shutdown(void) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool grpc_event_engine_can_track_errors(void) { |
|
|
|
|
/* Only track errors if platform supports errqueue. */ |
|
|
|
|
#ifdef GRPC_LINUX_ERRQUEUE |
|
|
|
|
return g_event_engine->can_track_err; |
|
|
|
|
#else |
|
|
|
|
/* Only track errors if platform supports errqueue. */ |
|
|
|
|
if (grpc_core::kernel_supports_errqueue()) { |
|
|
|
|
return g_event_engine->can_track_err; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
#endif /* GRPC_LINUX_ERRQUEUE */ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
grpc_fd* grpc_fd_create(int fd, const char* name, bool track_err) { |
|
|
|
|
GRPC_POLLING_API_TRACE("fd_create(%d, %s, %d)", fd, name, track_err); |
|
|
|
|
GRPC_FD_TRACE("fd_create(%d, %s, %d)", fd, name, track_err); |
|
|
|
|
return g_event_engine->fd_create(fd, name, |
|
|
|
|
track_err && g_event_engine->can_track_err); |
|
|
|
|
return g_event_engine->fd_create( |
|
|
|
|
fd, name, track_err && grpc_event_engine_can_track_errors()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int grpc_fd_wrapped_fd(grpc_fd* fd) { |
|
|
|
|