Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libatomic_ops for openSUSE:Factory checked in at 2022-08-30 14:48:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libatomic_ops (Old) and /work/SRC/openSUSE:Factory/.libatomic_ops.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libatomic_ops" Tue Aug 30 14:48:31 2022 rev:16 rq:999968 version:7.6.14 Changes: -------- --- /work/SRC/openSUSE:Factory/libatomic_ops/libatomic_ops.changes 2021-09-20 23:33:13.327178687 +0200 +++ /work/SRC/openSUSE:Factory/.libatomic_ops.new.2083/libatomic_ops.changes 2022-08-30 14:48:39.527994698 +0200 @@ -1,0 +2,6 @@ +Thu Aug 25 21:50:14 UTC 2022 - Jan Engelhardt <jeng...@inai.de> + +- Update to release 7.6.14 + * Avoid AO_stack_t to cross CPU cache line boundary + +------------------------------------------------------------------- Old: ---- libatomic_ops-7.6.12.tar.gz New: ---- libatomic_ops-7.6.14.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libatomic_ops.spec ++++++ --- /var/tmp/diff_new_pack.F9YIdz/_old 2022-08-30 14:48:40.039996004 +0200 +++ /var/tmp/diff_new_pack.F9YIdz/_new 2022-08-30 14:48:40.043996014 +0200 @@ -1,7 +1,7 @@ # # spec file for package libatomic_ops # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: libatomic_ops -Version: 7.6.12 +Version: 7.6.14 Release: 0 Summary: A portable library for atomic memory operations License: GPL-2.0-or-later AND MIT ++++++ libatomic_ops-7.6.12.tar.gz -> libatomic_ops-7.6.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/AUTHORS new/libatomic_ops-7.6.14/AUTHORS --- old/libatomic_ops-7.6.12/AUTHORS 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/AUTHORS 2022-08-25 21:17:13.000000000 +0200 @@ -12,6 +12,7 @@ Carlos O'Donell <car...@baldric.uwo.ca> Chris Metcalf <cmetc...@mellanox.com> Daniel Grayson <d...@math.uiuc.edu> +David Mosberger <dav...@hpl.hp.com> Doug Lea <d...@cs.oswego.edu> Earl Chew <earl_c...@agilent.com> Emmanuel Stapf <ma...@eiffel.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/ChangeLog new/libatomic_ops-7.6.14/ChangeLog --- old/libatomic_ops-7.6.12/ChangeLog 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/ChangeLog 2022-08-25 21:17:13.000000000 +0200 @@ -1,4 +1,23 @@ +== [7.6.14] 2022-08-25 == + +* Add note to README that AO malloc code has same license as AO stack +* Adjust/reformat content of LICENSING.txt +* Avoid AO_stack_t to cross CPU cache line boundary +* Do not assume 'ordered except earlier write' for UWP/arm64 +* Do not name GCC intrinsics as C11 ones in ChangeLog and configure +* Eliminate '-pedantic is not option that controls warnings' GCC-6.3 message +* Ensure result of AO_test_and_set is always AO_TS_CLEAR or AO_TS_SET +* Fix 'AO_malloc redefinition' MS VC warning caused by attributes mismatch +* Fix 'use of undeclared SIG_BLOCK' Clang error if -std=c89 on Cygwin +* Fix AO_compare_and_swap_full asm code for clang on sparc +* Fix a typo in comment of AO_stack_push_explicit_aux_release +* Fix code indentation in main() of test_stack.c +* Refine AO_UNIPROCESSOR macro description in configure +* Remove outdated comment about unsupported Win64 in atomic_ops_stack.h +* Repeat black list check on CAS fail in stack_push_explicit_aux_release + + == [7.6.12] 2021-09-13 == * Allow to generalize bool-CAS for sparc (gcc) @@ -134,16 +153,16 @@ * Fix missing double_compare_and_swap_dd_acquire_read * Fix reporting about missing and/or/xor_dd_acquire_read (test_atomic) * Hide AO_locks symbol -* Implement AO_CLEAR using C11 atomic intrinsic (GCC) +* Implement AO_CLEAR using atomic intrinsic (GCC) * Implement CAS_acquire/release/full using __atomic_compare_exchange_n (gcc) * Implement char and/or/xor and short CAS for msftc ARM and X86[_64] * Implement char CAS and char/short add for msftc X86[_64] (VS 2013+) -* Implement compiler_barrier using C11 __atomic_signal_fence (GCC) +* Implement compiler_barrier using __atomic_signal_fence (GCC) * Implement int CAS/inc/dec for msftc/x86_64 * Implement short inc/dec directly for msftc ARM and X86[_64] * Initial ibmc/powerpc (xlc) support * New configure option (--enable-werror) to treat warnings as compiler errors -* New macro AO_PREFER_BUILTIN_ATOMICS to rely on C11 atomics fully (AArch64) +* New macro AO_PREFER_BUILTIN_ATOMICS to rely on GCC atomics fully (AArch64) * Refine AO_nop_write comment for ARM big.LITTLE architecture * Refine configure messages when checking for compiler options * Refine documentation about _full memory ordering suffix @@ -173,6 +192,18 @@ Also, includes 7.4.6 changes +== [7.4.18] 2022-08-25 == + +* Avoid AO_stack_t to cross CPU cache line boundary +* Do not assume 'ordered except earlier write' for UWP/arm64 +* Ensure result of AO_test_and_set is always AO_TS_CLEAR or AO_TS_SET +* Fix 'use of undeclared SIG_BLOCK' Clang error if -std=c89 on Cygwin +* Fix a typo in comment of AO_stack_push_explicit_aux_release +* Fix code indentation in main of test_stack.c +* Remove outdated comment about unsupported Win64 in atomic_ops_stack.h +* Repeat black list check on CAS fail in stack_push_explicit_aux_release + + == [7.4.16] 2021-09-13 == * Fix gcc/sunc x86 AO_compare_double_and_swap_double missing side effect @@ -398,6 +429,15 @@ Also, includes 7.2 changes +== [7.2k] 2022-08-24 == + +* Avoid AO_stack_t to cross CPU cache line boundary +* Fix a typo in comment of AO_stack_push_explicit_aux_release +* Fix code indentation in main of test_stack.c +* Remove outdated comment about unsupported Win64 in atomic_ops_stack.h +* Repeat black list check on CAS fail in stack_push_explicit_aux_release + + == [7.2j] 2021-09-12 == * Fix a typo in arm_v6.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/README.md new/libatomic_ops-7.6.14/README.md --- old/libatomic_ops-7.6.12/README.md 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/README.md 2022-08-25 21:17:13.000000000 +0200 @@ -2,7 +2,7 @@ IN NEW CODE, PLEASE USE C11 OR C++14 STANDARD ATOMICS INSTEAD OF THIS PACKAGE. -This is version 7.6.12 of libatomic_ops. +This is version 7.6.14 of libatomic_ops. ## Download @@ -49,7 +49,7 @@ * `libatomic_ops.a` is a support library, which is not needed on some platforms. This is intended to be usable, under some mild restrictions, in free or proprietary code, as are all the header files. - See doc/LICENSING.txt. + See doc/LICENSING.txt for more details about the licensing. * `libatomic_ops_gpl.a` contains some higher level facilities. This code is currently covered by the GPL. The contents currently correspond to @@ -117,4 +117,5 @@ * Copyright (c) 2009 by Takashi YOSHII. All rights reserved. -See [LICENSING.txt](doc/LICENSING.txt) for the details. +Please be aware of the dual nature of the license of libatomic_ops, +see [LICENSING.txt](doc/LICENSING.txt) for the details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/configure new/libatomic_ops-7.6.14/configure --- old/libatomic_ops-7.6.12/configure 2021-09-13 11:12:08.000000000 +0200 +++ new/libatomic_ops-7.6.14/configure 2022-08-25 21:18:08.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libatomic_ops 7.6.12. +# Generated by GNU Autoconf 2.69 for libatomic_ops 7.6.14. # # Report bugs to <https://github.com/ivmai/libatomic_ops/issues>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='libatomic_ops' PACKAGE_TARNAME='libatomic_ops' -PACKAGE_VERSION='7.6.12' -PACKAGE_STRING='libatomic_ops 7.6.12' +PACKAGE_VERSION='7.6.14' +PACKAGE_STRING='libatomic_ops 7.6.14' PACKAGE_BUGREPORT='https://github.com/ivmai/libatomic_ops/issues' PACKAGE_URL='' @@ -1356,7 +1356,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 libatomic_ops 7.6.12 to adapt to many kinds of systems. +\`configure' configures libatomic_ops 7.6.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1428,7 +1428,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libatomic_ops 7.6.12:";; + short | recursive ) echo "Configuration of libatomic_ops 7.6.14:";; esac cat <<\_ACEOF @@ -1453,7 +1453,7 @@ --enable-werror Pass -Werror to the C compiler --enable-assertions Assertion checking --disable-atomic-intrinsics - Do not use C11 atomic intrinsics + Do not use GCC atomic intrinsics --enable-gcov Turn on code coverage analysis --disable-docs Do not build and install documentation @@ -1549,7 +1549,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libatomic_ops configure 7.6.12 +libatomic_ops configure 7.6.14 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1827,7 +1827,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libatomic_ops $as_me 7.6.12, which was +It was created by libatomic_ops $as_me 7.6.14, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2807,7 +2807,7 @@ # Define the identity of the package. PACKAGE='libatomic_ops' - VERSION='7.6.12' + VERSION='7.6.14' cat >>confdefs.h <<_ACEOF @@ -13194,7 +13194,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libatomic_ops $as_me 7.6.12, which was +This file was extended by libatomic_ops $as_me 7.6.14, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13260,7 +13260,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libatomic_ops config.status 7.6.12 +libatomic_ops config.status 7.6.14 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/configure.ac new/libatomic_ops-7.6.14/configure.ac --- old/libatomic_ops-7.6.12/configure.ac 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/configure.ac 2022-08-25 21:17:13.000000000 +0200 @@ -12,7 +12,7 @@ dnl Process this file with autoconf to produce configure. -AC_INIT([libatomic_ops],[7.6.12],https://github.com/ivmai/libatomic_ops/issues) +AC_INIT([libatomic_ops],[7.6.14],https://github.com/ivmai/libatomic_ops/issues) AC_PREREQ(2.61) AC_CANONICAL_TARGET([]) @@ -124,10 +124,10 @@ AC_ARG_ENABLE(atomic-intrinsics, [AC_HELP_STRING([--disable-atomic-intrinsics], - [Do not use C11 atomic intrinsics])]) + [Do not use GCC atomic intrinsics])]) if test "$enable_atomic_intrinsics" = no; then AC_DEFINE([AO_DISABLE_GCC_ATOMICS], 1, - [Define to avoid C11 atomic intrinsics even if available.]) + [Define to avoid GCC atomic intrinsics even if available.]) fi AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov], @@ -182,7 +182,8 @@ AH_TEMPLATE([AO_NO_SPARC_V9], [Assume target is not sparc v9+ (only sparc)]) AH_TEMPLATE([AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE], [Assume ancient MS VS Win32 headers (only VC/arm v6+, VC/x86)]) -AH_TEMPLATE([AO_UNIPROCESSOR], [Assume single-core target (only arm v6+)]) +AH_TEMPLATE([AO_UNIPROCESSOR], + [Assume single-core target (only arm v6+ or GCC intrinsics)]) AH_TEMPLATE([AO_USE_INTERLOCKED_INTRINSICS], [Assume Win32 _Interlocked primitives available as intrinsics \ (only VC/arm)]) @@ -195,9 +196,9 @@ [Emulate double-width CAS via pthread locking in case of no hardware \ support (only gcc/x86_64, the emulation is unsafe)]) AH_TEMPLATE([AO_PREFER_BUILTIN_ATOMICS], - [Prefer C11 atomic intrinsics over assembly-based implementation \ + [Prefer GCC atomic intrinsics over assembly-based implementation \ even in case of inefficient implementation (do not use assembly for \ - any atomic_ops primitive if C11/GCC atomic intrinsics available)]) + any atomic_ops primitive if the atomic intrinsics are available)]) AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/doc/LICENSING.txt new/libatomic_ops-7.6.14/doc/LICENSING.txt --- old/libatomic_ops-7.6.12/doc/LICENSING.txt 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/doc/LICENSING.txt 2022-08-25 21:17:13.000000000 +0200 @@ -3,7 +3,7 @@ linked into a client application is covered by an MIT-style license. A few library routines are covered by the GNU General Public License. -These are put into a separate library, libatomic_ops_gpl.a . +These are put into a separate library, libatomic_ops_gpl.a file. The low-level part of the library is mostly covered by the following license: @@ -32,8 +32,9 @@ -------------------------------- -A few files in the sysdeps directory were inherited in part from the -Boehm-Demers-Weiser conservative garbage collector, and are covered by + +A few files in the atomic_ops/sysdeps directory were inherited in part from +the Boehm-Demers-Weiser conservative garbage collector, and are covered by its license, which is similar in spirit: -------------------------------- @@ -51,11 +52,12 @@ ---------------------------------- + A few files are covered by the GNU General Public License. (See file -"COPYING".) This applies only to test code, sample applications, -and the libatomic_ops_gpl portion of the library. -Thus libatomic_ops_gpl should generally not be linked into proprietary code. -(This distinction was motivated by patent considerations.) +"COPYING".) This applies only to the test code and the libatomic_ops_gpl +portion of the library. Thus, libatomic_ops_gpl should generally not be +linked into proprietary code. (This distinction was motivated by patent +considerations.) It is possible that the license of the GPL pieces may be changed for future versions to make them more consistent with the rest of the package. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/doc/README_malloc.txt new/libatomic_ops-7.6.14/doc/README_malloc.txt --- old/libatomic_ops-7.6.12/doc/README_malloc.txt 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/doc/README_malloc.txt 2022-08-25 21:17:13.000000000 +0200 @@ -1,5 +1,8 @@ The libatomic_ops_gpl includes a simple almost-lock-free malloc implementation. +Note that the AO malloc implementation is licensed under the GPL, unlike the +lower level routines. + This is intended as a safe way to allocate memory from a signal handler, or to allocate memory in the context of a library that does not know what thread library it will be used with. In either case locking is impossible. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/doc/README_win32.txt new/libatomic_ops-7.6.14/doc/README_win32.txt --- old/libatomic_ops-7.6.12/doc/README_win32.txt 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/doc/README_win32.txt 2022-08-25 21:17:13.000000000 +0200 @@ -11,7 +11,7 @@ pieces from the resulting src directory contents: "atomic_ops.h" - Header file defining low-level primitives. This includes files from the following folder. - "atomic_ops"- Subdirectory containing implementation header files. + "atomic_ops" - Subdirectory containing implementation header files. "atomic_ops_stack.h" - Header file describing almost lock-free stack. "atomic_ops_malloc.h" - Header file describing almost lock-free malloc. "libatomic_ops_gpl.lib" - Library containing implementation of the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/Makefile.am new/libatomic_ops-7.6.14/src/Makefile.am --- old/libatomic_ops-7.6.12/src/Makefile.am 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/Makefile.am 2022-08-25 21:17:13.000000000 +0200 @@ -3,7 +3,7 @@ # These numbers should be updated at most once just before the release, # and, optionally, at most once during the development (after the release). LIBATOMIC_OPS_VER_INFO = 2:1:1 -LIBATOMIC_OPS_GPL_VER_INFO = 2:2:1 +LIBATOMIC_OPS_GPL_VER_INFO = 2:3:1 AM_CFLAGS=@PICFLAG@ AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/Makefile.in new/libatomic_ops-7.6.14/src/Makefile.in --- old/libatomic_ops-7.6.12/src/Makefile.in 2021-09-13 11:12:09.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/Makefile.in 2022-08-25 21:18:09.000000000 +0200 @@ -364,7 +364,7 @@ # These numbers should be updated at most once just before the release, # and, optionally, at most once during the development (after the release). LIBATOMIC_OPS_VER_INFO = 2:1:1 -LIBATOMIC_OPS_GPL_VER_INFO = 2:2:1 +LIBATOMIC_OPS_GPL_VER_INFO = 2:3:1 AM_CFLAGS = @PICFLAG@ AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src include_HEADERS = atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops/ao_version.h new/libatomic_ops-7.6.14/src/atomic_ops/ao_version.h --- old/libatomic_ops-7.6.12/src/atomic_ops/ao_version.h 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops/ao_version.h 2022-08-25 21:17:13.000000000 +0200 @@ -35,4 +35,4 @@ /* The version here should match that in configure.ac and README. */ #define AO_VERSION_MAJOR 7 #define AO_VERSION_MINOR 6 -#define AO_VERSION_MICRO 12 /* 7.6.12 */ +#define AO_VERSION_MICRO 14 /* 7.6.14 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/generic.h new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/gcc/generic.h --- old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/generic.h 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/gcc/generic.h 2022-08-25 21:17:13.000000000 +0200 @@ -95,28 +95,32 @@ AO_INLINE AO_TS_VAL_t AO_test_and_set(volatile AO_TS_t *addr) { - return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED); + return (AO_TS_VAL_t)(__atomic_test_and_set(addr, __ATOMIC_RELAXED) + ? AO_TS_SET : AO_TS_CLEAR); } # define AO_HAVE_test_and_set AO_INLINE AO_TS_VAL_t AO_test_and_set_acquire(volatile AO_TS_t *addr) { - return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE); + return (AO_TS_VAL_t)(__atomic_test_and_set(addr, __ATOMIC_ACQUIRE) + ? AO_TS_SET : AO_TS_CLEAR); } # define AO_HAVE_test_and_set_acquire AO_INLINE AO_TS_VAL_t AO_test_and_set_release(volatile AO_TS_t *addr) { - return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE); + return (AO_TS_VAL_t)(__atomic_test_and_set(addr, __ATOMIC_RELEASE) + ? AO_TS_SET : AO_TS_CLEAR); } # define AO_HAVE_test_and_set_release AO_INLINE AO_TS_VAL_t AO_test_and_set_full(volatile AO_TS_t *addr) { - return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST); + return (AO_TS_VAL_t)(__atomic_test_and_set(addr, __ATOMIC_SEQ_CST) + ? AO_TS_SET : AO_TS_CLEAR); } # define AO_HAVE_test_and_set_full #endif /* !AO_PREFER_GENERALIZED */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/sparc.h new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/gcc/sparc.h --- old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/sparc.h 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/gcc/sparc.h 2022-08-25 21:17:13.000000000 +0200 @@ -43,23 +43,17 @@ /* Returns nonzero if the comparison succeeded. */ AO_INLINE int AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) { - AO_t ret; __asm__ __volatile__ ("membar #StoreLoad | #LoadLoad\n\t" # if defined(__arch64__) - "casx [%2],%0,%1\n\t" + "casx [%1],%2,%0\n\t" # else - "cas [%2],%0,%1\n\t" /* 32-bit version */ + "cas [%1],%2,%0\n\t" /* 32-bit version */ # endif "membar #StoreLoad | #StoreStore\n\t" - "cmp %0,%1\n\t" - "be,a 0f\n\t" - "mov 1,%0\n\t"/* one insn after branch always executed */ - "clr %0\n\t" - "0:\n\t" - : "=r" (ret), "+r" (new_val) - : "r" (addr), "0" (old) - : "memory", "cc"); - return (int)ret; + : "+r" (new_val) + : "r" (addr), "r" (old) + : "memory"); + return new_val == old; } # define AO_HAVE_compare_and_swap_full # endif /* !AO_GENERALIZE_ASM_BOOL_CAS */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/tile.h new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/gcc/tile.h --- old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/tile.h 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/gcc/tile.h 2022-08-25 21:17:13.000000000 +0200 @@ -9,8 +9,6 @@ * modified is included with the above copyright notice. */ -/* Minimal support for tile. */ - #if (AO_GNUC_PREREQ(4, 8) || AO_CLANG_PREREQ(3, 4)) \ && !defined(AO_DISABLE_GCC_ATOMICS) @@ -18,6 +16,8 @@ #else /* AO_DISABLE_GCC_ATOMICS */ + /* Minimal support for tile. */ + # include "../all_atomic_load_store.h" # include "../test_and_set_t_is_ao_t.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/msftc/x86_64.h new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/msftc/x86_64.h --- old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/msftc/x86_64.h 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/msftc/x86_64.h 2022-08-25 21:17:13.000000000 +0200 @@ -22,14 +22,15 @@ #include "../all_aligned_atomic_load_store.h" +#if !defined(_M_ARM64) /* Real X86 implementations appear */ /* to enforce ordering between memory operations, EXCEPT that a later */ /* read can pass earlier writes, presumably due to the visible */ /* presence of store buffers. */ /* We ignore the fact that the official specs */ /* seem to be much weaker (and arguably too weak to be usable). */ - #include "../ordered_except_wr.h" +#endif #ifdef AO_ASM_X64_AVAILABLE # include "../test_and_set_t_is_char.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/standard_ao_double_t.h new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/standard_ao_double_t.h --- old/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/standard_ao_double_t.h 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops/sysdeps/standard_ao_double_t.h 2022-08-25 21:17:13.000000000 +0200 @@ -28,7 +28,7 @@ # if AO_GNUC_PREREQ(4, 7) || AO_CLANG_PREREQ(3, 6) # pragma GCC diagnostic push /* Suppress warning about __int128 type. */ -# if defined(__clang__) || AO_GNUC_PREREQ(6, 4) +# if defined(__clang__) || AO_GNUC_PREREQ(6, 0) # pragma GCC diagnostic ignored "-Wpedantic" # else /* GCC before ~4.8 does not accept "-Wpedantic" quietly. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops.c new/libatomic_ops-7.6.14/src/atomic_ops.c --- old/libatomic_ops-7.6.12/src/atomic_ops.c 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops.c 2022-08-25 21:17:13.000000000 +0200 @@ -45,7 +45,8 @@ # define AO_USE_NO_SIGNALS #endif -#if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)) \ +#if (defined(__CYGWIN__) || defined(__GLIBC__) || defined(__GNU__) \ + || defined(__linux__)) \ && !defined(AO_USE_NO_SIGNALS) && !defined(_GNU_SOURCE) # define _GNU_SOURCE 1 #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops_malloc.c new/libatomic_ops-7.6.14/src/atomic_ops_malloc.c --- old/libatomic_ops-7.6.12/src/atomic_ops_malloc.c 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops_malloc.c 2022-08-25 21:17:13.000000000 +0200 @@ -319,6 +319,7 @@ return result; } +AO_ATTR_MALLOC AO_ATTR_ALLOC_SIZE(1) void * AO_malloc(size_t sz) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops_stack.c new/libatomic_ops-7.6.14/src/atomic_ops_stack.c --- old/libatomic_ops-7.6.12/src/atomic_ops_stack.c 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops_stack.c 2022-08-25 21:17:13.000000000 +0200 @@ -67,6 +67,9 @@ /* No deletions of x can start here, since x is not currently in the */ /* list. */ retry: + do { + next = AO_load_acquire(list); + store_before_cas(x, next); # if AO_BL_SIZE == 2 { /* Start all loads as close to concurrently as possible. */ @@ -102,12 +105,7 @@ } # endif /* x_bits is not currently being deleted */ - do - { - next = AO_load(list); - store_before_cas(x, next); - } - while (AO_EXPECT_FALSE(!AO_compare_and_swap_release(list, next, x_bits))); + } while (AO_EXPECT_FALSE(!AO_compare_and_swap_release(list, next, x_bits))); } /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/atomic_ops_stack.h new/libatomic_ops-7.6.14/src/atomic_ops_stack.h --- old/libatomic_ops-7.6.12/src/atomic_ops_stack.h 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/atomic_ops_stack.h 2022-08-25 21:17:13.000000000 +0200 @@ -77,7 +77,6 @@ /* The number of low order pointer bits we can use for a small */ /* version number. */ # if defined(__LP64__) || defined(_LP64) || defined(_WIN64) - /* WIN64 isn't really supported yet. */ # define AO_N_BITS 3 # else # define AO_N_BITS 2 @@ -97,6 +96,36 @@ # error AO_BL_SIZE too big #endif +#ifndef AO_STACK_ATTR_ALLIGNED + /* Enforce proper alignment of AO_stack_t.AO_ptr to avoid the */ + /* structure value to cross the CPU cache line boundary. */ + /* A workaround for almost-lock-free push/pop test failures */ + /* on aarch64, at least. */ +# if AO_GNUC_PREREQ(3, 1) +# define AO_STACK_LOG_BL_SZP1 \ + (AO_BL_SIZE > 7 ? 4 : AO_BL_SIZE > 3 ? 3 : AO_BL_SIZE > 1 ? 2 : 1) +# define AO_STACK_ATTR_ALLIGNED \ + __attribute__((__aligned__(sizeof(AO_t) << AO_STACK_LOG_BL_SZP1))) +# elif defined(_MSC_VER) && _MSC_VER >= 1400 /* Visual Studio 2005+ */ + /* MS compiler accepts only a literal number in align, not expression. */ + /* AO_STACK_ALLIGN_N is 1 << (AO_N_BITS + AO_STACK_LOG_BL_SZP1). */ +# if AO_N_BITS > 2 && AO_BL_SIZE > 7 +# define AO_STACK_ALLIGN_N 128 +# elif (AO_N_BITS > 2 && AO_BL_SIZE > 3) || AO_BL_SIZE > 7 +# define AO_STACK_ALLIGN_N 64 +# elif (AO_N_BITS > 2 && AO_BL_SIZE > 1) || AO_BL_SIZE > 3 +# define AO_STACK_ALLIGN_N 32 +# elif AO_N_BITS > 2 || AO_BL_SIZE > 1 +# define AO_STACK_ALLIGN_N 16 +# else +# define AO_STACK_ALLIGN_N 8 +# endif +# define AO_STACK_ATTR_ALLIGNED __declspec(align(AO_STACK_ALLIGN_N)) +# else +# define AO_STACK_ATTR_ALLIGNED /* TODO: alignment is not enforced */ +# endif +#endif /* !AO_STACK_ATTR_ALLIGNED */ + typedef struct AO__stack_aux { volatile AO_t AO_stack_bl[AO_BL_SIZE]; } AO_stack_aux; @@ -111,7 +140,7 @@ /* The following two routines should not normally be used directly. */ /* We make them visible here for the rare cases in which it makes sense */ -/* to share the an AO_stack_aux between stacks. */ +/* to share the AO_stack_aux between stacks. */ void AO_stack_push_explicit_aux_release(volatile AO_t *list, AO_t *x, AO_stack_aux *); @@ -122,7 +151,7 @@ /* And now AO_stack_t for the real interface: */ typedef struct AO__stack { - volatile AO_t AO_ptr; + AO_STACK_ATTR_ALLIGNED volatile AO_t AO_ptr; AO_stack_aux AO_aux; } AO_stack_t; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/src/config.h.in new/libatomic_ops-7.6.14/src/config.h.in --- old/libatomic_ops-7.6.12/src/config.h.in 2021-09-13 11:12:09.000000000 +0200 +++ new/libatomic_ops-7.6.14/src/config.h.in 2022-08-25 21:18:08.000000000 +0200 @@ -9,7 +9,7 @@ /* Assume target is not old AMD Opteron chip (only x86_64) */ #undef AO_CMPXCHG16B_AVAILABLE -/* Define to avoid C11 atomic intrinsics even if available. */ +/* Define to avoid GCC atomic intrinsics even if available. */ #undef AO_DISABLE_GCC_ATOMICS /* Force test_and_set to use SWP instruction instead of LDREX/STREX (only arm @@ -28,9 +28,9 @@ /* Assume ancient MS VS Win32 headers (only VC/arm v6+, VC/x86) */ #undef AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE -/* Prefer C11 atomic intrinsics over assembly-based implementation even in +/* Prefer GCC atomic intrinsics over assembly-based implementation even in case of inefficient implementation (do not use assembly for any atomic_ops - primitive if C11/GCC atomic intrinsics available) */ + primitive if the atomic intrinsics are available) */ #undef AO_PREFER_BUILTIN_ATOMICS /* Prefer generalized definitions to direct assembly-based ones */ @@ -39,7 +39,7 @@ /* Trace AO_malloc/free calls (for debug only) */ #undef AO_TRACE_MALLOC -/* Assume single-core target (only arm v6+) */ +/* Assume single-core target (only arm v6+ or GCC intrinsics) */ #undef AO_UNIPROCESSOR /* Assume Win32 _Interlocked primitives available as intrinsics (only VC/arm) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libatomic_ops-7.6.12/tests/test_stack.c new/libatomic_ops-7.6.14/tests/test_stack.c --- old/libatomic_ops-7.6.12/tests/test_stack.c 2021-09-13 11:11:13.000000000 +0200 +++ new/libatomic_ops-7.6.14/tests/test_stack.c 2022-08-25 21:17:13.000000000 +0200 @@ -301,17 +301,18 @@ } } times[nthreads][exper_n] = get_msecs() - start_time; - # ifdef VERBOSE +# ifdef VERBOSE printf("nthreads=%d, time_ms=%lu\n", nthreads, times[nthreads][exper_n]); printf("final list (should be reordered initial list):\n"); print_list(); - # endif +# endif check_list(list_length); while ((le = (list_element *)AO_stack_pop(&the_list)) != 0) free(le); } - for (nthreads = 1; nthreads <= max_nthreads; ++nthreads) + + for (nthreads = 1; nthreads <= max_nthreads; ++nthreads) { # ifndef NO_TIMES unsigned long sum = 0;