]> granicus.if.org Git - libatomic_ops/log
libatomic_ops
7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Tue, 12 Dec 2017 14:54:03 +0000 (17:54 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)
(Cherry-pick commit e3fdda6 from 'release-7_4' branch.)

7 years agoUse dedicated no_sanitize_thread load/store instead of copy_before_cas
Ivan Maidanski [Thu, 21 Dec 2017 07:49:27 +0000 (10:49 +0300)]
Use dedicated no_sanitize_thread load/store instead of copy_before_cas
(fix commits 6ffda1db110b0dcc)

This is also a workaround for a TSan false positive reported
in AO_stack_pop_acquire.

* src/atomic_ops_stack.c (AO_copy_before_cas): Remove.
* src/atomic_ops_stack.c (store_before_cas): New static function (or
defined as a macro).
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (load_before_cas):
Likewiese.
* src/atomic_ops_stack.c (AO_stack_push_explicit_aux_release,
AO_stack_push_release): Use store_before_cas instead of
AO_copy_before_cas.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (load_before_cas):
Add volatile to addr argument if Clang.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (AO_stack_pop_acquire):
Use load_before_cas instead of AO_copy_before_cas.

7 years agoWorkaround TSan false positive in AO_stack_pop_explicit_aux_acquire
Ivan Maidanski [Wed, 20 Dec 2017 23:25:48 +0000 (02:25 +0300)]
Workaround TSan false positive in AO_stack_pop_explicit_aux_acquire
(fix commits c058d9d6ffda1db)

The TSan-related workaround in AO_malloc is no longer needed.

* src/atomic_ops_malloc.c [AO_THREAD_SANITIZER
&& AO_USE_ALMOST_LOCK_FREE] (AO_malloc): Do not use AO_store (always
use *result=log_sz); remove comment.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE
&& AO_THREAD_SANITIZER] (AO_load_next): New static function (with
AO_ATTR_NO_SANITIZE_THREAD attribute); add comments.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE
&& !AO_THREAD_SANITIZER] (AO_load_next): Define to AO_load.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_pop_explicit_aux_acquire): Replace AO_load(first_ptr) with
AO_load_next(first_ptr).

7 years agoTravis CI: Test DONT_USE_MMAP (Linux)
Ivan Maidanski [Wed, 20 Dec 2017 22:54:59 +0000 (01:54 +0300)]
Travis CI: Test DONT_USE_MMAP (Linux)

7 years agoTravis CI: Test AO_USE_ALMOST_LOCK_FREE in more configurations
Ivan Maidanski [Wed, 20 Dec 2017 22:46:27 +0000 (01:46 +0300)]
Travis CI: Test AO_USE_ALMOST_LOCK_FREE in more configurations
(fix commits e0411c61468661)

7 years agoTravis CI: Test with AO_STACK_PREFER_CAS_DOUBLE
Ivan Maidanski [Wed, 20 Dec 2017 22:04:31 +0000 (01:04 +0300)]
Travis CI: Test with AO_STACK_PREFER_CAS_DOUBLE

7 years agoTravis CI: Test malloc/stack with AO_USE_PTHREAD_DEFS
Ivan Maidanski [Wed, 20 Dec 2017 21:57:53 +0000 (00:57 +0300)]
Travis CI: Test malloc/stack with AO_USE_PTHREAD_DEFS

7 years agoNew macro to select stack implementation based on CAS-double
Ivan Maidanski [Wed, 20 Dec 2017 21:52:57 +0000 (00:52 +0300)]
New macro to select stack implementation based on CAS-double

The macro is AO_STACK_PREFER_CAS_DOUBLE.  This is only for testing.

* 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,
AO_stack_pop_acquire): Use implementation based compare_and_swap_double
instead of compare_double_and_swap_double); remove #error directive.

7 years agoPrevent too long run of test_atomic_generalized (especially with TSan)
Ivan Maidanski [Wed, 20 Dec 2017 21:37:54 +0000 (00:37 +0300)]
Prevent too long run of test_atomic_generalized (especially with TSan)

* tests/test_atomic.c [AO_PREFER_GENERALIZED] (NITERS): Set to a smaller
value (the same one as for AO_USE_PTHREAD_DEFS).

7 years agoFill in allocated memory with values depending on thread id (test_malloc)
Ivan Maidanski [Wed, 20 Dec 2017 07:31:07 +0000 (10:31 +0300)]
Fill in allocated memory with values depending on thread id (test_malloc)

* tests/test_malloc.c (run_one_test): Define new local variables a, b
(with the values depending on arg); replace 'a' and 'b' with a and b,
respectively; reformat the code; return NULL instead of arg; remove
the comment (the workaround is no longer needed).

7 years agoEliminate GCC-5 ASan global-buffer-overflow false positive for AO_stack_bl
Ivan Maidanski [Wed, 20 Dec 2017 07:22:20 +0000 (10:22 +0300)]
Eliminate GCC-5 ASan global-buffer-overflow false positive for AO_stack_bl

* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Replace a->AO_stack_bl+i with
&a->AO_stack_bl[i] (including the case of i==0).

7 years agoMark unallocated/freed memory as inaccessible using ASan functionality
Ivan Maidanski [Wed, 20 Dec 2017 07:11:54 +0000 (10:11 +0300)]
Mark unallocated/freed memory as inaccessible using ASan functionality

Note: to disable it, AO_NO_MALLOC_POISON should be defined by client.

* src/atomic_ops_malloc.c [AO_ADDRESS_SANITIZER && !AO_NO_MALLOC_POISON]
(__asan_poison_memory_region, __asan_unpoison_memory_region): Prototype.
* src/atomic_ops_malloc.c (ASAN_POISON_MEMORY_REGION,
ASAN_UNPOISON_MEMORY_REGION): New macro.
* src/atomic_ops_malloc.c (add_chunk_as): Call
ASAN_POISON_MEMORY_REGION() for each pushed region.
* src/atomic_ops_malloc.c (AO_malloc): Call
ASAN_UNPOISON_MEMORY_REGION() for the returned memory region.
* src/atomic_ops_malloc.c (AO_free): Call ASAN_POISON_MEMORY_REGION()
before pushing the freed region to AO_free_list.

7 years agoTravis CI: Test AO_USE_ALMOST_LOCK_FREE macro also with ASan
Ivan Maidanski [Wed, 20 Dec 2017 07:00:28 +0000 (10:00 +0300)]
Travis CI: Test AO_USE_ALMOST_LOCK_FREE macro also with ASan
(fix commit e0411c6)

7 years agoTravis CI: Test with a custom AO_BL_SIZE value
Ivan Maidanski [Tue, 19 Dec 2017 22:22:19 +0000 (01:22 +0300)]
Travis CI: Test with a custom AO_BL_SIZE value

7 years agoDo not test CHUNK_SIZE allocation if no mmap() available (test_malloc)
Ivan Maidanski [Tue, 19 Dec 2017 09:05:01 +0000 (12:05 +0300)]
Do not test CHUNK_SIZE allocation if no mmap() available (test_malloc)
(fix commit 29d91db)

* tests/test_malloc.c (main): Do not call AO_malloc(CHUNK_SIZE) unless
HAVE_MMAP.

7 years agoTravis CI: Test AO_USE_ALMOST_LOCK_FREE macro (Linux/x64)
Ivan Maidanski [Tue, 19 Dec 2017 08:57:32 +0000 (11:57 +0300)]
Travis CI: Test AO_USE_ALMOST_LOCK_FREE macro (Linux/x64)

7 years agoAllow to select almost-non-blocking stack implementation explicitly
Ivan Maidanski [Tue, 19 Dec 2017 08:46:06 +0000 (11:46 +0300)]
Allow to select almost-non-blocking stack implementation explicitly

This could be used e.g. if built-in double-word CAS has some bug.

* src/atomic_ops_stack.h (AO_STACK_IS_LOCK_FREE): Do not define if
AO_USE_ALMOST_LOCK_FREE is explicitly defined (outside).

7 years agoFix typo in AO_REAL_NEXT_PTR comment (atomic_ops_stack.h)
Ivan Maidanski [Tue, 19 Dec 2017 08:26:10 +0000 (11:26 +0300)]
Fix typo in AO_REAL_NEXT_PTR comment (atomic_ops_stack.h)

* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE] (AO_REAL_NEXT_PTR):
Fix typo ("either NULL") in the comment.

7 years agoNew macro (DONT_USE_MMAP) to support testing as if mmap() is unavailable
Ivan Maidanski [Tue, 19 Dec 2017 08:19:44 +0000 (11:19 +0300)]
New macro (DONT_USE_MMAP) to support testing as if mmap() is unavailable

* src/atomic_ops_malloc.c [DONT_USE_MMAP] (HAVE_MMAP): Undefine (after
including config.h).
* tests/test_malloc.c [DONT_USE_MMAP] (HAVE_MMAP): Likewise.

7 years agoUse double-word atomic intrinsics for recent Clang versions (gcc/x86.h)
Ivan Maidanski [Fri, 8 Dec 2017 17:02:48 +0000 (20:02 +0300)]
Use double-word atomic intrinsics for recent Clang versions (gcc/x86.h)

Older clang versions have some bugs or limitations that prevent from
using double-word built-in atomic operations.

Note: even as of clang-4.0, there seems to be a bug in some
double-word built-in operation if Thread Sanitizer is used.

* src/atomic_ops/sysdeps/gcc/x86.h [AO_GCC_ATOMIC_TEST_AND_SET
&& __APPLE_CC__ && __x86_64__]
(AO_SKIPATOMIC_double_compare_and_swap_ANY): Do not define if
AO_CLANG_PREREQ(9, 0); update comment.
* src/atomic_ops/sysdeps/gcc/x86.h [AO_GCC_ATOMIC_TEST_AND_SET
&& !__APPLE_CC__ && __clang__ && !__x86_64__
&& !AO_PREFER_BUILTIN_ATOMICS && !__CYGWIN__]
(AO_SKIPATOMIC_double_compare_and_swap_ANY,
AO_SKIPATOMIC_DOUBLE_LOAD_STORE_ANY): Do not define if
AO_CLANG_PREREQ(5, 0); update comment.
* src/atomic_ops/sysdeps/gcc/x86.h [AO_GCC_ATOMIC_TEST_AND_SET
&& !__APPLE_CC__ && __clang__ && __x86_64__ && !__ILP32__
&& AO_ADDRESS_SANITIZER] (AO_SKIPATOMIC_double_compare_and_swap_ANY
AO_SKIPATOMIC_DOUBLE_LOAD_STORE_ANY): Do not define if
AO_CLANG_PREREQ(4, 0); update comment.

7 years agoDo not define copy_before_cas() as inline
Ivan Maidanski [Fri, 8 Dec 2017 16:04:50 +0000 (19:04 +0300)]
Do not define copy_before_cas() as inline
(fix commit 6ffda1d)

* src/atomic_ops_stack.c (AO_copy_before_cas): Replace AO_INLINE with
static.

7 years agoSimplify '#if' expressions in gcc/x86.h
Ivan Maidanski [Fri, 8 Dec 2017 08:30:40 +0000 (11:30 +0300)]
Simplify '#if' expressions in gcc/x86.h
(code refactoring)

* src/atomic_ops/sysdeps/gcc/x86.h [AO_GCC_ATOMIC_TEST_AND_SET]
(AO_SKIPATOMIC_double_compare_and_swap_ANY, AO_SKIPATOMIC_double_load,
AO_SKIPATOMIC_double_load_acquire, AO_SKIPATOMIC_double_store,
AO_SKIPATOMIC_double_store_release): Simplify "#if" condition
expressions.

7 years agoDisable workaround in stack_pop_acquire that was needed for ancient Clang
Ivan Maidanski [Fri, 8 Dec 2017 06:58:05 +0000 (09:58 +0300)]
Disable workaround in stack_pop_acquire that was needed for ancient Clang

* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE
&& AO_HAVE_compare_double_and_swap_double && __clang__]
(AO_stack_pop_acquire): Do not declare cptr local variable as volatile
if AO_CLANG_PREREQ(3, 5).

7 years agoMinimize use of AO_ATTR_NO_SANITIZE_THREAD in atomic_ops_malloc/stack
Ivan Maidanski [Thu, 7 Dec 2017 08:14:46 +0000 (11:14 +0300)]
Minimize use of AO_ATTR_NO_SANITIZE_THREAD in atomic_ops_malloc/stack
(fix commit c058d9d)

* src/atomic_ops_malloc.c [AO_THREAD_SANITIZER] (AO_malloc):
Use AO_store() only if AO_USE_ALMOST_LOCK_FREE; add comment.
* src/atomic_ops_malloc.c (AO_free): Remove TSan workaround (do not
check AO_THREAD_SANITIZER macro).
* src/atomic_ops_stack.c (AO_copy_before_cas): New inline function.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Remove AO_ATTR_NO_SANITIZE_THREAD.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE
&& AO_HAVE_compare_double_and_swap_double] (AO_stack_push_release,
AO_stack_pop_acquire): Likewise.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Replace *x=next with
AO_copy_before_cas(x,&next).
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE]
(AO_stack_push_release): Likewise.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE] (AO_stack_pop_acquire):
Replace next=*cptr with AO_copy_before_cas(&next,cptr).
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE
&& AO_HAVE_compare_and_swap_double] (AO_stack_pop_acquire): Reformat
code.

7 years agoTravis CI: Test with a bigger number of threads (32)
Ivan Maidanski [Thu, 7 Dec 2017 07:06:19 +0000 (10:06 +0300)]
Travis CI: Test with a bigger number of threads (32)

7 years agoIncrease the default number of threads to 16 in test_malloc/stack
Ivan Maidanski [Wed, 6 Dec 2017 21:39:04 +0000 (00:39 +0300)]
Increase the default number of threads to 16 in test_malloc/stack

* tests/test_malloc.c [!DEFAULT_NTHREADS && HAVE_MMAP]
(DEFAULT_NTHREADS): Change the value from 10 to 16.
* tests/test_stack.c [!DEFAULT_NTHREADS] (DEFAULT_NTHREADS): Change
the value from 4 to 16.

7 years agoAllow to alter DEFAULT/MAX_NTHREADS values in test_malloc/stack
Ivan Maidanski [Wed, 6 Dec 2017 21:22:41 +0000 (00:22 +0300)]
Allow to alter DEFAULT/MAX_NTHREADS values in test_malloc/stack
(code refactoring)

* tests/run_parallel.h [!MAX_NTHREADS] (MAX_NTHREADS): Define (move
from test_malloc.c).
* tests/run_parallel.h [USE_PTHREADS || USE_VXTHREADS
|| USE_WINTHREADS] (run_parallel): Replace 100 with MAX_NTHREADS.
* tests/test_malloc.c (main): Add assertion that DEFAULT_NTHREADS
is not greater than MAX_NTHREADS.
* tests/test_stack.c (main): Likewise.
* tests/test_stack.c [!DEFAULT_NTHREADS] (DEFAULT_NTHREADS): Define
(to 4).
* tests/test_stack.c (main): Use DEFAULT_NTHREADS (instead of 4).

7 years agoFix test_stack failure if AO_PREFER_BUILTIN_ATOMICS (GCC/Aarch64)
Ivan Maidanski [Wed, 6 Dec 2017 21:00:18 +0000 (00:00 +0300)]
Fix test_stack failure if AO_PREFER_BUILTIN_ATOMICS (GCC/Aarch64)

As of gcc-5.4/aarch64, not all of the built-in double-word atomics
are implemented correctly.

* src/atomic_ops/sysdeps/gcc/aarch64.h [!__clang__
|| AO_AARCH64_ASM_LOAD_STORE_CAS] (AO_double_load,
AO_double_load_acquire, AO_double_store, AO_double_store_release,
AO_double_compare_and_swap, AO_double_compare_and_swap_acquire,
AO_double_compare_and_swap_release, AO_double_compare_and_swap_full):
Define (asm-based implementation) even if AO_PREFER_BUILTIN_ATOMICS
or AO_THREAD_SANITIZER; update comment.

7 years agoFix test failures for Clang-3.8 and older (Aarch64)
Ivan Maidanski [Wed, 6 Dec 2017 08:42:35 +0000 (11:42 +0300)]
Fix test failures for Clang-3.8 and older (Aarch64)

For older Clang/aarch64 releases, double-wide atomics are no longer
supported.

* src/atomic_ops/sysdeps/gcc/aarch64.h [__clang__
&& !AO_CLANG_PREREQ(3, 9)]: Do not include standard_ao_double_t.h file;
add comment.
* src/atomic_ops/sysdeps/gcc/aarch64.h [__clang__
&& !AO_CLANG_PREREQ(3, 8)] (AO_SKIPATOMIC_double_load,
AO_SKIPATOMIC_double_load_acquire): Do not define and do not undefine
(since generic.h is included only for GCC and for Clang v3.9+).
* src/atomic_ops/sysdeps/gcc/aarch64.h [AO_AARCH64_ASM_LOAD_STORE_CAS]
(AO_double_load, AO_double_load_acquire, AO_double_store,
AO_double_store_release, AO_double_compare_and_swap,
AO_double_compare_and_swap_acquire, AO_double_compare_and_swap_release,
AO_double_compare_and_swap_full): Do not define if __clang__
&& !AO_CLANG_PREREQ(3, 9).
* src/atomic_ops/sysdeps/gcc/aarch64.h (AO_GCC_HAVE_double_SYNC_CAS):
Likewise.

7 years agoUse generalized double-wide load/store if AO_PREFER_GENERALIZED (Aarch64)
Ivan Maidanski [Wed, 6 Dec 2017 08:17:49 +0000 (11:17 +0300)]
Use generalized double-wide load/store if AO_PREFER_GENERALIZED (Aarch64)

* src/atomic_ops/sysdeps/gcc/aarch64.h [!__clang__
|| AO_AARCH64_ASM_LOAD_STORE_CAS] (AO_double_load,
AO_double_load_acquire, AO_double_store, AO_double_store_release):
Do not define (using asm) if AO_PREFER_GENERALIZED.
* src/atomic_ops/sysdeps/gcc/aarch64.h (AO_GCC_HAVE_double_SYNC_CAS):
Define also for GCC; update comment.

7 years agoDefine double-word CAS for all clang/aarch64 versions
Ivan Maidanski [Wed, 6 Dec 2017 08:05:38 +0000 (11:05 +0300)]
Define double-word CAS for all clang/aarch64 versions
(fix commit 46d43dc)

* src/atomic_ops/sysdeps/gcc/aarch64.h [__clang__]
(AO_GCC_HAVE_double_SYNC_CAS): Define for all Clang versions.

7 years agoDo not expose AO_GCC_FORCE_HAVE_CAS macro to client code
Ivan Maidanski [Tue, 5 Dec 2017 21:28:33 +0000 (00:28 +0300)]
Do not expose AO_GCC_FORCE_HAVE_CAS macro to client code
(code refactoring)

* src/atomic_ops/sysdeps/gcc/aarch64.h (AO_GCC_FORCE_HAVE_CAS,
AO_GCC_HAVE_double_SYNC_CAS): Undefine at the end of file.
* src/atomic_ops/sysdeps/gcc/hexagon.h (AO_GCC_FORCE_HAVE_CAS,
AO_GCC_HAVE_double_SYNC_CAS): Likewise.
* src/atomic_ops/sysdeps/gcc/mips.h (AO_GCC_FORCE_HAVE_CAS): Likewise.
* src/atomic_ops/sysdeps/gcc/x86.h (AO_GCC_FORCE_HAVE_CAS): Likewise.

7 years agoUse built-in atomics for load/store/CAS for Clang by default (Aarch64)
Ivan Maidanski [Tue, 5 Dec 2017 09:03:51 +0000 (12:03 +0300)]
Use built-in atomics for load/store/CAS for Clang by default (Aarch64)

* src/atomic_ops/sysdeps/gcc/aarch64.h [!AO_PREFER_BUILTIN_ATOMICS]
(AO_double_load, AO_double_load_acquire, AO_double_store,
AO_double_store_release, AO_double_compare_and_swap,
AO_double_compare_and_swap_acquire, AO_double_compare_and_swap_release,
AO_double_compare_and_swap_full): Do not define (using asm) if
AO_THREAD_SANITIZER or if Clang (unless AO_AARCH64_ASM_LOAD_STORE_CAS).

7 years agoDo not disallow to define double_load using built-in atomics (Aarch64)
Ivan Maidanski [Tue, 5 Dec 2017 08:27:47 +0000 (11:27 +0300)]
Do not disallow to define double_load using built-in atomics (Aarch64)
(fix commit 03a0465)

Clang 3.8 (and later) and GCC have the correct implementation of
double-word atomic load (containing STXP instruction) for Aarch64.

* src/atomic_ops/sysdeps/gcc/aarch64.h [AO_PREFER_BUILTIN_ATOMICS]
(AO_SKIPATOMIC_double_load, AO_SKIPATOMIC_double_load_acquire): Do not
define for GCC and if AO_CLANG_PREREQ(3, 8).

7 years agoUse GCC built-in atomic to define nop_write in case of TSan (Aarch64)
Ivan Maidanski [Tue, 5 Dec 2017 07:51:45 +0000 (10:51 +0300)]
Use GCC built-in atomic to define nop_write in case of TSan (Aarch64)

* src/atomic_ops/sysdeps/gcc/aarch64.h [!AO_PREFER_BUILTIN_ATOMICS
&& !AO_UNIPROCESSOR] (AO_nop_write): Do not define (using asm DMB)
if AO_THREAD_SANITIZER; update comment.

7 years agoDo not define AO_GCC_FORCE_HAVE_CAS for Clang 3.8+ (Aarch64)
Ivan Maidanski [Tue, 5 Dec 2017 07:41:39 +0000 (10:41 +0300)]
Do not define AO_GCC_FORCE_HAVE_CAS for Clang 3.8+ (Aarch64)
(fix commit 83fca68)

Clang now defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n macros (so,
the workaround is not needed anymore).

* src/atomic_ops/sysdeps/gcc/aarch64.h (AO_GCC_FORCE_HAVE_CAS,
AO_GCC_HAVE_double_SYNC_CAS): Do not define if AO_CLANG_PREREQ(3, 8)
(unless __APPLE_CC__).

7 years agoUse __builtin_expect in atomic_ops_malloc
Ivan Maidanski [Mon, 4 Dec 2017 21:21:04 +0000 (00:21 +0300)]
Use __builtin_expect in atomic_ops_malloc

* src/atomic_ops_malloc.c [HAVE_MMAP] (get_mmaped, SIZET_SAT_ADD,
AO_malloc_large): Use AO_EXPECT_FALSE.
* src/atomic_ops_malloc.c (get_chunk, msb, AO_malloc, AO_free):
Likewise.
* src/atomic_ops_malloc.c (AO_malloc_large): Reformat code.

7 years agoTravis CI: Test mmap-based atomic_ops_malloc with CSA
Ivan Maidanski [Mon, 4 Dec 2017 21:11:27 +0000 (00:11 +0300)]
Travis CI: Test mmap-based atomic_ops_malloc with CSA

7 years agoTest smallest allocation of large type (test_malloc)
Ivan Maidanski [Mon, 4 Dec 2017 21:08:40 +0000 (00:08 +0300)]
Test smallest allocation of large type (test_malloc)

* src/atomic_ops_malloc.c (AO_malloc_large): Add assertion that the
stored size is greater than LOG_MAX_SIZE.
* src/atomic_ops_malloc.c (AO_malloc): Add assertions for log_size.
* tests/test_malloc.c (LOG_MAX_SIZE, CHUNK_SIZE): New macro (copied
from atomic_ops_malloc.c).
* tests/test_malloc.c (main): Call AO_free(0), AO_malloc(0),
AO_malloc(CHUNK_SIZE-sizeof(AO_t)+1); add comment.

7 years agoFix AO_malloc for sizes near CHUNK_SIZE
Ivan Maidanski [Mon, 4 Dec 2017 20:28:01 +0000 (23:28 +0300)]
Fix AO_malloc for sizes near CHUNK_SIZE

Without this patch, e.g an object of CHUNK_SIZE is treated as non-large
in AO_malloc but freed by AO_free_large (incorrectly).

* src/atomic_ops_malloc.c (AO_malloc): Call AO_malloc_large() also for
size values in range CHUNK_SIZE-sizeof(AO_t)+1 .. CHUNK_SIZE.

7 years agoTravis CI: Test with ASan and -D USE_STANDARD_MALLOC
Ivan Maidanski [Sun, 3 Dec 2017 07:28:23 +0000 (10:28 +0300)]
Travis CI: Test with ASan and -D USE_STANDARD_MALLOC

Test that no memory leak exists in test_malloc.

7 years agoFix memory leak in test_malloc
Ivan Maidanski [Sun, 3 Dec 2017 07:14:33 +0000 (10:14 +0300)]
Fix memory leak in test_malloc

* tests/test_malloc.c (free_list): New function definition.
* tests/test_malloc.c (run_one_test): Call free_list(x) on return.

7 years agoAnnotate AO_malloc with 'alloc_size' and 'malloc' attributes
Ivan Maidanski [Fri, 1 Dec 2017 17:32:34 +0000 (20:32 +0300)]
Annotate AO_malloc with 'alloc_size' and 'malloc' attributes

* src/atomic_ops_malloc.h [!AO_ATTR_MALLOC] (AO_ATTR_MALLOC): New macro.
* src/atomic_ops_malloc.h [!AO_ATTR_ALLOC_SIZE] (AO_ATTR_ALLOC_SIZE):
Likewise.
* src/atomic_ops_malloc.h (AO_malloc): Add AO_ATTR_MALLOC,
AO_ATTR_ALLOC_SIZE attributes.

7 years agoTravis CI: Test with ASan and -march=native with Clang-4.0 (Linux/x64)
Ivan Maidanski [Fri, 1 Dec 2017 17:21:43 +0000 (20:21 +0300)]
Travis CI: Test with ASan and -march=native with Clang-4.0 (Linux/x64)

7 years agoUpdate ChangeLog file (v7.6 changes only)
Ivan Maidanski [Fri, 1 Dec 2017 17:00:15 +0000 (20:00 +0300)]
Update ChangeLog file (v7.6 changes only)

7 years agoDefine AO_TS_SET to true (1) if GCC atomic_test_and_set is used
Ivan Maidanski [Tue, 28 Nov 2017 19:11:15 +0000 (22:11 +0300)]
Define AO_TS_SET to true (1) if GCC atomic_test_and_set is used
(fix commit 3315a03)

According to GCC manual about the built-in functions for memory model
aware atomic operations, __atomic_test_and_set returns bool value;
bool true is encoded as 1.

* src/atomic_ops/sysdeps/test_and_set_t_is_char.h [AO_PREFER_GENERALIZED
|| !__GCC_ATOMIC_TEST_AND_SET_TRUEVAL] (AO_TS_SET_TRUEVAL): Define to 1
(instead of 0xff).

7 years agoDo not use asm-based 16-byte CAS if compiled with TSan (Linux/x64)
Ivan Maidanski [Tue, 28 Nov 2017 08:28:32 +0000 (11:28 +0300)]
Do not use asm-based 16-byte CAS if compiled with TSan (Linux/x64)
(fix commit c058d9d)

Thread Sanitizer does not know the semantic of the asm synchronization
instructions.

* src/atomic_ops/sysdeps/gcc/x86.h [x86_64 && !ILP32
&& __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 && AO_THREAD_SANITIZER]
(AO_compare_double_and_swap_double_full): Do not define.

7 years agoTravis CI: Test with TSan when a 16-byte CAS is available
Ivan Maidanski [Tue, 28 Nov 2017 08:12:04 +0000 (11:12 +0300)]
Travis CI: Test with TSan when a 16-byte CAS is available

7 years agoEliminate data race in cons() of test_malloc
Ivan Maidanski [Tue, 28 Nov 2017 08:06:36 +0000 (11:06 +0300)]
Eliminate data race in cons() of test_malloc
(fix commit c058d9d)

The data race has not affected the functionality of the test but this
commit allows to avoid no_sanitize attribute for the function.

* tests/test_malloc.c (cons): Remove AO_ATTR_NO_SANITIZE_THREAD
attribute; Do not reset extra (use "%" operator to get my_extra value).
* tests/test_malloc.c [AO_HAVE_fetch_and_add1] (cons): Change type of
extra to AO_t, add volatile qualifier; use AO_fetch_and_add1 instead of
"++" operator to update extra.

7 years agoTravis CI: Fix 'unrecognized option --push-state' link error (Linux/gcc)
Ivan Maidanski [Mon, 27 Nov 2017 08:12:31 +0000 (11:12 +0300)]
Travis CI: Fix 'unrecognized option --push-state' link error (Linux/gcc)
(fix commits cb7cab330d68cc)

Thanks to Issam Maghni <concatime@users.noreply.github.com>
for suggesting to use gold linker.

7 years agoTravis CI: Fix 'no sys/cdefs.h' error for 32-bit sanitized build for Linux
Ivan Maidanski [Mon, 20 Nov 2017 18:38:13 +0000 (21:38 +0300)]
Travis CI: Fix 'no sys/cdefs.h' error for 32-bit sanitized build for Linux
(fix commit cb7cab3)

7 years agoTravis CI: Test also with GCC with ASan enabled
Ivan Maidanski [Mon, 20 Nov 2017 07:53:34 +0000 (10:53 +0300)]
Travis CI: Test also with GCC with ASan enabled

7 years agoFix 'unknown attribute no_sanitize' compiler warning for GCC
Ivan Maidanski [Mon, 20 Nov 2017 06:56:25 +0000 (09:56 +0300)]
Fix 'unknown attribute no_sanitize' compiler warning for GCC
(fix commits 9020c5db6a3eee47c058d9dc637f7fe1)

* src/atomic_ops.h [!__has_feature && __SANITIZE_ADDRESS__]
(AO_ADDRESS_SANITIZER): Define.
* src/atomic_ops.h [!AO_ATTR_NO_SANITIZE_MEMORY && AO_MEMORY_SANITIZER
&& !AO_CLANG_PREREQ(3,8)] (AO_ATTR_NO_SANITIZE_MEMORY): Define to
__attribute__((no_sanitize_memory)).
* src/atomic_ops.h [!AO_ATTR_NO_SANITIZE_THREAD && AO_THREAD_SANITIZER
&& !AO_CLANG_PREREQ(3,8)] (AO_ATTR_NO_SANITIZE_THREAD): Define to
__attribute__((no_sanitize_thread)).

7 years agoPlace no_sanitize attributes in a GCC-compliant way
Ivan Maidanski [Sun, 19 Nov 2017 07:41:30 +0000 (10:41 +0300)]
Place no_sanitize attributes in a GCC-compliant way
(fix commits 9020c5dbc058d9dc)

Now the attributes precede the function prototypes (the format is:
<attribute> void f(void) <body>).

* src/atomic_ops/generalize-arithm.template
(AO_XSIZE_fetch_and_add_full, AO_XSIZE_fetch_and_add_acquire,
AO_XSIZE_fetch_and_add_release, AO_XSIZE_fetch_and_add,
AO_XSIZE_and_full, AO_XSIZE_or_full, AO_XSIZE_xor_full): Move
AO_ATTR_NO_SANITIZE_THREAD attribute to the beginning of the function
prototype (to be right before AO_INLINE).
* src/atomic_ops/generalize-small.template (AO_XSIZE_load_read,
AO_XSIZE_load_full, AO_XSIZE_load_acquire, AO_XSIZE_load,
AO_XSIZE_store_write, AO_XSIZE_store, AO_XSIZE_store_release,
AO_XSIZE_store_full): Likewise.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Likewise.
* src/atomic_ops_stack.c [!USE_ALMOST_LOCK_FREE]
(AO_stack_push_release, AO_stack_pop_acquire): Likewise.
* tests/test_atomic.c [AO_HAVE_test_and_set_acquire] (do_junk):
Likewise.
* tests/test_malloc.c (cons): Likewise.
* src/atomic_ops/generalize-small.template (AO_XSIZE_store_write,
AO_XSIZE_store, AO_XSIZE_store_release, AO_XSIZE_store_full): Move
AO_ATTR_NO_SANITIZE_MEMORY attribute to the beginning of the function
prototype.
* src/atomic_ops/generalize-arithm.h: Regenerate.
* src/atomic_ops/generalize-small.h: Likewise.

7 years agoUpdate ChangeLog file (set v7.4.8 release date)
Ivan Maidanski [Thu, 26 Oct 2017 07:17:12 +0000 (10:17 +0300)]
Update ChangeLog file (set v7.4.8 release date)

7 years agoUpdate ChangeLog file (v7.6 changes only)
Ivan Maidanski [Fri, 13 Oct 2017 16:31:34 +0000 (19:31 +0300)]
Update ChangeLog file (v7.6 changes only)

7 years agoTravis CI: Test also 32-bit builds with --disable-atomic-intrinsics
Ivan Maidanski [Thu, 5 Oct 2017 22:59:55 +0000 (01:59 +0300)]
Travis CI: Test also 32-bit builds with --disable-atomic-intrinsics

7 years agoTravis CI: Test also 32-bit code with ASan (on OS X)
Ivan Maidanski [Thu, 5 Oct 2017 22:52:08 +0000 (01:52 +0300)]
Travis CI: Test also 32-bit code with ASan (on OS X)

7 years agoTravis CI: Test AO_GENERALIZE_ASM_BOOL_CAS, AO_USE_NANOSLEEP/NO_SIGNALS
Ivan Maidanski [Thu, 5 Oct 2017 22:48:28 +0000 (01:48 +0300)]
Travis CI: Test AO_GENERALIZE_ASM_BOOL_CAS, AO_USE_NANOSLEEP/NO_SIGNALS

7 years agoTravis CI: Test also with Leak Sanitizer (LSan)
Ivan Maidanski [Thu, 5 Oct 2017 22:39:01 +0000 (01:39 +0300)]
Travis CI: Test also with Leak Sanitizer (LSan)

7 years agoWorkaround TSan false positive warnings in stack_pop assertions
Ivan Maidanski [Thu, 5 Oct 2017 22:16:40 +0000 (01:16 +0300)]
Workaround TSan false positive warnings in stack_pop assertions

* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_pop_explicit_aux_acquire): Skip
assert(a->AO_stack_bl[i]==first) and assert(*list!=first)
if AO_THREAD_SANITIZER; add comment.

7 years agoFix 'bad register name %sil' assembler error (GCC-4.4/x86)
Ivan Maidanski [Thu, 5 Oct 2017 08:40:31 +0000 (11:40 +0300)]
Fix 'bad register name %sil' assembler error (GCC-4.4/x86)
(fix commit 7708b76)

* src/atomic_ops/sysdeps/gcc/x86.h [!AO_USE_SYNC_CAS_BUILTIN]
(AO_char_fetch_compare_and_swap_full): Replace "r"(new_val) to
"q"(new_val) in __asm__("cmpxchgb").

7 years agoEliminate '-pedantic is not option that controls warnings' GCC-6.4 message
Ivan Maidanski [Wed, 27 Sep 2017 08:50:11 +0000 (11:50 +0300)]
Eliminate '-pedantic is not option that controls warnings' GCC-6.4 message
(fix commits 76331547fad46e)

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(4, 7)] (pragma GCC diagnostic):
Use "-Wpedantic" (instead of "-pedantic") if GCC v6.4+.

7 years agoTravis CI: Add a test build with Thread sanitizer (TSan)
Ivan Maidanski [Thu, 21 Sep 2017 22:06:22 +0000 (01:06 +0300)]
Travis CI: Add a test build with Thread sanitizer (TSan)

7 years agoTravis CI: Fix builds for avr32, cris, sh4, tilegx after OS image update
Ivan Maidanski [Thu, 21 Sep 2017 21:19:27 +0000 (00:19 +0300)]
Travis CI: Fix builds for avr32, cris, sh4, tilegx after OS image update

7 years agoWorkaround Thread Sanitizer (TSan) false positive warnings
Ivan Maidanski [Thu, 21 Sep 2017 08:36:30 +0000 (11:36 +0300)]
Workaround Thread Sanitizer (TSan) false positive warnings

* src/atomic_ops.h [__has_feature && __has_feature(thread_sanitizer)]
(AO_THREAD_SANITIZER): New internal macro.
* src/atomic_ops.h [!AO_ATTR_NO_SANITIZE_THREAD]
(AO_ATTR_NO_SANITIZE_THREAD): Likewise.
* src/atomic_ops/generalize-arithm.h: Regenerate.
* src/atomic_ops/generalize-small.h: Likewise.
* src/atomic_ops/generalize-arithm.template
(AO_XSIZE_fetch_and_add_full, AO_XSIZE_fetch_and_add_acquire,
AO_XSIZE_fetch_and_add_release, AO_XSIZE_fetch_and_add,
AO_XSIZE_and_full, AO_XSIZE_or_full, AO_XSIZE_xor_full): Add
AO_ATTR_NO_SANITIZE_THREAD attribute.
* src/atomic_ops/generalize-small.template (AO_XSIZE_load_read,
AO_XSIZE_load_full, AO_XSIZE_load_acquire, AO_XSIZE_load,
AO_XSIZE_store_write, AO_XSIZE_store, AO_XSIZE_store_release,
AO_XSIZE_store_full: Likewise.
* src/atomic_ops_stack.c [AO_USE_ALMOST_LOCK_FREE]
(AO_stack_push_explicit_aux_release): Likewise.
* src/atomic_ops_stack.c [AO_HAVE_compare_double_and_swap_double]
(AO_stack_push_release, AO_stack_pop_acquire): Likewise.
* tests/test_malloc.c (cons): Likewise.
* src/atomic_ops/sysdeps/gcc/x86.h [AO_GCC_ATOMIC_TEST_AND_SET
&& __clang__ && __x86_64__ && !__ILP32__ && AO_THREAD_SANITIZER]
(AO_SKIPATOMIC_double_compare_and_swap_ANY, AO_SKIPATOMIC_double_load,
AO_SKIPATOMIC_double_load_acquire, AO_SKIPATOMIC_double_store,
AO_SKIPATOMIC_double_store_release): Define; update comment.
* src/atomic_ops_malloc.c [AO_THREAD_SANITIZER] (AO_malloc, AO_free):
Use AO_store/load to write/read log_sz value in object header.
* tests/test_atomic.c (do_junk): New function (declared with
AO_ATTR_NO_SANITIZE_THREAD attribute); multiply junk value by two
different constant values.
* tests/test_atomic.c (test_and_set_thr): Call do_junk() instead of
operating on junk global variable directly.

7 years agoUpdate ChangeLog file (v7.6 changes only)
Ivan Maidanski [Wed, 20 Sep 2017 21:35:15 +0000 (00:35 +0300)]
Update ChangeLog file (v7.6 changes only)

7 years agoUpdate ChangeLog file (v7.4 changes only)
Ivan Maidanski [Wed, 20 Sep 2017 08:31:29 +0000 (11:31 +0300)]
Update ChangeLog file (v7.4 changes only)
(Cherry-pick commit 1b48276 from 'release-7_4' branch.)

7 years agoTravis CI: Test configure --disable-docs
Ivan Maidanski [Thu, 3 Aug 2017 21:34:31 +0000 (00:34 +0300)]
Travis CI: Test configure --disable-docs

7 years agoDo not install documentation if configure --disable-docs (new option)
Ivan Maidanski [Thu, 3 Aug 2017 21:18:34 +0000 (00:18 +0300)]
Do not install documentation if configure --disable-docs (new option)

Issue #28 (libatomic_ops).

* Makefile.am (dist_doc_DATA): Define only if ENABLE_DOCS.
* doc/Makefile.am (dist_doc_DATA): Likewise.
* configure.ac (docs): New AC_ARG_ENABLE.
* configure.ac (ENABLE_DOCS): New AM_CONDITIONAL.

7 years agoEliminate '-pedantic is not an option that controls warnings' GCC message
Ivan Maidanski [Mon, 31 Jul 2017 06:41:23 +0000 (09:41 +0300)]
Eliminate '-pedantic is not an option that controls warnings' GCC message
(fix commit 7633154)

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(4, 7)] (pragma GCC diagnostic):
Use "-Wpedantic" (instead of "-pedantic") if GCC v7+.

