commit userspace-rcu for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package userspace-rcu for openSUSE:Factory checked in at 2022-08-30 14:48:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/userspace-rcu (Old) and /work/SRC/openSUSE:Factory/.userspace-rcu.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "userspace-rcu" Tue Aug 30 14:48:24 2022 rev:19 rq:999897 version:0.13.2 Changes: -------- --- /work/SRC/openSUSE:Factory/userspace-rcu/userspace-rcu.changes 2022-01-29 21:01:31.334899857 +0100 +++ /work/SRC/openSUSE:Factory/.userspace-rcu.new.2083/userspace-rcu.changes 2022-08-30 14:48:28.763967231 +0200 @@ -1,0 +2,19 @@ +Fri Aug 19 14:30:31 UTC 2022 - Alexei Sorokin <sor.alexei@meowr.ru> + +- Update to version 0.13.2: + * Revert "Fix: remove type constness in URCU_FORCE_CAST's C++ + version". + * Fix: futex.h: include headers outside extern C. + * Fix: add missing unused attribute to _rcu_dereference. + * Fix: change method used by _rcu_dereference to strip type constness. + * Fix: remove type constness in URCU_FORCE_CAST's C++ version. + * Move extern "C" down in include/urcu/urcu-bp.h. + * Fix: ifdef linux specific cpu count compat. + * Set git-review branch to stable-0.13. + * Fix: sysconf(_SC_NPROCESSORS_CONF) can be less than max cpu id. + * Fix: revise obsolete command in README.md. + * Fix: workqueue: remove unused variable "ret". + * Fix: futex wait: handle spurious futex wakeups. + * Fix: Use %lu rather than %ld to print count. + +------------------------------------------------------------------- Old: ---- userspace-rcu-0.13.1.tar.bz2 userspace-rcu-0.13.1.tar.bz2.asc New: ---- userspace-rcu-0.13.2.tar.bz2 userspace-rcu-0.13.2.tar.bz2.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ userspace-rcu.spec ++++++ --- /var/tmp/diff_new_pack.SYZZUN/_old 2022-08-30 14:48:29.403968863 +0200 +++ /var/tmp/diff_new_pack.SYZZUN/_new 2022-08-30 14:48:29.403968863 +0200 @@ -20,7 +20,7 @@ %define soname 8 Name: userspace-rcu -Version: 0.13.1 +Version: 0.13.2 Release: 0 Summary: Userspace Read-Copy-Update Library License: GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND GPL-3.0-or-later ++++++ userspace-rcu-0.13.1.tar.bz2 -> userspace-rcu-0.13.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/ChangeLog new/userspace-rcu-0.13.2/ChangeLog --- old/userspace-rcu-0.13.1/ChangeLog 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/ChangeLog 2022-08-18 21:36:34.000000000 +0200 @@ -1,3 +1,23 @@ +2022-08-18 Userspace RCU 0.13.2 + * Revert "Fix: remove type constness in URCU_FORCE_CAST's C++ version" + * Fix: futex.h: include headers outside extern C + * Fix: add missing unused attribute to _rcu_dereference + * Fix: change method used by _rcu_dereference to strip type constness + * Fix: remove type constness in URCU_FORCE_CAST's C++ version + * Move extern "C" down in include/urcu/urcu-bp.h + * fix: ifdef linux specific cpu count compat + * Set git-review branch to stable-0.13 + * fix: sysconf(_SC_NPROCESSORS_CONF) can be less than max cpu id + * Fix: revise obsolete command in README.md + * Fix: workqueue: remove unused variable "ret" + * Fix: urcu-qsbr: futex wait: handle spurious futex wakeups + * Fix: urcu: futex wait: handle spurious futex wakeups + * Fix: urcu-wait: futex wait: handle spurious futex wakeups + * Fix: defer_rcu: futex wait: handle spurious futex wakeups + * Fix: call_rcu: futex wait: handle spurious futex wakeups + * Fix: workqueue: futex wait: handle spurious futex wakeups + * Fix: Use %lu rather than %ld to print count + 2022-01-05 Userspace RCU 0.13.1 * fix: properly detect 'cmpxchg' on x86-32 * fix: use urcu-tls compat with c++ compiler diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/Makefile.in new/userspace-rcu-0.13.2/Makefile.in --- old/userspace-rcu-0.13.1/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/Makefile.in 2022-08-18 21:38:19.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -246,6 +246,8 @@ GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.bz2 DIST_TARGETS = dist-bzip2 +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -659,6 +661,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -701,6 +707,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -716,7 +724,7 @@ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -881,18 +889,19 @@ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-data install-data-am \ - install-dist_docDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-dist_docDATA + dist-xz dist-zip dist-zstd distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dist_docDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-dist_docDATA .PRECIOUS: Makefile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/README.md new/userspace-rcu-0.13.2/README.md --- old/userspace-rcu-0.13.1/README.md 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/README.md 2022-08-18 21:35:29.000000000 +0200 @@ -423,14 +423,15 @@ ------------ In addition to the usual `make check` target, Userspace RCU features -`make regtest` and `make bench` targets: +`make regtest`, `make short_bench` and `make long_bench` targets: - `make check`: short tests, meant to be run when rebuilding or porting Userspace RCU. - `make regtest`: long (many hours) test, meant to be run when modifying Userspace RCU or porting it to a new architecture or operating system. - - `make bench`: long (many hours) benchmarks. + - `make short_bench`: short benchmarks, 3 seconds per test. + - `make long_bench`: long (many hours) benchmarks, 30 seconds per test. Known issues diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/aclocal.m4 new/userspace-rcu-0.13.2/aclocal.m4 --- old/userspace-rcu-0.13.1/aclocal.m4 2022-01-05 21:38:31.000000000 +0100 +++ new/userspace-rcu-0.13.2/aclocal.m4 2022-08-18 21:38:19.000000000 +0200 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.3 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +332,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -371,7 +371,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -398,7 +400,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -595,7 +597,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -616,7 +618,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -638,7 +640,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -673,7 +675,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -716,7 +718,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -737,12 +739,7 @@ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -755,7 +752,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -784,7 +781,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -831,7 +828,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -850,7 +847,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -931,7 +928,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -991,7 +988,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1019,7 +1016,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1038,7 +1035,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/configure new/userspace-rcu-0.13.2/configure --- old/userspace-rcu-0.13.1/configure 2022-01-05 21:38:33.000000000 +0100 +++ new/userspace-rcu-0.13.2/configure 2022-08-18 21:38:20.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for userspace-rcu 0.13.1. +# Generated by GNU Autoconf 2.69 for userspace-rcu 0.13.2. # # Report bugs to <mathieu dot desnoyers at efficios dot com>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='userspace-rcu' PACKAGE_TARNAME='userspace-rcu' -PACKAGE_VERSION='0.13.1' -PACKAGE_STRING='userspace-rcu 0.13.1' +PACKAGE_VERSION='0.13.2' +PACKAGE_STRING='userspace-rcu 0.13.2' PACKAGE_BUGREPORT='mathieu dot desnoyers at efficios dot com' PACKAGE_URL='http://liburcu.org/' @@ -1352,7 +1352,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures userspace-rcu 0.13.1 to adapt to many kinds of systems. +\`configure' configures userspace-rcu 0.13.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1424,7 +1424,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of userspace-rcu 0.13.1:";; + short | recursive ) echo "Configuration of userspace-rcu 0.13.2:";; esac cat <<\_ACEOF @@ -1553,7 +1553,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -userspace-rcu configure 0.13.1 +userspace-rcu configure 0.13.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2106,7 +2106,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by userspace-rcu $as_me 0.13.1, which was +It was created by userspace-rcu $as_me 0.13.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2784,12 +2784,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -3094,7 +3089,7 @@ # Define the identity of the package. PACKAGE='userspace-rcu' - VERSION='0.13.1' + VERSION='0.13.2' cat >>confdefs.h <<_ACEOF @@ -15834,7 +15829,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by userspace-rcu $as_me 0.13.1, which was +This file was extended by userspace-rcu $as_me 0.13.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15901,7 +15896,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -userspace-rcu config.status 0.13.1 +userspace-rcu config.status 0.13.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -17073,7 +17068,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/configure.ac new/userspace-rcu-0.13.2/configure.ac --- old/userspace-rcu-0.13.1/configure.ac 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/configure.ac 2022-08-18 21:36:41.000000000 +0200 @@ -7,7 +7,7 @@ # Project version information m4_define([urcu_version_major], [0]) m4_define([urcu_version_minor], [13]) -m4_define([urcu_version_patch], [1]) +m4_define([urcu_version_patch], [2]) m4_define([urcu_version_dev_stage], []) m4_define([urcu_version], urcu_version_major[.]urcu_version_minor[.]urcu_version_patch[]urcu_version_dev_stage) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/doc/Makefile.in new/userspace-rcu-0.13.2/doc/Makefile.in --- old/userspace-rcu-0.13.1/doc/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/doc/Makefile.in 2022-08-18 21:38:19.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/doc/examples/Makefile.in new/userspace-rcu-0.13.2/doc/examples/Makefile.in --- old/userspace-rcu-0.13.1/doc/examples/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/doc/examples/Makefile.in 2022-08-18 21:38:19.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/extras/Makefile.in new/userspace-rcu-0.13.2/extras/Makefile.in --- old/userspace-rcu-0.13.1/extras/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/extras/Makefile.in 2022-08-18 21:38:19.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/include/Makefile.in new/userspace-rcu-0.13.2/include/Makefile.in --- old/userspace-rcu-0.13.1/include/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/include/Makefile.in 2022-08-18 21:38:19.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -160,8 +160,8 @@ "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) $(nobase_include_HEADERS) \ $(nobase_nodist_include_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/include/urcu/futex.h new/userspace-rcu-0.13.2/include/urcu/futex.h --- old/userspace-rcu-0.13.1/include/urcu/futex.h 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/include/urcu/futex.h 2022-08-18 20:49:13.000000000 +0200 @@ -30,6 +30,23 @@ #include <stdint.h> #include <time.h> +#if (defined(__linux__) && defined(__NR_futex)) + +/* For backwards compat */ +#define CONFIG_RCU_HAVE_FUTEX 1 + +#include <unistd.h> +#include <errno.h> +#include <urcu/compiler.h> +#include <urcu/arch.h> + +#elif defined(__FreeBSD__) + +#include <sys/types.h> +#include <sys/umtx.h> + +#endif + #ifdef __cplusplus extern "C" { #endif @@ -58,14 +75,6 @@ #if (defined(__linux__) && defined(__NR_futex)) -/* For backwards compat */ -#define CONFIG_RCU_HAVE_FUTEX 1 - -#include <unistd.h> -#include <errno.h> -#include <urcu/compiler.h> -#include <urcu/arch.h> - static inline int futex(int32_t *uaddr, int op, int32_t val, const struct timespec *timeout, int32_t *uaddr2, int32_t val3) { @@ -111,9 +120,6 @@ #elif defined(__FreeBSD__) -#include <sys/types.h> -#include <sys/umtx.h> - static inline int futex_async(int32_t *uaddr, int op, int32_t val, const struct timespec *timeout, int32_t *uaddr2 __attribute__((unused)), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/include/urcu/static/pointer.h new/userspace-rcu-0.13.2/include/urcu/static/pointer.h --- old/userspace-rcu-0.13.1/include/urcu/static/pointer.h 2022-01-05 21:04:04.000000000 +0100 +++ new/userspace-rcu-0.13.2/include/urcu/static/pointer.h 2022-08-18 20:47:11.000000000 +0200 @@ -93,12 +93,15 @@ /* * If p is const (the pointer itself, not what it points to), using * __typeof__(p) would declare a const variable, leading to - * -Wincompatible-pointer-types errors. Using `+ 0` makes it an rvalue and - * gets rid of the const-ness. + * -Wincompatible-pointer-types errors. Using the statement expression + * makes it an rvalue and gets rid of the const-ness. */ #ifdef __URCU_DEREFERENCE_USE_ATOMIC_CONSUME # define _rcu_dereference(p) __extension__ ({ \ - __typeof__(p + 0) _________p1; \ + __typeof__(__extension__ ({ \ + __typeof__(p) __attribute__((unused)) _________p0 = { 0 }; \ + _________p0; \ + })) _________p1; \ __atomic_load(&(p), &_________p1, __ATOMIC_CONSUME); \ (_________p1); \ }) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/include/urcu/urcu-bp.h new/userspace-rcu-0.13.2/include/urcu/urcu-bp.h --- old/userspace-rcu-0.13.1/include/urcu/urcu-bp.h 2022-01-05 21:36:47.000000000 +0100 +++ new/userspace-rcu-0.13.2/include/urcu/urcu-bp.h 2022-08-18 20:47:11.000000000 +0200 @@ -37,10 +37,6 @@ #include <stdlib.h> #include <pthread.h> -#ifdef __cplusplus -extern "C" { -#endif - #include <urcu/map/urcu-bp.h> /* @@ -57,6 +53,10 @@ */ #include <urcu/pointer.h> +#ifdef __cplusplus +extern "C" { +#endif + #ifdef _LGPL_SOURCE #include <urcu/static/urcu-bp.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/Makefile.am new/userspace-rcu-0.13.2/src/Makefile.am --- old/userspace-rcu-0.13.1/src/Makefile.am 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/Makefile.am 2022-08-18 20:49:13.000000000 +0200 @@ -5,7 +5,7 @@ AM_LDFLAGS=-version-info $(URCU_LIBRARY_VERSION) $(LT_NO_UNDEFINED) dist_noinst_HEADERS = urcu-die.h urcu-wait.h compat-getcpu.h \ - compat-rand.h urcu-utils.h + compat-rand.h urcu-utils.h compat-smp.h COMPAT = compat_arch.c compat_futex.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/Makefile.in new/userspace-rcu-0.13.2/src/Makefile.in --- old/userspace-rcu-0.13.1/src/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/Makefile.in 2022-08-18 21:38:19.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -450,7 +450,7 @@ # library that use the version-info AM_LDFLAGS = -version-info $(URCU_LIBRARY_VERSION) $(LT_NO_UNDEFINED) dist_noinst_HEADERS = urcu-die.h urcu-wait.h compat-getcpu.h \ - compat-rand.h urcu-utils.h + compat-rand.h urcu-utils.h compat-smp.h COMPAT = compat_arch.c compat_futex.c RCULFHASH = rculfhash.c rculfhash-mm-order.c rculfhash-mm-chunk.c \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/compat-smp.h new/userspace-rcu-0.13.2/src/compat-smp.h --- old/userspace-rcu-0.13.1/src/compat-smp.h 1970-01-01 01:00:00.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/compat-smp.h 2022-08-18 20:47:11.000000000 +0200 @@ -0,0 +1,275 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + * Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com> + */ + +#include <assert.h> +#include <ctype.h> +#include <dirent.h> +#include <errno.h> +#include <fcntl.h> +#include <limits.h> +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#include <urcu/compiler.h> + +#define URCU_CPUMASK_SIZE 4096 + +#if defined(HAVE_SYSCONF) +static inline int get_num_possible_cpus_sysconf(void) +{ + return sysconf(_SC_NPROCESSORS_CONF); +} +#else +/* + * On platforms without sysconf(), always return -1. + */ +static inline int get_num_possible_cpus_sysconf(void) +{ + return -1; +} +#endif + +#ifdef __linux__ +/* + * Get the highest CPU id from sysfs. + * + * Iterate on all the folders in "/sys/devices/system/cpu" that start with + * "cpu" followed by an integer, keep the highest CPU id encountered during + * this iteration and add 1 to get a number of CPUs. + * + * Returns the highest CPU id, or -1 on error. + */ +static inline int _get_max_cpuid_from_sysfs(const char *path) +{ + long max_cpuid = -1; + + DIR *cpudir; + struct dirent *entry; + + assert(path); + + cpudir = opendir(path); + if (cpudir == NULL) + goto end; + + /* + * Iterate on all directories named "cpu" followed by an integer. + */ + while ((entry = readdir(cpudir))) { + if (entry->d_type == DT_DIR && + strncmp(entry->d_name, "cpu", 3) == 0) { + + char *endptr; + long cpu_id; + + cpu_id = strtol(entry->d_name + 3, &endptr, 10); + if ((cpu_id < LONG_MAX) && (endptr != entry->d_name + 3) + && (*endptr == '\0')) { + if (cpu_id > max_cpuid) + max_cpuid = cpu_id; + } + } + } + + if (closedir(cpudir)) + perror("closedir"); + + /* + * If the max CPU id is out of bound, set it to -1 so it results in a + * CPU num of 0. + */ + if (max_cpuid < 0 || max_cpuid > INT_MAX) + max_cpuid = -1; + +end: + return max_cpuid; +} + +static inline int get_max_cpuid_from_sysfs(void) +{ + return _get_max_cpuid_from_sysfs("/sys/devices/system/cpu"); +} + + +/* + * As a fallback to parsing the CPU mask in "/sys/devices/system/cpu/possible", + * iterate on all the folders in "/sys/devices/system/cpu" that start with + * "cpu" followed by an integer, keep the highest CPU id encountered during + * this iteration and add 1 to get a number of CPUs. + * + * Then get the value from sysconf(_SC_NPROCESSORS_CONF) as a fallback and + * return the highest one. + * + * On Linux, using the value from sysconf can be unreliable since the way it + * counts CPUs varies between C libraries and even between versions of the same + * library. If we used it directly, getcpu() could return a value greater than + * this sysconf, in which case the arrays indexed by processor would overflow. + * + * As another example, the MUSL libc implementation of the _SC_NPROCESSORS_CONF + * sysconf does not return the number of configured CPUs in the system but + * relies on the cpu affinity mask of the current task. + * + * Returns 0 or less on error. + */ +static inline int get_num_possible_cpus_fallback(void) +{ + /* + * Get the sysconf value as a last resort. Keep the highest number. + */ + return caa_max(get_num_possible_cpus_sysconf(), get_max_cpuid_from_sysfs() + 1); +} + +/* + * Get a CPU mask string from sysfs. + * + * buf: the buffer where the mask will be read. + * max_bytes: the maximum number of bytes to write in the buffer. + * path: file path to read the mask from. + * + * Returns the number of bytes read or -1 on error. + */ +static inline int get_cpu_mask_from_sysfs(char *buf, size_t max_bytes, const char *path) +{ + ssize_t bytes_read = 0; + size_t total_bytes_read = 0; + int fd = -1, ret = -1; + + assert(path); + + if (buf == NULL) + goto end; + + fd = open(path, O_RDONLY); + if (fd < 0) + goto end; + + do { + bytes_read = read(fd, buf + total_bytes_read, + max_bytes - total_bytes_read); + + if (bytes_read < 0) { + if (errno == EINTR) { + continue; /* retry operation */ + } else { + goto end; + } + } + + total_bytes_read += bytes_read; + assert(total_bytes_read <= max_bytes); + } while (max_bytes > total_bytes_read && bytes_read > 0); + + /* + * Make sure the mask read is a null terminated string. + */ + if (total_bytes_read < max_bytes) + buf[total_bytes_read] = '\0'; + else + buf[max_bytes - 1] = '\0'; + + if (total_bytes_read > INT_MAX) + goto end; + + ret = (int) total_bytes_read; + +end: + if (fd >= 0 && close(fd) < 0) + perror("close"); + + return ret; +} + +/* + * Get the CPU possible mask string from sysfs. + * + * buf: the buffer where the mask will be read. + * max_bytes: the maximum number of bytes to write in the buffer. + * + * Returns the number of bytes read or -1 on error. + */ +static inline int get_possible_cpu_mask_from_sysfs(char *buf, size_t max_bytes) +{ + return get_cpu_mask_from_sysfs(buf, max_bytes, + "/sys/devices/system/cpu/possible"); +} + +/* + * Get the highest CPU id from the possible CPU mask. + * + * pmask: the mask to parse. + * len: the len of the mask excluding '\0'. + * + * Returns the highest CPU id from the mask or -1 on error. + */ +static inline int get_max_cpuid_from_mask(const char *pmask, size_t len) +{ + ssize_t i; + unsigned long cpu_index; + char *endptr; + + /* We need at least one char to read */ + if (len < 1) + goto error; + + /* Start from the end to read the last CPU index. */ + for (i = len - 1; i > 0; i--) { + /* Break when we hit the first separator. */ + if ((pmask[i] == ',') || (pmask[i] == '-')) { + i++; + break; + } + } + + cpu_index = strtoul(&pmask[i], &endptr, 10); + + if ((&pmask[i] != endptr) && (cpu_index < INT_MAX)) + return (int) cpu_index; + +error: + return -1; +} + +/* + * On Linux try sysfs first and fallback to sysconf. + */ +static inline int get_possible_cpus_array_len(void) +{ + int ret; + char buf[URCU_CPUMASK_SIZE]; + + /* Get the possible cpu mask from sysfs, fallback to sysconf. */ + ret = get_possible_cpu_mask_from_sysfs((char *) &buf, URCU_CPUMASK_SIZE); + if (ret <= 0) + goto fallback; + + /* Parse the possible cpu mask, on failure fallback to sysconf. */ + ret = get_max_cpuid_from_mask((char *) &buf, ret); + if (ret >= 0) { + /* Add 1 to convert from max cpuid to an array len. */ + ret++; + goto end; + } + +fallback: + /* Fallback to sysconf. */ + ret = get_num_possible_cpus_fallback(); + +end: + return ret; +} +#else +/* + * On other platforms, only use sysconf. + */ +static inline int get_possible_cpus_array_len(void) +{ + return get_num_possible_cpus_sysconf(); +} +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/rculfhash.c new/userspace-rcu-0.13.2/src/rculfhash.c --- old/userspace-rcu-0.13.1/src/rculfhash.c 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/rculfhash.c 2022-08-18 21:35:29.000000000 +0200 @@ -281,6 +281,7 @@ #include "workqueue.h" #include "urcu-die.h" #include "urcu-utils.h" +#include "compat-smp.h" /* * Split-counters lazily update the global counter each 1024 @@ -645,12 +646,11 @@ static long split_count_mask = -1; static int split_count_order = -1; -#if defined(HAVE_SYSCONF) static void ht_init_nr_cpus_mask(void) { long maxcpus; - maxcpus = sysconf(_SC_NPROCESSORS_CONF); + maxcpus = get_possible_cpus_array_len(); if (maxcpus <= 0) { nr_cpus_mask = -2; return; @@ -662,12 +662,6 @@ maxcpus = 1UL << cds_lfht_get_count_order_ulong(maxcpus); nr_cpus_mask = maxcpus - 1; } -#else /* #if defined(HAVE_SYSCONF) */ -static void ht_init_nr_cpus_mask(void) -{ - nr_cpus_mask = -2; -} -#endif /* #else #if defined(HAVE_SYSCONF) */ static void alloc_split_items_count(struct cds_lfht *ht) @@ -763,7 +757,7 @@ if ((count >> CHAIN_LEN_RESIZE_THRESHOLD) >= size) return; - dbg_printf("del set global %ld\n", count); + dbg_printf("del set global %lu\n", count); /* * Don't shrink table if the number of nodes is below a * certain threshold. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/urcu-call-rcu-impl.h new/userspace-rcu-0.13.2/src/urcu-call-rcu-impl.h --- old/userspace-rcu-0.13.1/src/urcu-call-rcu-impl.h 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/urcu-call-rcu-impl.h 2022-08-18 21:35:29.000000000 +0200 @@ -44,6 +44,7 @@ #include <urcu/ref.h> #include "urcu-die.h" #include "urcu-utils.h" +#include "compat-smp.h" #define SET_AFFINITY_CHECK_PERIOD (1U << 8) /* 256 */ #define SET_AFFINITY_CHECK_PERIOD_MASK (SET_AFFINITY_CHECK_PERIOD - 1) @@ -120,11 +121,11 @@ */ static struct call_rcu_data **per_cpu_call_rcu_data; -static long maxcpus; +static long cpus_array_len; -static void maxcpus_reset(void) +static void cpus_array_len_reset(void) { - maxcpus = 0; + cpus_array_len = 0; } /* Allocate the array if it has not already been allocated. */ @@ -134,15 +135,15 @@ struct call_rcu_data **p; static int warned = 0; - if (maxcpus != 0) + if (cpus_array_len != 0) return; - maxcpus = sysconf(_SC_NPROCESSORS_CONF); - if (maxcpus <= 0) { + cpus_array_len = get_possible_cpus_array_len(); + if (cpus_array_len <= 0) { return; } - p = malloc(maxcpus * sizeof(*per_cpu_call_rcu_data)); + p = malloc(cpus_array_len * sizeof(*per_cpu_call_rcu_data)); if (p != NULL) { - memset(p, '\0', maxcpus * sizeof(*per_cpu_call_rcu_data)); + memset(p, '\0', cpus_array_len * sizeof(*per_cpu_call_rcu_data)); rcu_set_pointer(&per_cpu_call_rcu_data, p); } else { if (!warned) { @@ -160,9 +161,9 @@ * constant. */ static struct call_rcu_data **per_cpu_call_rcu_data = NULL; -static const long maxcpus = -1; +static const long cpus_array_len = -1; -static void maxcpus_reset(void) +static void cpus_array_len_reset(void) { } @@ -240,17 +241,25 @@ { /* Read call_rcu list before read futex */ cmm_smp_mb(); - if (uatomic_read(&crdp->futex) != -1) - return; - while (futex_async(&crdp->futex, FUTEX_WAIT, -1, - NULL, NULL, 0)) { + while (uatomic_read(&crdp->futex) == -1) { + if (!futex_async(&crdp->futex, FUTEX_WAIT, -1, NULL, NULL, 0)) { + /* + * Prior queued wakeups queued by unrelated code + * using the same address can cause futex wait to + * return 0 even through the futex value is still + * -1 (spurious wakeups). Check the value again + * in user-space to validate whether it really + * differs from -1. + */ + continue; + } switch (errno) { - case EWOULDBLOCK: + case EAGAIN: /* Value already changed. */ return; case EINTR: /* Retry if interrupted by signal. */ - break; /* Get out of switch. */ + break; /* Get out of switch. Check again. */ default: /* Unexpected error. */ urcu_die(errno); @@ -274,17 +283,25 @@ { /* Read completion barrier count before read futex */ cmm_smp_mb(); - if (uatomic_read(&completion->futex) != -1) - return; - while (futex_async(&completion->futex, FUTEX_WAIT, -1, - NULL, NULL, 0)) { + while (uatomic_read(&completion->futex) == -1) { + if (!futex_async(&completion->futex, FUTEX_WAIT, -1, NULL, NULL, 0)) { + /* + * Prior queued wakeups queued by unrelated code + * using the same address can cause futex wait to + * return 0 even through the futex value is still + * -1 (spurious wakeups). Check the value again + * in user-space to validate whether it really + * differs from -1. + */ + continue; + } switch (errno) { - case EWOULDBLOCK: + case EAGAIN: /* Value already changed. */ return; case EINTR: /* Retry if interrupted by signal. */ - break; /* Get out of switch. */ + break; /* Get out of switch. Check again. */ default: /* Unexpected error. */ urcu_die(errno); @@ -454,11 +471,11 @@ pcpu_crdp = rcu_dereference(per_cpu_call_rcu_data); if (pcpu_crdp == NULL) return NULL; - if (!warned && maxcpus > 0 && (cpu < 0 || maxcpus <= cpu)) { + if (!warned && cpus_array_len > 0 && (cpu < 0 || cpus_array_len <= cpu)) { fprintf(stderr, "[error] liburcu: get CPU # out of range\n"); warned = 1; } - if (cpu < 0 || maxcpus <= cpu) + if (cpu < 0 || cpus_array_len <= cpu) return NULL; return rcu_dereference(pcpu_crdp[cpu]); } @@ -516,7 +533,7 @@ call_rcu_lock(&call_rcu_mutex); alloc_cpu_call_rcu_data(); - if (cpu < 0 || maxcpus <= cpu) { + if (cpu < 0 || cpus_array_len <= cpu) { if (!warned) { fprintf(stderr, "[error] liburcu: set CPU # out of range\n"); warned = 1; @@ -581,7 +598,7 @@ if (URCU_TLS(thread_call_rcu_data) != NULL) return URCU_TLS(thread_call_rcu_data); - if (maxcpus > 0) { + if (cpus_array_len > 0) { crd = get_cpu_call_rcu_data(urcu_sched_getcpu()); if (crd) return crd; @@ -632,7 +649,7 @@ call_rcu_lock(&call_rcu_mutex); alloc_cpu_call_rcu_data(); call_rcu_unlock(&call_rcu_mutex); - if (maxcpus <= 0) { + if (cpus_array_len <= 0) { errno = EINVAL; return -EINVAL; } @@ -640,7 +657,7 @@ errno = ENOMEM; return -ENOMEM; } - for (i = 0; i < maxcpus; i++) { + for (i = 0; i < cpus_array_len; i++) { call_rcu_lock(&call_rcu_mutex); if (get_cpu_call_rcu_data(i)) { call_rcu_unlock(&call_rcu_mutex); @@ -780,10 +797,10 @@ struct call_rcu_data **crdp; static int warned = 0; - if (maxcpus <= 0) + if (cpus_array_len <= 0) return; - crdp = malloc(sizeof(*crdp) * maxcpus); + crdp = malloc(sizeof(*crdp) * cpus_array_len); if (!crdp) { if (!warned) { fprintf(stderr, "[error] liburcu: unable to allocate per-CPU pointer array\n"); @@ -792,7 +809,7 @@ return; } - for (cpu = 0; cpu < maxcpus; cpu++) { + for (cpu = 0; cpu < cpus_array_len; cpu++) { crdp[cpu] = get_cpu_call_rcu_data(cpu); if (crdp[cpu] == NULL) continue; @@ -803,7 +820,7 @@ * call_rcu_data to become quiescent. */ synchronize_rcu(); - for (cpu = 0; cpu < maxcpus; cpu++) { + for (cpu = 0; cpu < cpus_array_len; cpu++) { if (crdp[cpu] == NULL) continue; call_rcu_data_free(crdp[cpu]); @@ -981,7 +998,7 @@ (void)get_default_call_rcu_data(); /* Cleanup call_rcu_data pointers before use */ - maxcpus_reset(); + cpus_array_len_reset(); free(per_cpu_call_rcu_data); rcu_set_pointer(&per_cpu_call_rcu_data, NULL); URCU_TLS(thread_call_rcu_data) = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/urcu-defer-impl.h new/userspace-rcu-0.13.2/src/urcu-defer-impl.h --- old/userspace-rcu-0.13.1/src/urcu-defer-impl.h 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/urcu-defer-impl.h 2022-08-18 21:35:29.000000000 +0200 @@ -194,17 +194,25 @@ uatomic_set(&defer_thread_futex, 0); } else { cmm_smp_rmb(); /* Read queue before read futex */ - if (uatomic_read(&defer_thread_futex) != -1) - return; - while (futex_noasync(&defer_thread_futex, FUTEX_WAIT, -1, - NULL, NULL, 0)) { + while (uatomic_read(&defer_thread_futex) == -1) { + if (!futex_noasync(&defer_thread_futex, FUTEX_WAIT, -1, NULL, NULL, 0)) { + /* + * Prior queued wakeups queued by unrelated code + * using the same address can cause futex wait to + * return 0 even through the futex value is still + * -1 (spurious wakeups). Check the value again + * in user-space to validate whether it really + * differs from -1. + */ + continue; + } switch (errno) { - case EWOULDBLOCK: + case EAGAIN: /* Value already changed. */ return; case EINTR: /* Retry if interrupted by signal. */ - break; /* Get out of switch. */ + break; /* Get out of switch. Check again. */ default: /* Unexpected error. */ urcu_die(errno); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/urcu-qsbr.c new/userspace-rcu-0.13.2/src/urcu-qsbr.c --- old/userspace-rcu-0.13.1/src/urcu-qsbr.c 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/urcu-qsbr.c 2022-08-18 21:35:29.000000000 +0200 @@ -123,17 +123,25 @@ { /* Read reader_gp before read futex */ cmm_smp_rmb(); - if (uatomic_read(&urcu_qsbr_gp.futex) != -1) - return; - while (futex_noasync(&urcu_qsbr_gp.futex, FUTEX_WAIT, -1, - NULL, NULL, 0)) { + while (uatomic_read(&urcu_qsbr_gp.futex) == -1) { + if (!futex_noasync(&urcu_qsbr_gp.futex, FUTEX_WAIT, -1, NULL, NULL, 0)) { + /* + * Prior queued wakeups queued by unrelated code + * using the same address can cause futex wait to + * return 0 even through the futex value is still + * -1 (spurious wakeups). Check the value again + * in user-space to validate whether it really + * differs from -1. + */ + continue; + } switch (errno) { - case EWOULDBLOCK: + case EAGAIN: /* Value already changed. */ return; case EINTR: /* Retry if interrupted by signal. */ - break; /* Get out of switch. */ + break; /* Get out of switch. Check again. */ default: /* Unexpected error. */ urcu_die(errno); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/urcu-wait.h new/userspace-rcu-0.13.2/src/urcu-wait.h --- old/userspace-rcu-0.13.1/src/urcu-wait.h 2022-01-05 21:16:16.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/urcu-wait.h 2022-08-18 21:35:29.000000000 +0200 @@ -153,15 +153,26 @@ goto skip_futex_wait; caa_cpu_relax(); } - while (futex_noasync(&wait->state, FUTEX_WAIT, URCU_WAIT_WAITING, - NULL, NULL, 0)) { + while (uatomic_read(&wait->state) == URCU_WAIT_WAITING) { + if (!futex_noasync(&wait->state, FUTEX_WAIT, URCU_WAIT_WAITING, NULL, NULL, 0)) { + /* + * Prior queued wakeups queued by unrelated code + * using the same address can cause futex wait to + * return 0 even through the futex value is still + * URCU_WAIT_WAITING (spurious wakeups). Check + * the value again in user-space to validate + * whether it really differs from + * URCU_WAIT_WAITING. + */ + continue; + } switch (errno) { - case EWOULDBLOCK: + case EAGAIN: /* Value already changed. */ goto skip_futex_wait; case EINTR: /* Retry if interrupted by signal. */ - break; /* Get out of switch. */ + break; /* Get out of switch. Check again. */ default: /* Unexpected error. */ urcu_die(errno); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/urcu.c new/userspace-rcu-0.13.2/src/urcu.c --- old/userspace-rcu-0.13.1/src/urcu.c 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/urcu.c 2022-08-18 21:35:29.000000000 +0200 @@ -259,17 +259,25 @@ smp_mb_master(); /* Temporarily unlock the registry lock. */ mutex_unlock(&rcu_registry_lock); - if (uatomic_read(&rcu_gp.futex) != -1) - goto end; - while (futex_async(&rcu_gp.futex, FUTEX_WAIT, -1, - NULL, NULL, 0)) { + while (uatomic_read(&rcu_gp.futex) == -1) { + if (!futex_async(&rcu_gp.futex, FUTEX_WAIT, -1, NULL, NULL, 0)) { + /* + * Prior queued wakeups queued by unrelated code + * using the same address can cause futex wait to + * return 0 even through the futex value is still + * -1 (spurious wakeups). Check the value again + * in user-space to validate whether it really + * differs from -1. + */ + continue; + } switch (errno) { - case EWOULDBLOCK: + case EAGAIN: /* Value already changed. */ goto end; case EINTR: /* Retry if interrupted by signal. */ - break; /* Get out of switch. */ + break; /* Get out of switch. Check again. */ default: /* Unexpected error. */ urcu_die(errno); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/src/workqueue.c new/userspace-rcu-0.13.2/src/workqueue.c --- old/userspace-rcu-0.13.1/src/workqueue.c 2022-01-05 21:38:11.000000000 +0100 +++ new/userspace-rcu-0.13.2/src/workqueue.c 2022-08-18 21:35:29.000000000 +0200 @@ -131,16 +131,25 @@ { /* Read condition before read futex */ cmm_smp_mb(); - if (uatomic_read(futex) != -1) - return; - while (futex_async(futex, FUTEX_WAIT, -1, NULL, NULL, 0)) { + while (uatomic_read(futex) == -1) { + if (!futex_async(futex, FUTEX_WAIT, -1, NULL, NULL, 0)) { + /* + * Prior queued wakeups queued by unrelated code + * using the same address can cause futex wait to + * return 0 even through the futex value is still + * -1 (spurious wakeups). Check the value again + * in user-space to validate whether it really + * differs from -1. + */ + continue; + } switch (errno) { - case EWOULDBLOCK: + case EAGAIN: /* Value already changed. */ return; case EINTR: /* Retry if interrupted by signal. */ - break; /* Get out of switch. */ + break; /* Get out of switch. Check again. */ default: /* Unexpected error. */ urcu_die(errno); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/tests/Makefile.in new/userspace-rcu-0.13.2/tests/Makefile.in --- old/userspace-rcu-0.13.1/tests/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/tests/Makefile.in 2022-08-18 21:38:19.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/tests/benchmark/Makefile.in new/userspace-rcu-0.13.2/tests/benchmark/Makefile.in --- old/userspace-rcu-0.13.1/tests/benchmark/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/tests/benchmark/Makefile.in 2022-08-18 21:38:19.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -733,6 +733,7 @@ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -1855,7 +1856,7 @@ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/tests/common/Makefile.in new/userspace-rcu-0.13.2/tests/common/Makefile.in --- old/userspace-rcu-0.13.1/tests/common/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/tests/common/Makefile.in 2022-08-18 21:38:20.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/tests/regression/Makefile.in new/userspace-rcu-0.13.2/tests/regression/Makefile.in --- old/userspace-rcu-0.13.1/tests/regression/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/tests/regression/Makefile.in 2022-08-18 21:38:20.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -483,6 +483,7 @@ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -1253,7 +1254,7 @@ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/tests/unit/Makefile.in new/userspace-rcu-0.13.2/tests/unit/Makefile.in --- old/userspace-rcu-0.13.1/tests/unit/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/tests/unit/Makefile.in 2022-08-18 21:38:20.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -437,6 +437,7 @@ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log @@ -1023,7 +1024,7 @@ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/userspace-rcu-0.13.1/tests/utils/Makefile.in new/userspace-rcu-0.13.2/tests/utils/Makefile.in --- old/userspace-rcu-0.13.1/tests/utils/Makefile.in 2022-01-05 21:38:34.000000000 +0100 +++ new/userspace-rcu-0.13.2/tests/utils/Makefile.in 2022-08-18 21:38:20.000000000 +0200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it,
participants (1)
-
Source-Sync