diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-10-25 12:38:13 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-15 03:29:29 +0100 |
commit | f927efd77a8e75e330b3592996277ad6e6eb6a8d (patch) | |
tree | b7226a2eb337446a9a256b28fae469d9847b5b3b /configure | |
parent | dbfa6518890f4e6c4af6da92df45803ecfe0309a (diff) |
Add support for Linux eventfd(7) in the UNIX event loop
eventfd(7) uses less resources than a pipe, as it only needs to store a
single 64-bit integer, as opposed to a full buffer.
It was introduced first on Linux version 2.6.22 and glibc 2.7. However,
both the configure-time test and the runtime usage require the use of
EFD_CLOEXEC for thread-safety, so this code will be enabled only for
Linux 2.6.27 and up as well as glibc 2.9 and up.
Change-Id: Ic7e10b28d7b1d4ca24be614ed84055c4429a68e4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -842,6 +842,7 @@ CFG_GETADDRINFO=auto CFG_IPV6IFNAME=auto CFG_GETIFADDRS=auto CFG_INOTIFY=auto +CFG_EVENTFD=auto CFG_RPATH=yes CFG_FRAMEWORK=auto CFG_MAC_HARFBUZZ=no @@ -5099,6 +5100,23 @@ if [ "$CFG_INOTIFY" != "no" ]; then fi fi +# find if the platform provides eventfd +if [ "$CFG_EVENTFD" != "no" ]; then + if compileTest unix/eventfd "eventfd"; then + CFG_EVENTFD=yes + else + if [ "$CFG_EVENTFD" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "eventfd support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_EVENTFD=no + fi + fi +fi + # find if the platform provides if_nametoindex (ipv6 interface name support) if [ "$CFG_IPV6IFNAME" != "no" ]; then if compileTest unix/ipv6ifname "IPv6 interface name"; then @@ -5386,6 +5404,9 @@ fi if [ "$CFG_INOTIFY" = "yes" ]; then QT_CONFIG="$QT_CONFIG inotify" fi +if [ "$CFG_EVENTFD" = "yes" ]; then + QT_CONFIG="$QT_CONFIG eventfd" +fi if [ "$CFG_LIBJPEG" = "no" ]; then CFG_JPEG="no" elif [ "$CFG_LIBJPEG" = "system" ]; then @@ -5862,6 +5883,7 @@ QMakeVar set sql-plugins "$SQL_PLUGINS" [ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME" [ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS" [ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY" +[ "$CFG_EVENTFD" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EVENTFD" [ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS" [ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL" [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL" |