Skip to content

Commit

Permalink
lib: Substitute poll APIs with epoll APIs in thread management routine
Browse files Browse the repository at this point in the history
This commit substitutes poll APIs with epoll APIs for better performace. Note that epoll APIs are only available for Linux. For BSD platforms which do not support epoll APIs, poll APIs are still used.

Signed-off-by: Kaifei Peng <[email protected]>
  • Loading branch information
ponedo committed Oct 31, 2023
1 parent e1b2381 commit f8becdb
Show file tree
Hide file tree
Showing 3 changed files with 1,060 additions and 2 deletions.
9 changes: 9 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,15 @@ AC_SUBST([LIBM])
AC_CHECK_FUNCS([ppoll], [
AC_DEFINE([HAVE_PPOLL], [1], [have Linux/BSD ppoll()])
])
AC_CHECK_FUNCS([epoll_wait], [
AC_DEFINE([HAVE_EPOLL_WAIT], [1], [have Linux epoll_wait()])
])
AC_CHECK_FUNCS([epoll_pwait], [
AC_DEFINE([HAVE_EPOLL_PWAIT], [1], [have Linux epoll_pwait()])
])
AC_CHECK_FUNCS([epoll_pwait2], [
AC_DEFINE([HAVE_EPOLL_PWAIT2], [1], [have Linux epoll_pwait2()])
])
AC_CHECK_FUNCS([pollts], [
AC_DEFINE([HAVE_POLLTS], [1], [have NetBSD pollts()])
])
Expand Down
Loading

0 comments on commit f8becdb

Please sign in to comment.