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