|
|
|
@ -1708,16 +1708,20 @@ static bool is_epoll_available() { |
|
|
|
|
|
|
|
|
|
const grpc_event_engine_vtable *grpc_init_epollsig_linux( |
|
|
|
|
bool explicit_request) { |
|
|
|
|
const char *error_msg = NULL; |
|
|
|
|
/* If use of signals is disabled, we cannot use epoll engine*/ |
|
|
|
|
if (is_grpc_wakeup_signal_initialized && grpc_wakeup_signal < 0) { |
|
|
|
|
gpr_log(GPR_ERROR, "Skipping epollsig because use of signals is disabled."); |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!grpc_has_wakeup_fd()) { |
|
|
|
|
gpr_log(GPR_ERROR, "Skipping epollsig because of no wakeup fd."); |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!is_epoll_available()) { |
|
|
|
|
gpr_log(GPR_ERROR, "Skipping epollsig because epoll is unavailable."); |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1725,6 +1729,8 @@ const grpc_event_engine_vtable *grpc_init_epollsig_linux( |
|
|
|
|
if (explicit_request) { |
|
|
|
|
grpc_use_signal(SIGRTMIN + 6); |
|
|
|
|
} else { |
|
|
|
|
gpr_log(GPR_ERROR, |
|
|
|
|
"Skipping epollsig because uninitialized wakeup signal."); |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1750,6 +1756,8 @@ const grpc_event_engine_vtable *grpc_init_epollsig_linux( |
|
|
|
|
* NULL */ |
|
|
|
|
const grpc_event_engine_vtable *grpc_init_epollsig_linux( |
|
|
|
|
bool explicit_request) { |
|
|
|
|
gpr_log(GPR_ERROR, |
|
|
|
|
"Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined."); |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
#endif /* defined(GRPC_POSIX_SOCKET) */ |
|
|
|
|