Skip to content
Snippets Groups Projects
Commit ace24893 authored by Jan Tattermusch's avatar Jan Tattermusch Committed by GitHub
Browse files

Merge pull request #7151 from dgquintas/eventfd

implemented eventfd_check_availability
parents dc733d69 84d2e479
No related branches found
No related tags found
No related merge requests found
...@@ -84,8 +84,10 @@ static void eventfd_destroy(grpc_wakeup_fd* fd_info) { ...@@ -84,8 +84,10 @@ static void eventfd_destroy(grpc_wakeup_fd* fd_info) {
} }
static int eventfd_check_availability(void) { static int eventfd_check_availability(void) {
/* TODO(klempner): Actually check if eventfd is available */ const int efd = eventfd(0, 0);
return 1; const int is_available = efd >= 0;
if (is_available) close(efd);
return is_available;
} }
const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable = { const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment