| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The workaround is to use __atomic_test_and_set instead of
__atomic_thread_fence in case of option -fsanitize=thread is passed
to gcc (or clang). The old behavior could be turned on by defining
AO_USE_ATOMIC_THREAD_FENCE macro.
* src/atomic_ops/sysdeps/gcc/generic.h [!AO_UNIPROCESSOR
&& AO_THREAD_SANITIZER && !AO_USE_ATOMIC_THREAD_FENCE] (AO_nop_read,
AO_nop_write, AO_nop_full): Do not define (using
__atomic_thread_fence); add comment.
|
|
|
|
|
|
|
|
|
|
| |
* CMakeLists.txt (PACKAGE_VERSION): Bump version to 7.9.0.
* .appveyor.yml (version): Likewise.
* .travis.yml (env.addons.coverity_scan.project.version): Likewise.
* README.md: Likewise.
* configure.ac (AC_INIT): Likewise.
* src/atomic_ops/ao_version.h (AO_VERSION_MINOR): Likewise.
* README.md: Add back the build status indicators for "master" branch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bump libatomic_ops version to 7.8.0.
* CMakeLists.txt (PACKAGE_VERSION): Bump version to 7.8.0.
* ChangeLog (7.7.0): Likewise.
* README.md: Likewise.
* configure.ac (AC_INIT): Likewise.
* src/atomic_ops/ao_version.h (AO_VERSION_MINOR): Likewise.
* .travis.yml (env.addons.coverity_scan.project.version): Likewise.
* .appveyor.yml (version): Change to 7.8.x.
* CMakeLists.txt (LIBATOMIC_OPS_VER_INFO, LIBATOMIC_OPS_GPL_VER_INFO):
Change to 3:0:2.
* src/Makefile.am (LIBATOMIC_OPS_VER_INFO, LIBATOMIC_OPS_GPL_VER_INFO):
Likewise.
* ChangeLog (7.8.0): Set release date.
* README.md: Remove build status indicators for "master" branch.
|
|
|
|
|
|
| |
* CMakeLists.txt (LIBATOMIC_OPS_GPL_VER_INFO): Increment current and
age (change version info of libcord.so to 2:3:1).
* src/Makefile.am (LIBATOMIC_OPS_GPL_VER_INFO): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/atomic_ops_malloc.c [HAVE_MMAP] (AO_malloc_large): Change type of
result local variable from char* to void*.
* src/atomic_ops_malloc.c [HAVE_MMAP] (AO_free_large): Change type of
argument from char* to void*.
* src/atomic_ops_malloc.c (add_chunk_as): Cast to AO_t* from void*
directly (adjust ofs accordingly); add assertion that sz is multiple
of AO_t size.
* src/atomic_ops_malloc.c (AO_free): Remove cast to char* in
AO_free_large() call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #52 (libatomic_ops).
The issue (SIGSEGV in test_malloc) is observed with clang-13, at least.
The workaround is to simplify asm code of AO_compare_and_swap_full
(moving the comparison of CAS result and old value to C code).
* src/atomic_ops/sysdeps/gcc/sparc.h [(!(AO_GNUC_PREREQ(12,0)
|| AO_CLANG_PREREQ(13,0)) || AO_DISABLE_GCC_ATOMICS) && !AO_NO_SPARC_V9
&& !AO_GENERALIZE_ASM_BOOL_CAS] (AO_compare_and_swap_full): Remove ret
local variable; remove cmp, be, mov, clr instructions from asm block
(to match that of AO_fetch_compare_and_swap_full); remove cc from asm
block clobbers; change specifier for old input operand of asm block
(from "0" to "r"); return new_val==old instead of ret.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The intrinsics are used in gcc/sparc.h (unless AO_DISABLE_GCC_ATOMICS)
starting from gcc-12 and clang-13.
* src/atomic_ops/sysdeps/gcc/sparc.h: Remove TODO item that support
is incomplete and about compare-and-swap.
* src/atomic_ops/sysdeps/gcc/sparc.h [(AO_GNUC_PREREQ(12,0)
|| AO_CLANG_PREREQ(13,0)) && !AO_DISABLE_GCC_ATOMICS]: Include
generic.h; do not include all_atomic_load_store.h, ordered_except_wr.h,
test_and_set_t_is_char.h.
* src/atomic_ops/sysdeps/gcc/sparc.h [(AO_GNUC_PREREQ(12,0)
|| AO_CLANG_PREREQ(13,0)) && !AO_DISABLE_GCC_ATOMICS]
(AO_test_and_set_full, AO_compare_and_swap_full,
AO_fetch_compare_and_swap_full): Do not define as an asm-based
implementation.
|
|
|
|
|
| |
* src/atomic_ops/sysdeps/gcc/tile.h: Move comment that the support is
minimal to AO_DISABLE_GCC_ATOMICS part of code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(fix of commit cbbf8633)
According to the GCC manual, __atomic_test_and_set() result type is
Bool, thus it is not guaranteed to return AO_TS_SET value. (E.g., the
function may return 1 while AO_TS_SET is 255, as observed on sparc64
with gcc-12.)
* src/atomic_ops/sysdeps/gcc/generic.h [!AO_PREFER_GENERALIZED]
(AO_test_and_set, AO_test_and_set_acquire, AO_test_and_set_release,
AO_test_and_set_full): Return AO_TS_SET if __atomic_test_and_set()
result is non-zero, AO_TS_CLEAR otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GPL terms are copied from COPYING file.
* src/atomic_ops_malloc.c: Refine GPL copyright text in the header
comment by copying it as-is from COPYING file (as recommended in
"Apply These Terms to Your New Programs" section).
* src/atomic_ops_stack.c: Likewise.
* tests/list_atomic.template: Likewise.
* tests/run_parallel.h: Likewise.
* tests/test_atomic.c: Likewise.
* tests/test_atomic_include.template: Likewise.
* tests/test_malloc.c: Likewise.
* tests/test_stack.c: Likewise.
* tests/test_atomic_include.h: Regenerate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(reformatting)
* LICENSE: Remove an extra space after comma in MIT-like license.
* configure.ac: Remove an extra space after comma in license header
comment.
* src/atomic_ops/sysdeps/armcc/arm_v6.h: Likewise.
* src/atomic_ops/sysdeps/gcc/aarch64.h: Likewise.
* src/atomic_ops/sysdeps/gcc/alpha.h: Likewise.
* src/atomic_ops/sysdeps/gcc/arm.h: Likewise.
* src/atomic_ops/sysdeps/gcc/hexagon.h: Likewise.
* src/atomic_ops/sysdeps/gcc/m68k.h: Likewise.
* src/atomic_ops/sysdeps/gcc/mips.h: Likewise.
* src/atomic_ops/sysdeps/gcc/powerpc.h: Likewise.
* src/atomic_ops/sysdeps/gcc/riscv.h: Likewise.
* src/atomic_ops/sysdeps/gcc/s390.h: Likewise.
* src/atomic_ops/sysdeps/gcc/sh.h: Likewise.
* src/atomic_ops/sysdeps/gcc/sparc.h: Likewise.
* src/atomic_ops/sysdeps/gcc/x86.h: Likewise.
* src/atomic_ops/sysdeps/sunc/x86.h: Likewise.
|
|
|
|
|
| |
* src/atomic_ops.c [__CYGWIN__ && !AO_USE_NO_SIGNALS && !_GNU_SOURCE]
(_GNU_SOURCE): Define macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #45 (libatomic_ops).
Enforce proper alignment of AO_stack_t.AO_pa 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.
* src/atomic_ops_stack.h [!AO_STACK_ATTR_ALLIGNED]
(AO_STACK_ATTR_ALLIGNED): Define.
* src/atomic_ops_stack.h (AO_stack_t.AO_pa): Add AO_STACK_ATTR_ALLIGNED
attribute.
|
|
|
|
|
|
|
|
|
|
|
| |
Also, execute the first read in a loop with an acquire barrier, and
place black list checking as close to CAS as possible.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Use acquire barrier to read list
value (stored to next local variable); read list value and store it to
x element before iterating over AO_stack_bl (and, thus, retry iterating
over AO_stack_bl if CAS failed).
|
|
|
|
|
|
| |
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_pop_explicit_aux_acquire): Remove assertion about i; replace
"First" to "first" in comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(fix of commit d29c0910d)
* src/atomic_ops_stack.c (AO_real_head_ptr): Rename to
AO_stack_head_ptr.
* src/atomic_ops_stack.h (AO_real_head_ptr): Likewise.
* src/atomic_ops_stack.c (AO_real_next_ptr): Rename to
AO_stack_next_ptr.
* src/atomic_ops_stack.h (AO_real_next_ptr): Likewise.
* src/atomic_ops_stack.h [!AO_REAL_PTR_AS_MACRO] (AO_REAL_NEXT_PTR,
AO_REAL_HEAD_PTR): Rename AO_real_head_ptr and AO_real_next_ptr to
AO_stack_head_ptr and AO_stack_next_ptr, respectively.
|
|
|
|
|
|
|
|
|
|
| |
* README_stack.txt: Document AO_stack_is_lock_free; update
documentation about AO_STACK_IS_LOCK_FREE.
* src/atomic_ops_stack.c (AO_stack_is_lock_free): Implement.
* src/atomic_ops_stack.h (AO_stack_is_lock_free): New API function
declaration.
* tests/test_stack.c (main): Use !AO_stack_is_lock_free() instead of
AO_USE_ALMOST_LOCK_FREE.
|
|
|
|
|
|
|
|
|
| |
(refactoring)
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE &&
AO_HAVE_compare_double_and_swap_double && (!AO_STACK_PREFER_CAS_DOUBLE
|| !AO_HAVE_compare_and_swap_double)] (AO_stack_pop_acquire): Remove
redundant cast of next local variable to AO_t.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(refactoring)
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE && __alpha__
&& __GNUC__==4] (AO_EXPECT_FALSE): Redefine to expr (before
AO_stack_push_explicit_aux_release); move comment from
AO_stack_pop_explicit_aux_acquire.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE && __alpha__
&& __GNUC__==4] (AO_stack_pop_explicit_aux_acquire): Use
AO_EXPECT_FALSE (in the same way as for non-alpha case).
|
|
|
|
|
|
|
| |
(fix of commit e477b79ef)
* src/atomic_ops_stack.c (AO_stack_init): Pass sizeof(AO_stack_t) to
memset() instead of sizeof pointer; remove redundant cast of list.
|
|
|
|
|
|
| |
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Use AO_EXPECT_FALSE() in
comparison of entries and x_bits.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now AO_REAL_HEAD_PTR() and AO_REAL_NEXT_PTR() macros definition does
not depend on whether the implementation is almost or fully lock-free.
These macros just call the relevant implementation-dependent API
function (AO_real_head_ptr or AO_real_next_ptr, respectively).
If needed, the client could define AO_REAL_PTR_AS_MACRO (prior to
include atomic_ops_stack.h) to continue using implementation-dependent
definition of AO_REAL_HEAD_PTR and AO_REAL_NEXT_PTR macros.
* src/atomic_ops_stack.c [!AO_REAL_PTR_AS_MACRO]
(AO_REAL_PTR_AS_MACRO): Define (before include atomic_ops_stack.h).
* src/atomic_ops_stack.c (AO_real_head_ptr, AO_real_next_ptr):
Implement.
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Rename argument.
* src/atomic_ops_stack.h [!AO_REAL_PTR_AS_MACRO] (AO_REAL_NEXT_PTR,
AO_REAL_HEAD_PTR): Redirect to AO_real_next_ptr/AO_real_head_ptr().
* src/atomic_ops_stack.h (AO_stack_init): Move declaration down (to be
after AO_stack_pop).
* src/atomic_ops_stack.h (AO_real_head_ptr, AO_real_next_ptr): Declare
AO_API function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now AO_stack_t definition does not depend on whether the implementation
is almost or fully lock-free.
* src/atomic_ops_stack.c [USE_ALMOST_LOCK_FREE] (AO_stack_push_release,
AO_stack_pop_acquire): Update access to list after changing its type to
a union.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (version, ptr,
AO_stack_pop_acquire, AO_stack_push_release): Likewise.
* src/atomic_ops_stack.h (AO_REAL_HEAD_PTR): Likewise.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE
&& (!AO_HAVE_compare_double_and_swap_double
|| AO_STACK_PREFER_CAS_DOUBLE) && AO_HAVE_compare_and_swap_double]
(AO_stack_push_release): Rename version local variable to cversion.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (ptr, version):
Undefine (after last use).
* src/atomic_ops_stack.h [!AO_HAVE_double_t]: Move include
standard_ao_double_t.h upper to be before ifdef USE_ALMOST_LOCK_FREE.
* src/atomic_ops_stack.h [!AO_BL_SIZE] (AO_BL_SIZE): Refine comment.
* src/atomic_ops_stack.h (AO_BL_SIZE, AO_N_BITS, AO_BIT_MASK): Define
even if not USE_ALMOST_LOCK_FREE.
* src/atomic_ops_stack.h (AO__stack_ptr_aux): New struct type.
* src/atomic_ops_stack.h (AO_stack_t): Change to union; define
identically regardless of USE_ALMOST_LOCK_FREE; improve comment.
* src/atomic_ops_stack.h (AO_STACK_INITIALIZER): Define identically
regardless of USE_ALMOST_LOCK_FREE; add comment.
|
|
|
|
|
|
| |
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Remove extra "an" (after "the")
in comment.
|
|
|
|
|
|
|
| |
* src/atomic_ops_stack.c (AO_stack_init): Collapse 2 definitions into
single one; move the definition upper (to be outside of ifdef
USE_ALMOST_LOCK_FREE); implement using memset (instead of initializing
each field to 0).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously AO_stack_init() was declared as inline, and
AO_stack_push_release() and AO_stack_pop_acquire() were define as
macros in case of USE_ALMOST_LOCK_FREE. Now, these 3 functions are
always defined in atomic_ops_stack.c.
* src/atomic_ops_stack.c [USE_ALMOST_LOCK_FREE] (AO_stack_init,
AO_stack_push_release, AO_stack_pop_acquire): Implement.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (AO_stack_init):
Likewise.
* src/atomic_ops_stack.h (AO_stack_init): Remove inline function
definition; declare as AO_API function instead.
* src/atomic_ops_stack.h [USE_ALMOST_LOCK_FREE] (AO_stack_push_release,
AO_stack_pop_acquire): Declare as AO_API function instead of macro.
* src/atomic_ops_stack.h (AO_stack_push, AO_HAVE_stack_push,
AO_stack_pop, AO_HAVE_stack_pop): Define macro unconditionally.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* README_stack.txt: Place quotes properly for "popped".
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release, PRECHECK, AO_load_next,
AO_stack_pop_explicit_aux_acquire): Reformat comments, adjust code
indentation.
* src/atomic_ops_stack.c [!AO_USE_ALMOST_LOCK_FREE] (ptr,
AO_stack_push_release, AO_stack_pop_acquire): Likewise.
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE] (AO_BL_SIZE,
AO_stack_push_explicit_aux_release): Likewise.
* src/atomic_ops_stack.h: Move copyright to be the first comment in
the file.
|
|
|
|
|
|
|
| |
(fix of commit f30c76e28)
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE && (__LP64__
|| _LP64 || _WIN64)] (AO_N_BITS): Remove outdated comment about Win64.
|
|
|
|
|
|
|
|
| |
(refactoring)
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE && AO_BL_SIZE!=2]
(AO_stack_push_explicit_aux_release): Remove code duplicated with
AO_BL_SIZE==2 case.
|
|
|
|
|
|
|
|
|
|
| |
(fix of commit cd7fd8539)
Issue #27 (libatomic_ops).
* src/atomic_ops/sysdeps/standard_ao_double_t.h [(__x86_64__
&& AO_GCC_ATOMIC_TEST_AND_SET || __aarch64__) && !__ILP32__
&& AO_GNUC_PREREQ(6,0)]: Use "-Wpedantic" (instead of "-pedantic").
|
|
|
|
|
| |
* CMakeLists.txt: Update copyright year.
* src/atomic_ops.h: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
This commit adds support of the clang compiler (in addition to gcc)
for E2K architecture.
* CMakeLists.txt [install_headers] (FILES): Install also gcc/e2k.h.
* src/atomic_ops.h [__GNUC__ && !AO_USE_PTHREAD_DEFS
&& !__INTEL_COMPILER && __e2k__]: Include gcc/e2k.h.
* src/atomic_ops/sysdeps/gcc/e2k.h: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AO_DLL macro is defined by configure if building shared libraries;
AO_DLL controls the definition of AO_API. (In case of a static build,
AO_API is always defined to "extern".)
* configure.ac [$enable_shared && !$enable_static] (CFLAGS): Perpend
-DAO_DLL.
* src/atomic_ops.c [!AO_BUILD] (AO_BUILD): Define before include
atomic_ops.h.
* src/atomic_ops.c (AO_pause): Add AO_API specifier.
* src/atomic_ops.c [!_MSC_VER && !__MINGW32__ && !__BORLANDC__
|| AO_USE_NO_SIGNALS] (AO_fetch_compare_and_swap_emulation,
AO_compare_double_and_swap_double_emulation, AO_store_full_emulation):
Likewise.
* src/atomic_ops/sysdeps/emul_cas.h
(AO_fetch_compare_and_swap_emulation,
AO_compare_double_and_swap_double_emulation, AO_store_full_emulation):
Likewise.
* src/atomic_ops/sysdeps/generic_pthread.h (AO_pt_lock): Likewise.
* src/atomic_ops_malloc.c (AO_malloc_enable_mmap, AO_malloc, AO_free):
Likewise.
* src/atomic_ops_malloc.h (AO_free, AO_malloc, AO_malloc_enable_mmap):
Likewise.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE] (AO_pause,
AO_stack_push_explicit_aux_release, AO_stack_pop_explicit_aux_acquire):
Likewise.
* src/atomic_ops_stack.c (AO_stack_push_release, AO_stack_pop_acquire):
Likewise.
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release,
AO_stack_pop_explicit_aux_acquire): Likewise.
* src/atomic_ops_stack.h (AO_stack_push_release, AO_stack_pop_acquire):
Likewise.
* tests/test_atomic.c [(!_MSC_VER && !__MINGW32__ && !__BORLANDC__
|| AO_USE_NO_SIGNALS || AO_USE_WIN32_PTHREADS) && AO_TEST_EMULATION]
(AO_store_full_emulation, AO_fetch_compare_and_swap_emulation):
Likewise.
* tests/test_atomic.c [(!_MSC_VER && !__MINGW32__ && !__BORLANDC__
|| AO_USE_NO_SIGNALS || AO_USE_WIN32_PTHREADS) && AO_TEST_EMULATION
&& AO_HAVE_double_t] (AO_compare_double_and_swap_double_emulation):
Likewise.
* src/atomic_ops.c [(!_MSC_VER && !__MINGW32__ && !__BORLANDC__
|| AO_USE_NO_SIGNALS) && !AO_NO_PTHREADS] (AO_pt_lock): Add declaration
but with AO_API; move the definition out of extern C.
* src/atomic_ops.h [!AO_API] (AO_API): Define (depending on AO_BUILD
and AO_DLL).
* src/atomic_ops_malloc.c [!AO_BUILD] (AO_BUILD): Define before include
atomic_ops_malloc.h.
* src/atomic_ops_stack.c [!AO_BUILD] (AO_BUILD): Define before include
atomic_ops_stack.h.
|
|
|
|
| |
* src/atomic_ops_malloc.c (AO_free_list): Make it static.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to unify build artifacts naming between the supported build
scripts.
The documentation and LICENSING.txt are updated accordingly.
* LICENSING.txt: Rename libatomic_ops_gpl to atomic_ops_gpl.
* README_malloc.txt: Likewise.
* README_win32.txt: Likewise.
* configure.ac (gpl): Likewise.
* src/Makefile.msft (all, libatomic_ops_gpl.lib, test_malloc,
test_stack): Likewise.
* README_win32.txt: Rename libatomic_ops.lib to atomic_ops.lib.
* src/Makefile.msft (all-disable-gpl, libatomic_ops.lib, test_malloc,
test_stack): Likewise.
* src/Makefile.msft (clean): Remove atomic_ops*.lib instead of
libatomic_ops*.lib.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This unifies the build artifacts between the supported build systems.
Note that the clients relying on Makefile.msft should now link with
libatomic_ops.lib in addition to libatomic_ops_gpl.lib.
* README.md (Platform Specific Notes): Updade documentation about
Makefile.msft which also builds libatomic_ops.lib now.
* README_win32.txt: Likewise.
* README_win32.txt: Refine documentation (separate the package build
from client code compilation).
* src/Makefile.msft (LIB_GPL_OBJS): New variable.
* src/Makefile.msft (LIB_OBJS): Move atomic_ops_malloc.obj and
atomic_ops_stack.obj to LIB_GPL_OBJS.
* src/Makefile.msft (all-disable-gpl, libatomic_ops.lib): New goal
(builds only non-GPL code).
* src/Makefile.msft (all): Depend on all-disable-gpl.
* src/Makefile.msft (libatomic_ops_gpl.lib): Depend and use
LIB_GPL_OBJS instead of LIB_OBJS.
* src/Makefile.msft (test_malloc, test_stack): Also depend and link
with libatomic_ops.lib.
* src/Makefile.msft (clean): Delete libatomic_ops*.lib.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/atomic_ops.c (AO_pause): Declare as extern "C" if __cplusplus.
* src/atomic_ops.c [!_MSC_VER && !__MINGW32__ && !__BORLANDC__
|| AO_USE_NO_SIGNALS] (AO_fetch_compare_and_swap_emulation,
AO_compare_double_and_swap_double_emulation, AO_store_full_emulation):
Likewise.
* src/atomic_ops.c [(!_MSC_VER && !__MINGW32__ && !__BORLANDC__
|| AO_USE_NO_SIGNALS) && !AO_NO_PTHREADS] (AO_pt_lock): Likewise.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE] (AO_pause):
Likewise.
* src/atomic_ops.c (AO_pause): Move declaration up to have it
unconditionally.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile.am [ENABLE_DOCS] (dist_doc_DATA): Do not add COPYING,
README_malloc.txt, README_stack.txt items unless ENABLE_GPL.
* README.md (Installation and Usage): Add note that libatomic_ops_gpl.a
is not built if --disable-gpl option is given to configure.
* configure.ac (gpl): New AC_ARG_ENABLE.
* configure.ac (ENABLE_GPL): New AM_CONDITIONAL.
* src/Makefile.am (include_HEADERS): Do not add atomic_ops_malloc.h
and atomic_ops_stack.h items unless ENABLE_GPL.
* src/Makefile.am (lib_LTLIBRARIES): Do not add libatomic_ops_gpl.la
unless ENABLE_GPL.
* src/Makefile.am (libatomic_ops_gpl_la_SOURCES,
libatomic_ops_gpl_la_LDFLAGS, libatomic_ops_gpl_la_LIBADD): Do not
define unless ENABLE_GPL.
* tests/Makefile.am (test_stack_SOURCES, test_stack_LDADD,
test_malloc_SOURCES, test_malloc_LDADD): Likewise.
* tests/Makefile.am [ENABLE_SHARED] (test_malloc_LDADD,
test_stack_LDADD): Likewise.
* tests/Makefile.am (TESTS): Do not add test_malloc$(EXEEXT) and
test_stack$(EXEEXT) items unless ENABLE_GPL.
* tests/Makefile.am (TEST_OBJS): Do not add test_malloc.o, test_stack.o
items unless ENABLE_GPL.
* tests/Makefile.am (check_PROGRAMS): Do not add test_malloc and
test_stack items unless ENABLE_GPL.
* tests/Makefile.am (check-gpl-without-test-driver): New PHONY goal.
* tests/Makefile.am (check-without-test-driver): Depend also on
check-gpl-without-test-driver; do not run test_stack and test_malloc
directly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rationale: all relative links (in README.md) should remain valid
after docs installation.
* doc/LICENSING.txt: Move to the base folder.
* doc/README_details.txt: Likewise.
* doc/README_malloc.txt: Likewise.
* doc/README_stack.txt: Likewise.
* doc/README_win32.txt: Likewise.
* Makefile.am (SUBDIRS): Remove doc item.
* Makefile.am [ENABLE_DOCS] (dist_doc_DATA): Add comment and items from
doc/Makefile.am.
* README.md (Overview): Replace reference to doc with the links to the
existing README_*.txt files (except for README_win32.txt).
* README.md (Installation and Usage): Add link to LICENSING.txt.
* README.md (Platform Specific Notes): Add link to README_win32.txt.
* README.md (Copyright & Warranty): Adjust link to LICENSING.txt (after
moving to the base folder).
* configure.ac (AC_CONFIG_FILES): Remove doc/Makefile item.
* doc/Makefile.am: Remove file.
* src/atomic_ops_malloc.h: Update path to LICENSING.txt in comment.
|
|
|
|
|
|
|
|
| |
* src/Makefile.msft (check-deps, check-noautogen-deps): New goal.
* src/Makefile.msft (check): Depend on check-deps instead of
test_atomic and test_atomic_generalized.
* src/Makefile.msft (check-noautogen): Depend on check-noautogen-deps
instead of test_malloc and test_stack.
|
|
|
|
|
| |
* src/atomic_ops/sysdeps/msftc/x86.h [!AO_USE_PENTIUM4_INSTRS
&& _M_IX86_FP>=2] (AO_USE_PENTIUM4_INSTRS): Define; add comment.
|
|
|
|
|
|
|
|
| |
Visual Studio 2017 (15.0) discontinued support of Windows XP.
* doc/README_win32.txt: Do not mention AO_ASSUME_VISTA.
* src/atomic_ops/sysdeps/msftc/x86.h [!AO_ASSUME_VISTA
&& _MSC_VER>=1910] (AO_ASSUME_VISTA): Define; add comment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to match that of GNU make script.
* src/Makefile.msft (test_atomic, test_atomic_generalized, test_malloc,
test_stack, check, check-noautogen): Add "..\tests\" prefix to test
target.
* src/Makefile.msft (test_atomic, test_atomic_generalized, test_malloc,
test_stack): Specify object file.
* src/Makefile.msft (clean): Delete .exe, .obj files in tests folder;
do not delete .exe files in src folder.
|
|
|
|
|
|
|
| |
* .gitignore: Remove test_atomic_include.h.
* src/Makefile.msft: Update usage comment (recommend to build "check"
goal instead of "check-noautogen").
* tests/test_atomic_include.h: Regenerate (new file).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(fix of commit eb83b6186)
Also, "truncation from AO_BYTE_TS_val to CHAR" compiler warning
is eliminated.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& (!_M_ARM || _M_ARM>=6)] (AO_test_and_set_full): Cast AO_TS_SET to
AO_TS_t (before passing to the argument of char type); apply &0xff to
the result instead of cast to unsigned char; add comment.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& (_M_ARM>=6 || _M_ARM64)] (AO_test_and_set, AO_test_and_set_acquire,
AO_test_and_set_release): Likewise.
|
|
|
|
|
| |
* Makefile.msft (CFLAGS): Replace -W3 to -W4.
* Makefile.msft (atomic_ops_malloc.obj): Add /wd4127 option.
|
|
|
|
|
|
|
| |
(fix of commit 1835cad76)
* src/atomic_ops_malloc.c (AO_malloc): Add AO_ATTR_MALLOC and
AO_ATTR_ALLOC_SIZE (to match that in atomic_ops_malloc.h).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER >= 1800
&& !AO_PREFER_GENERALIZED] (_InterlockedAnd16, _InterlockedOr16,
_InterlockedXor16, _InterlockedAnd, _InterlockedOr, _InterlockedXor):
Specify as intrinsic.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER >= 1800
&& !AO_PREFER_GENERALIZED && !AO_T_IS_INT] (_InterlockedAnd64,
_InterlockedOr64, _InterlockedXor64): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER >= 1800
&& !AO_PREFER_GENERALIZED && (_M_ARM || _M_ARM64)]
(_InterlockedAnd16_acq, _InterlockedAnd16_nf, _InterlockedAnd16_rel,
_InterlockedOr16_acq, _InterlockedOr16_nf, _InterlockedOr16_rel,
_InterlockedXor16_acq, _InterlockedXor16_nf, _InterlockedXor16_rel,
_InterlockedAnd_acq, _InterlockedAnd_nf, _InterlockedAnd_rel,
_InterlockedOr_acq, _InterlockedOr_nf, _InterlockedOr_rel,
_InterlockedXor_acq, _InterlockedXor_nf, _InterlockedXor_rel):
Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER >= 1800
&& !AO_PREFER_GENERALIZED && (_M_ARM || _M_ARM64) && !AO_T_IS_INT]
(_InterlockedAnd64_acq, _InterlockedAnd64_nf, _InterlockedAnd64_rel,
_InterlockedOr64_acq, _InterlockedOr64_nf, _InterlockedOr64_rel,
_InterlockedXor64_acq, _InterlockedXor64_nf, _InterlockedXor64_rel):
Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER >= 1800
&& !AO_PREFER_GENERALIZED] (AO_short_and_full, AO_short_or_full,
AO_short_xor_full, AO_and_full, AO_or_full, AO_xor_full): Implement.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER >= 1800
&& !AO_PREFER_GENERALIZED && !AO_T_IS_INT] (AO_int_and_full,
AO_int_or_full, AO_int_xor_full): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER >= 1800
&& !AO_PREFER_GENERALIZED && (_M_ARM || _M_ARM64)] (AO_short_and,
AO_short_or, AO_short_xor, AO_short_and_acquire, AO_short_or_acquire,
AO_short_xor_acquire, AO_short_and_release, AO_short_or_release,
AO_short_xor_release, AO_and, AO_or, AO_xor, AO_and_acquire,
AO_or_acquire, AO_xor_acquire, AO_and_release, AO_or_release,
AO_xor_release): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER >= 1800
&& !AO_PREFER_GENERALIZED && (_M_ARM || _M_ARM64) && !AO_T_IS_INT]
(AO_int_and, AO_int_or, AO_int_xor, AO_int_and_acquire,
AO_int_or_acquire, AO_int_xor_acquire, AO_int_and_release,
AO_int_or_release, AO_int_xor_release): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& !AO_PREFER_GENERALIZED && (_M_ARM || _M_ARM64)]
(_InterlockedAnd8_acq, _InterlockedAnd8_nf, _InterlockedAnd8_rel,
_InterlockedOr8_acq, _InterlockedOr8_nf, _InterlockedOr8_rel,
_InterlockedXor8_acq, _InterlockedXor8_nf, _InterlockedXor8_rel,
_InterlockedDecrement16_acq, _InterlockedDecrement16_nf,
_InterlockedDecrement16_rel, _InterlockedIncrement16_acq,
_InterlockedIncrement16_nf, _InterlockedIncrement16_rel,
_InterlockedExchangeAdd_acq, _InterlockedExchangeAdd_nf,
_InterlockedExchangeAdd_rel, _InterlockedDecrement_acq,
_InterlockedDecrement_nf, _InterlockedDecrement_rel,
_InterlockedIncrement_acq, _InterlockedIncrement_nf,
_InterlockedIncrement_rel): Specify as intrinsic.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& !AO_PREFER_GENERALIZED && (_M_ARM || _M_ARM64) && !AO_T_IS_INT]
(_InterlockedExchangeAdd64_acq, _InterlockedExchangeAdd64_nf,
_InterlockedExchangeAdd64_rel, _InterlockedDecrement64_acq,
_InterlockedDecrement64_nf, _InterlockedDecrement64_rel,
_InterlockedIncrement64_acq, _InterlockedIncrement64_nf,
_InterlockedIncrement64_rel): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
(_M_ARM || _M_ARM64)] (_InterlockedCompareExchange_acq,
_InterlockedCompareExchange_nf, _InterlockedCompareExchange_rel,
_InterlockedCompareExchange16_acq, _InterlockedCompareExchange16_nf,
_InterlockedCompareExchange16_rel, _InterlockedCompareExchange8_acq,
_InterlockedCompareExchange8_nf, _InterlockedCompareExchange8_rel):
Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
(_M_ARM || _M_ARM64) && !AO_T_IS_INT]
(_InterlockedCompareExchange64_acq, _InterlockedCompareExchange64_nf,
_InterlockedCompareExchange64_rel): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& !AO_PREFER_GENERALIZED && !_M_ARM && _M_ARM64]
(_InterlockedExchangeAdd16_acq, _InterlockedExchangeAdd16_nf,
_InterlockedExchangeAdd16_rel, _InterlockedExchangeAdd8_acq,
_InterlockedExchangeAdd8_nf, _InterlockedExchangeAdd8_rel): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800 &&
&& !AO_PREFER_GENERALIZED && (_M_ARM || _M_ARM64)] (AO_char_and,
AO_char_or, AO_char_xor, AO_char_and_acquire, AO_char_or_acquire,
AO_char_xor_acquire, AO_char_and_release, AO_char_or_release,
AO_char_xor_release, AO_short_fetch_and_add1, AO_short_fetch_and_sub1,
AO_short_fetch_and_add1_acquire, AO_short_fetch_and_sub1_acquire,
AO_short_fetch_and_add1_release, AO_short_fetch_and_sub1_release,
AO_fetch_and_add, AO_fetch_and_add1, AO_fetch_and_sub1,
AO_fetch_and_add_acquire, AO_fetch_and_add1_acquire,
AO_fetch_and_sub1_acquire, AO_fetch_and_add_release,
AO_fetch_and_add1_release, AO_fetch_and_sub1_release): Implement.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& !AO_PREFER_GENERALIZED && (_M_ARM || _M_ARM64) && !AO_T_IS_INT]
(AO_int_fetch_and_add, AO_int_fetch_and_add1, AO_int_fetch_and_sub1,
AO_int_fetch_and_add_acquire, AO_int_fetch_and_add1_acquire,
AO_int_fetch_and_sub1_acquire, AO_int_fetch_and_add_release,
AO_int_fetch_and_add1_release, AO_int_fetch_and_sub1_release):
Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
(_M_ARM || _M_ARM64)] (AO_fetch_compare_and_swap,
AO_fetch_compare_and_swap_acquire, AO_fetch_compare_and_swap_release,
AO_short_fetch_compare_and_swap,
AO_short_fetch_compare_and_swap_acquire,
AO_short_fetch_compare_and_swap_release,
AO_char_fetch_compare_and_swap, AO_char_fetch_compare_and_swap_acquire,
AO_char_fetch_compare_and_swap_release): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
(_M_ARM || _M_ARM64) && !AO_T_IS_INT] (AO_int_fetch_compare_and_swap,
AO_int_fetch_compare_and_swap_acquire,
AO_int_fetch_compare_and_swap_release): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& !AO_PREFER_GENERALIZED && !_M_ARM && _M_ARM64]
(AO_char_fetch_and_add, AO_short_fetch_and_add,
AO_char_fetch_and_add_acquire, AO_short_fetch_and_add_acquire,
AO_char_fetch_and_add_release, AO_short_fetch_and_add_release):
Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/atomic_ops/sysdeps/msftc/arm.h: Include test_and_set_t_is_ao_t.h
after include common32_defs.h and only unless
AO_HAVE_test_and_set_full.
* src/atomic_ops/sysdeps/msftc/arm64.h: Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [!AO_ASM_X64_AVAILABLE]:
Likewise.
* src/atomic_ops/sysdeps/msftc/arm.h [_M_ARM>=6]: Remove comment.
* src/atomic_ops/sysdeps/msftc/arm.h [_M_ARM<6]: Remove TODO item.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& (!_M_ARM || _M_ARM>=6)]: Include test_and_set_t_is_char.h.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& (!_M_ARM || _M_ARM>=6)] (_InterlockedExchange8): Specify as
intrinsic.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& (_M_ARM>=6 || _M_ARM64)] (_InterlockedExchange8_acq,
_InterlockedExchange8_nf, _InterlockedExchange8_rel): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& (!_M_ARM || _M_ARM>=6)] (AO_test_and_set_full): Implement.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER>=1800
&& (_M_ARM>=6 || _M_ARM64)] (AO_test_and_set, AO_test_and_set_acquire,
AO_test_and_set_release): Likewise.
* src/atomic_ops/sysdeps/msftc/x86.h: Include test_and_set_t_is_char.h
after include common32_defs.h and only unless
AO_HAVE_test_and_set_full.
* src/atomic_ops/sysdeps/msftc/x86_64.h [AO_ASM_X64_AVAILABLE]:
Likewise.
|