7 years agoWorkaround 'unused result' code defects in list_atomic.template
Ivan Maidanski [Mon, 24 Jul 2017 09:56:47 +0000 (12:56 +0300)]
Workaround 'unused result' code defects in list_atomic.template

* tests/list_atomic.template: Include stdlib.h (needed for exit()
prototype).
* tests/list_atomic.template [AO_HAVE_XSIZE_loadXX]
(XSIZE_list_atomicXX): Cast AO_XSIZE_loadXX() result to void.
* tests/list_atomic.template [AO_HAVE_XSIZE_fetch_and_addXX]: Cast
AO_XSIZE_fetch_and_addXX() result to void.
* tests/list_atomic.template [AO_HAVE_XSIZE_fetch_and_add1XX]
(XSIZE_list_atomicXX): Cast AO_XSIZE_fetch_and_add1XX() result to void.
* tests/list_atomic.template [AO_HAVE_XSIZE_fetch_and_sub1XX]
(XSIZE_list_atomicXX): Cast AO_XSIZE_fetch_and_sub1XX() result to void.
* tests/list_atomic.template [AO_HAVE_test_and_setXX]
(XSIZE_list_atomicXX): Cast AO_test_and_setXX() result to void.
* tests/list_atomic.template [AO_HAVE_XSIZE_compare_and_swapXX]
(XSIZE_list_atomicXX): Call exit(1) if AO_XSIZE_compare_and_swapXX
failed.
* tests/list_atomic.template [AO_HAVE_XSIZE_fetch_compare_and_swapXX]
(XSIZE_list_atomicXX): Call exit(1) if AO_XSIZE_fetch_compare_and_swapXX
failed.

7 years agoWorkaround 'unused result' code defect in atomic_ops.c
Ivan Maidanski [Mon, 24 Jul 2017 09:28:42 +0000 (12:28 +0300)]
Workaround 'unused result' code defect in atomic_ops.c

* src/atomic_ops.c [!AO_USE_NANOSLEEP && !AO_USE_WIN32_PTHREADS]
(AO_pause): Cast select() result to void.

7 years agoUpdate AUTHORS file (add Mikael Urankar)
Ivan Maidanski [Tue, 20 Jun 2017 09:23:15 +0000 (12:23 +0300)]
Update AUTHORS file (add Mikael Urankar)

7 years agoWorkaround misspelling in GCC to detect ARMv6KZ platform
Mikael Urankar [Mon, 19 Jun 2017 08:13:14 +0000 (10:13 +0200)]
Workaround misspelling in GCC to detect ARMv6KZ platform

Issue #26 (libatomic_ops).

Due to a misspelling in GCC, the check for the ARMv6KZ platform
uses ARM_ARCH_6ZK macro instead of ARM_ARCH_6KZ.

* src/atomic_ops/sysdeps/gcc/arm.h (AO_ARM_HAVE_DMB): Do not define
if __ARM_ARCH_6KZ__.

7 years agoAdd bdwgc mailing list online archive link to README
Ivan Maidanski [Thu, 15 Jun 2017 22:14:13 +0000 (01:14 +0300)]
Add bdwgc mailing list online archive link to README

* README.md (Feedback, Contribution, Questions and Notifications):
Update information about accessing the mailing list archive (add link
to that at Narkive site).

7 years agoUse GCC atomic intrinsics for Hexagon (clang 3.9+)
Ivan Maidanski [Fri, 9 Jun 2017 07:59:55 +0000 (10:59 +0300)]
Use GCC atomic intrinsics for Hexagon (clang 3.9+)

* src/atomic_ops/sysdeps/gcc/hexagon.h [AO_CLANG_PREREQ(3, 9)
&& !AO_DISABLE_GCC_ATOMICS] (AO_GCC_FORCE_HAVE_CAS,
AO_GCC_HAVE_double_SYNC_CAS): Define.
* src/atomic_ops/sysdeps/gcc/hexagon.h [AO_CLANG_PREREQ(3, 9)
&& !AO_DISABLE_GCC_ATOMICS]: Include standard_ao_double_t.h, generic.h.
* src/atomic_ops/sysdeps/gcc/hexagon.h [AO_CLANG_PREREQ(3, 9)
&& !AO_DISABLE_GCC_ATOMICS]: Do not include test_and_set_t_is_ao_t.h,
all_aligned_atomic_load_store.h.
* src/atomic_ops/sysdeps/gcc/hexagon.h [AO_CLANG_PREREQ(3, 9)
&& !AO_DISABLE_GCC_ATOMICS]: Do not define AO_nop_full,
AO_fetch_and_add, AO_test_and_set, AO_compare_and_swap,
AO_fetch_compare_and_swap, AO_T_IS_INT.

7 years agoFix 'missing select.h', 'undefined sigprocmask' compiler errors (Hexagon)
Ivan Maidanski [Thu, 8 Jun 2017 22:01:21 +0000 (01:01 +0300)]
Fix 'missing select.h', 'undefined sigprocmask' compiler errors (Hexagon)

* src/atomic_ops.c [__hexagon__ && !AO_USE_NO_SIGNALS
&& !AO_USE_NANOSLEEP] (AO_USE_NO_SIGNALS, AO_USE_NANOSLEEP): Define;
add comment.

7 years agoAvoid misleading 'AO_t undefined' error if wrong atomic_ops.h included
Ivan Maidanski [Thu, 8 Jun 2017 21:52:07 +0000 (00:52 +0300)]
Avoid misleading 'AO_t undefined' error if wrong atomic_ops.h included

This change might be useful e.g. in case of compilation by Hexagon SDK
which has own atomic_ops.h file (not related to libatomic_ops).

* tests/run_parallel.h [!CPPCHECK]: Issue #error if AO_ATOMIC_OPS_H is
not defined after #include atomic_ops.h.

7 years agoDo not produce .tar.bz2 distribution file (configure)
Ivan Maidanski [Thu, 8 Jun 2017 21:38:57 +0000 (00:38 +0300)]
Do not produce .tar.bz2 distribution file (configure)

* configure.ac (AM_INIT_AUTOMAKE): Remove dist-bzip2.

7 years agoUpdate README about bugs reporting and new releases notification
Ivan Maidanski [Fri, 2 Jun 2017 04:44:15 +0000 (07:44 +0300)]
Update README about bugs reporting and new releases notification

* README.md (Download): Move (and update) information about bug reporting
to another section.
* README.md (Feedback, Contribution, Questions and Notifications): New
section.
* configure.ac (AC_INIT): Change URI for reporting bugs.

7 years agoUpdate several email addresses in AUTHORS file
Ivan Maidanski [Thu, 1 Jun 2017 18:55:26 +0000 (21:55 +0300)]
Update several email addresses in AUTHORS file

7 years agoTravis CI: Move 'gnu-tools' to home folder
Ivan Maidanski [Wed, 24 May 2017 21:39:59 +0000 (00:39 +0300)]
Travis CI: Move 'gnu-tools' to home folder

7 years agoBump libatomic_ops version
Ivan Maidanski [Fri, 19 May 2017 20:44:13 +0000 (23:44 +0300)]
Bump libatomic_ops version

* README.md: Bump version to 7.7.0.
* .travis.yml (addons.coverity_scan.project.version): Likewise.
* appveyor.yml (version): 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.

7 years ago[7.6.0] v7.6.0
Ivan Maidanski [Fri, 19 May 2017 07:11:49 +0000 (10:11 +0300)]
[7.6.0]

Bump libatomic_ops version to 7.6.0

* ChangeLog (7.5.0): Bump version (to 7.6.0).
* .travis.yml (addons.coverity_scan.project.version): Likewise.
* README.md: Likewise.
* appveyor.yml (version): Likewise.
* configure.ac (AC_INIT): Likewise.
* src/atomic_ops/ao_version.h (AO_VERSION_MINOR): Likewise.
* ChangeLog (7.6.0, 7.4.6): Add release date.
* README.md: Remove build status indicators for "master" branch.
* src/Makefile.am (LIBATOMIC_OPS_GPL_VER_INFO): Change to 2:1:1
(increment revision number) because libatomic_ops_gpl.so implementation
has been updated (since the last change of the version info).
* src/Makefile.am (LIBATOMIC_OPS_VER_INFO): Change to 2:1:1 (just to
stay aligned with LIBATOMIC_OPS_GPL_VER_INFO).

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Thu, 18 May 2017 08:33:10 +0000 (11:33 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

7 years agoUse 'inline code' format for commands in README.md
Ivan Maidanski [Thu, 18 May 2017 08:13:24 +0000 (11:13 +0300)]
Use 'inline code' format for commands in README.md

* README.md: Quote commands with a grave accent character ("`"); the
same for names containing an underscore; reformat text.

7 years agoUpdate ChangeLog file (v7.4 changes)
Ivan Maidanski [Tue, 16 May 2017 12:52:34 +0000 (15:52 +0300)]
Update ChangeLog file (v7.4 changes)

7 years agoRename doc/README.txt to doc/README_details.txt
Ivan Maidanski [Tue, 16 May 2017 12:15:55 +0000 (15:15 +0300)]
Rename doc/README.txt to doc/README_details.txt

This is to differentiate from README.md when the documents are installed.

* doc/Makefile.am (dist_doc_DATA): Rename README.txt item to
README_details.txt.
* doc/README.txt: Rename to README_details.txt.

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Mon, 15 May 2017 20:17:10 +0000 (23:17 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)

7 years agoTravis CI: Reformat .yml file by travis tool
Ivan Maidanski [Mon, 15 May 2017 19:44:38 +0000 (22:44 +0300)]
Travis CI: Reformat .yml file by travis tool

7 years agoTravis CI: Remove quotes and use single '=' in deploy:on:condition
Ivan Maidanski [Mon, 15 May 2017 17:42:49 +0000 (20:42 +0300)]
Travis CI: Remove quotes and use single '=' in deploy:on:condition
(fix commits 63238a50cbf615)

7 years agoTravis CI: Remove parentheses in deploy:on:condition
Ivan Maidanski [Mon, 15 May 2017 17:38:02 +0000 (20:38 +0300)]
Travis CI: Remove parentheses in deploy:on:condition
(fix commit 63238a5)

7 years agoTravis CI: Setup dist tarball uploading to GitHub on tag creation
Ivan Maidanski [Mon, 15 May 2017 09:33:03 +0000 (12:33 +0300)]
Travis CI: Setup dist tarball uploading to GitHub on tag creation

7 years agoTravis CI: Move dist[check] test configs closer to the file beginning
Ivan Maidanski [Mon, 15 May 2017 09:24:31 +0000 (12:24 +0300)]
Travis CI: Move dist[check] test configs closer to the file beginning
(refactor commits 672aab273162f6)

7 years agoEliminate 'value shift followed by expansion' false code defect warning
Ivan Maidanski [Thu, 11 May 2017 08:21:01 +0000 (11:21 +0300)]
Eliminate 'value shift followed by expansion' false code defect warning

* src/atomic_ops.c [AO_USE_NANOSLEEP] (AO_pause): Use "L" suffix for
shifted immediate value (1) to match the type of ts.tv_nsec.
* src/atomic_ops.c [!AO_USE_NANOSLEEP && AO_USE_WIN32_PTHREADS]
(AO_pause): Cast shifted immediate value (1) to DWORD to match Sleep
argument type.
* src/atomic_ops.c [!AO_USE_NANOSLEEP && !AO_USE_WIN32_PTHREADS]
(AO_pause): Store computed usec value to an intermediate int variable
(before storing it to tv.tv_usec) so that to avoid widening conversion
of shifted immediate int value (1); add comment.

7 years agoUpdate AUTHORS file (add Andy Li)
Ivan Maidanski [Wed, 10 May 2017 21:29:22 +0000 (00:29 +0300)]
Update AUTHORS file (add Andy Li)

7 years agoFix 'doc' files installation folder
Andy Li [Tue, 9 May 2017 01:42:14 +0000 (09:42 +0800)]
Fix 'doc' files installation folder

docs are dist_doc_DATA.  They should be installed to /usr/share/doc.

* Makefile.am (dist_pkgdata_DATA): Remove COPYING, README.md.
* Makefile.am (dist_doc_DATA): Add COPYING, README.md.
* doc/Makefile.am (dist_pkgdata_DATA): Remove LICENSING.txt,
README.txt, README_stack.txt, README_malloc.txt, README_win32.txt.
* doc/Makefile.am (dist_doc_DATA): Add LICENSING.txt,
README.txt, README_stack.txt, README_malloc.txt, README_win32.txt.

7 years agoUpdate ChangeLog file
Ivan Maidanski [Wed, 10 May 2017 07:50:56 +0000 (10:50 +0300)]
Update ChangeLog file

7 years agoUpdate ChangeLog file (v7.2 - v7.4 changes only)
Ivan Maidanski [Wed, 10 May 2017 06:18:23 +0000 (09:18 +0300)]
Update ChangeLog file (v7.2 - v7.4 changes only)