]> granicus.if.org Git - libatomic_ops/log
libatomic_ops
12 years agoFix a typo in comment
Ivan Maidanski [Sun, 4 Mar 2012 16:20:22 +0000 (20:20 +0400)]
Fix a typo in comment

* src/atomic_ops_malloc.h (AO_malloc_enable_mmap): Fix a typo in the
comment.

12 years agoconfigure: Require automake 2.63 (widely spread) instead of 2.64
Ivan Maidanski [Fri, 17 Feb 2012 15:15:41 +0000 (19:15 +0400)]
configure: Require automake 2.63 (widely spread) instead of 2.64

* configure.ac (AC_PREREQ): Use value of 2.63 (instead of 2.64).

12 years agoUpdate TODO file (add FIXME note for clang)
Ivan Maidanski [Tue, 7 Feb 2012 04:18:19 +0000 (08:18 +0400)]
Update TODO file (add FIXME note for clang)

12 years agoRemove unused and hide some inner symbols in atomic_ops_malloc
Ivan Maidanski [Mon, 6 Feb 2012 04:56:45 +0000 (08:56 +0400)]
Remove unused and hide some inner symbols in atomic_ops_malloc

* src/atomic_ops_malloc.c (AO_chunk_free_list): Remove unused global
variable.
* src/atomic_ops_malloc.c (msbs): Add 'const' keyword.
* src/atomic_ops_malloc.c (msb): Add 'static' keyword to inner
function declaration.

12 years agoSuppress compiler warning in atomic_ops_malloc
Ivan Maidanski [Mon, 6 Feb 2012 04:44:33 +0000 (08:44 +0400)]
Suppress compiler warning in atomic_ops_malloc

* src/atomic_ops_malloc.c (msb): Change shift-by-32 expression to
work around a warning issued by clang compiler.

12 years agoconfigure: Specify bug reports email in AC_INIT
Ivan Maidanski [Fri, 20 Jan 2012 18:36:39 +0000 (22:36 +0400)]
configure: Specify bug reports email in AC_INIT

12 years agoREADME: Add bug reports address
Ivan Maidanski [Fri, 20 Jan 2012 18:10:29 +0000 (22:10 +0400)]
README: Add bug reports address

12 years agotest_stack: check_list() code refactoring and 'marks' size optimization
Ivan Maidanski [Thu, 19 Jan 2012 04:35:21 +0000 (08:35 +0400)]
test_stack: check_list() code refactoring and 'marks' size optimization

* tests/test_stack.c (marks): Set smaller size (according to the
maximum index passed to check_list).
* tests/test_stack.c (check_list): Store p->data to "i" local variable
(in the loop body) replacing multiple occurrences of p->data.

12 years agoChange function prototype specifications to follow strict ANSI C style
Ivan Maidanski [Thu, 19 Jan 2012 04:33:50 +0000 (08:33 +0400)]
Change function prototype specifications to follow strict ANSI C style

* tests/test_atomic.c (main): Put "void" keyword into the arguments
specification of the function prototype.
* tests/test_stack.c (main): Likewise.

12 years agoAdd autogen.sh file
Bruno Haible [Thu, 19 Jan 2012 07:07:19 +0000 (11:07 +0400)]
Add autogen.sh file

12 years agoReplace repeating '==' in documentation with a single one
Ivan Maidanski [Wed, 11 Jan 2012 17:41:51 +0000 (21:41 +0400)]
Replace repeating '==' in documentation with a single one

* README: Replace sequences of repeating '==' identifying section
titles (which is also used by git-apply) with two '=' symbols at the
beginning and at the end of each title.
* TODO: Likewise.
* ChangeLog: Likewise.
* src/atomic_ops/sysdeps/gcc/arm.h: Break a sequence of repeating '=='
(in a comment) with a space.

12 years agoUpdate TODO file (remove FIXME - problem caused by target mismatch)
Ivan Maidanski [Sat, 31 Dec 2011 13:13:28 +0000 (17:13 +0400)]
Update TODO file (remove FIXME - problem caused by target mismatch)

12 years agoUpdate TODO file (remove FIXME - problem fixed in GCC v4.6.2)
Ivan Maidanski [Sat, 31 Dec 2011 12:59:21 +0000 (16:59 +0400)]
Update TODO file (remove FIXME - problem fixed in GCC v4.6.2)

13 years ago.gitignore: Ignore config.cache
Ivan Maidanski [Thu, 22 Dec 2011 07:19:00 +0000 (11:19 +0400)]
.gitignore: Ignore config.cache

13 years agoCode refactoring of gcc/arm.h by introducing AO_ARM_HAVE_x macros
Ivan Maidanski [Mon, 19 Dec 2011 11:26:42 +0000 (15:26 +0400)]
Code refactoring of gcc/arm.h by introducing AO_ARM_HAVE_x macros

* src/atomic_ops/sysdeps/gcc/arm.h (AO_ARM_HAVE_LDREX,
AO_ARM_HAVE_LDREXD, AO_ARM_HAVE_SWP): New macro.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full, AO_load, AO_store,
AO_test_and_set, AO_fetch_and_add, AO_fetch_and_add1,
AO_fetch_and_sub1, AO_compare_and_swap, AO_fetch_compare_and_swap,
AO_compare_double_and_swap_double, AO_test_and_set_full): Test
AO_ARM_HAVE_LDREX, AO_ARM_HAVE_LDREXD and AO_ARM_HAVE_SWP instead of
__ARM_ARCH_x__ directly.

13 years agoUpdate ChangeLog
Ivan Maidanski [Fri, 16 Dec 2011 14:17:37 +0000 (18:17 +0400)]
Update ChangeLog

13 years agoFix __ARM_ARCH_5__ macro handling for Android NDK (ARMv7)
Ivan Maidanski [Fri, 16 Dec 2011 14:07:30 +0000 (18:07 +0400)]
Fix __ARM_ARCH_5__ macro handling for Android NDK (ARMv7)

* src/atomic_ops/sysdeps/gcc/arm.h (__ARM_ARCH_7__, __ARM_ARCH_7A__):
Recognize to override __ARM_ARCH_5xx__ macros (since Android NDK GCC
defines both for armv7); update comment.

13 years agoMerge branch 'ao_val_cas'
Ivan Maidanski [Wed, 14 Dec 2011 07:13:46 +0000 (11:13 +0400)]
Merge branch 'ao_val_cas'

13 years ago.gitignore: Ignore Gcov files (.gcda, .gcno)
Ivan Maidanski [Tue, 13 Dec 2011 14:52:37 +0000 (18:52 +0400)]
.gitignore: Ignore Gcov files (.gcda, .gcno)

13 years ago.gitignore: Ignore binary files (.a, .exe, .o, etc.) in all folders
Ivan Maidanski [Tue, 13 Dec 2011 14:50:32 +0000 (18:50 +0400)]
.gitignore: Ignore binary files (.a, .exe, .o, etc.) in all folders

13 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 13 Dec 2011 10:45:26 +0000 (14:45 +0400)]
Update ChangeLog

13 years agoconfigure: Do not pass '-Wextra' option to GCC if unsupported
Ivan Maidanski [Tue, 13 Dec 2011 06:36:24 +0000 (10:36 +0400)]
configure: Do not pass '-Wextra' option to GCC if unsupported

* configure.ac (WEXTRA): New variable (set to "-Wextra" if the latter
is supported by GCC, otherwise to "-W").
* configure.ac (CFLAGS): Use WEXTRA variable.

13 years agoDefine NDEBUG via config.h instead of CFLAGS;
Ivan Maidanski [Mon, 12 Dec 2011 14:57:23 +0000 (18:57 +0400)]
Define NDEBUG via config.h instead of CFLAGS;
do not define NDEBUG if '--enable-assertions' passed to configure

* configure.ac (CFLAGS): Do not add "-DNDEBUG".
* configure.ac (assertions): New AC argument.
* configure.ac (NDEBUG): New AC macro (defined only if "assertions"
AC argument is not set to "yes").

13 years agoRecognize AO_PREFER_GENERALIZED to favor generalization over asm (MIPS)
Ivan Maidanski [Thu, 8 Dec 2011 13:17:21 +0000 (17:17 +0400)]
Recognize AO_PREFER_GENERALIZED to favor generalization over asm (MIPS)

* src/atomic_ops/sysdeps/gcc/mips.h (AO_fetch_and_add,
AO_HAVE_fetch_and_add, AO_test_and_set, AO_HAVE_test_and_set): Do not
define if AO_PREFER_GENERALIZED.

13 years agoUpdate ChangeLog
Ivan Maidanski [Thu, 8 Dec 2011 13:30:07 +0000 (17:30 +0400)]
Update ChangeLog

13 years agoAdd new macro (AO_PREFER_GENERALIZED) to favor generalized primitives
Ivan Maidanski [Thu, 8 Dec 2011 12:39:56 +0000 (16:39 +0400)]
Add new macro (AO_PREFER_GENERALIZED) to favor generalized primitives
over direct assembly-based ones

* configure.ac (AO_PREFER_GENERALIZED): New AC template.
* src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_test_and_set,
AO_HAVE_test_and_set, AO_fetch_and_add, AO_HAVE_fetch_and_add,
AO_fetch_and_add1, AO_HAVE_fetch_and_add1, AO_fetch_and_sub1,
AO_HAVE_fetch_and_sub1): Do not define if AO_PREFER_GENERALIZED.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set,
AO_HAVE_test_and_set, AO_fetch_and_add, AO_HAVE_fetch_and_add,
AO_fetch_and_add1, AO_HAVE_fetch_and_add1, AO_fetch_and_sub1,
AO_HAVE_fetch_and_sub1): Likewise.
* src/atomic_ops/sysdeps/gcc/avr32.h (AO_test_and_set_full,
AO_HAVE_test_and_set_full): Likewise.
* src/atomic_ops/sysdeps/gcc/hexagon.h (AO_fetch_and_add,
AO_HAVE_fetch_and_add, AO_test_and_set, AO_HAVE_test_and_set):
Likewise.
* src/atomic_ops/sysdeps/gcc/ia64.h (AO_fetch_and_add1_acquire,
AO_HAVE_fetch_and_add1_acquire, AO_fetch_and_add1_release,
AO_HAVE_fetch_and_add1_release, AO_fetch_and_sub1_acquire,
AO_HAVE_fetch_and_sub1_acquire, AO_fetch_and_sub1_release,
AO_HAVE_fetch_and_sub1_release, AO_int_fetch_and_add1_acquire,
AO_HAVE_int_fetch_and_add1_acquire, AO_int_fetch_and_add1_release,
AO_HAVE_int_fetch_and_add1_release, AO_int_fetch_and_sub1_acquire,
AO_HAVE_int_fetch_and_sub1_acquire, AO_int_fetch_and_sub1_release,
AO_HAVE_int_fetch_and_sub1_release): Likewise.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_test_and_set,
AO_HAVE_test_and_set, AO_test_and_set_acquire,
AO_HAVE_test_and_set_acquire, AO_test_and_set_release,
AO_HAVE_test_and_set_release, AO_test_and_set_full,
AO_HAVE_test_and_set_full): Likewise.
* src/atomic_ops/sysdeps/gcc/x86.h (AO_fetch_and_add_full,
AO_HAVE_fetch_and_add_full, AO_and_full, AO_HAVE_and_full,
AO_or_full, AO_HAVE_or_full, AO_xor_full, AO_HAVE_xor_full): Likewise.
* src/atomic_ops/sysdeps/gcc/x86_64.h (AO_fetch_and_add_full,
AO_HAVE_fetch_and_add_full, AO_and_full, AO_HAVE_and_full, AO_or_full,
AO_HAVE_or_full, AO_xor_full, AO_HAVE_xor_full): Likewise.
* src/atomic_ops/sysdeps/hpc/ia64.h (AO_fetch_and_add1_acquire,
AO_HAVE_fetch_and_add1_acquire, AO_fetch_and_add1_release,
AO_HAVE_fetch_and_add1_release, AO_fetch_and_sub1_acquire,
AO_HAVE_fetch_and_sub1_acquire, AO_fetch_and_sub1_release,
AO_HAVE_fetch_and_sub1_release): Likewise.
* src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_test_and_set_acquire,
AO_HAVE_test_and_set_acquire, AO_test_and_set_release,
AO_HAVE_test_and_set_release, AO_test_and_set_full,
AO_HAVE_test_and_set_full): Likewise.
* src/atomic_ops/sysdeps/icc/ia64.h (AO_fetch_and_add1_acquire,
AO_HAVE_fetch_and_add1_acquire, AO_fetch_and_add1_release,
AO_HAVE_fetch_and_add1_release, AO_fetch_and_sub1_acquire,
AO_HAVE_fetch_and_sub1_acquire, AO_fetch_and_sub1_release,
AO_HAVE_fetch_and_sub1_release): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h (AO_fetch_and_add_full,
AO_HAVE_fetch_and_add_full, AO_fetch_and_add1_full,
AO_HAVE_fetch_and_add1_full, AO_fetch_and_sub1_full,
AO_HAVE_fetch_and_sub1_full): Likewise.
* src/atomic_ops/sysdeps/sunc/x86.h (AO_fetch_and_add_full,
AO_HAVE_fetch_and_add_full, AO_and_full, AO_HAVE_and_full,
AO_or_full, AO_HAVE_or_full, AO_xor_full, AO_HAVE_xor_full): Likewise.
* src/atomic_ops/sysdeps/sunc/x86_64.h (AO_fetch_and_add_full,
AO_HAVE_fetch_and_add_full, AO_and_full, AO_HAVE_and_full,
AO_or_full, AO_HAVE_or_full, AO_xor_full, AO_HAVE_xor_full): Likewise.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set_full,
AO_HAVE_test_and_set_full): Do not define if AO_PREFER_GENERALIZED
(but only in case of ARMv6+).
* src/atomic_ops/sysdeps/msftc/common32_defs.h (_InterlockedIncrement,
_InterlockedDecrement, _InterlockedExchangeAdd): Do not declare
intrinsic if both AO_PREFER_GENERALIZED and AO_ASSUME_WINDOWS98.
* src/atomic_ops/sysdeps/msftc/common32_defs.h (AO_fetch_and_add_full,
AO_HAVE_fetch_and_add_full, AO_fetch_and_add1_full,
AO_HAVE_fetch_and_add1_full, AO_fetch_and_sub1_full,
AO_HAVE_fetch_and_sub1_full): Do not define if both
AO_PREFER_GENERALIZED and AO_ASSUME_WINDOWS98.
* src/atomic_ops/sysdeps/msftc/x86_64.h (_InterlockedIncrement64,
_InterlockedDecrement64, _InterlockedExchangeAdd64): Do not declare
intrinsic if AO_PREFER_GENERALIZED.

13 years agoRemove unused InterlockedExchange/ReadWriteBarrier declarations (VC/x86)
Ivan Maidanski [Wed, 7 Dec 2011 09:25:14 +0000 (13:25 +0400)]
Remove unused InterlockedExchange/ReadWriteBarrier declarations (VC/x86)

* src/atomic_ops/sysdeps/msftc/common32_defs.h (_InterlockedExchange,
_ReadWriteBarrier): Remove pragma for unused intrinsic.
* src/atomic_ops/sysdeps/msftc/x86_64.h (_ReadWriteBarrier,
_InterlockedExchange64): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h (_InterlockedExchange):
Remove unused macro and prototype.

13 years agoAdd all AO control macros to configure (as templates)
Ivan Maidanski [Thu, 1 Dec 2011 16:37:54 +0000 (20:37 +0400)]
Add all AO control macros to configure (as templates)

* configure.ac (AO_USE_NANOSLEEP, AO_USE_NO_SIGNALS,
AO_USE_WIN32_PTHREADS, AO_TRACE_MALLOC, AO_GENERALIZE_ASM_BOOL_CAS,
AO_USE_PTHREAD_DEFS, AO_ASM_X64_AVAILABLE, AO_ASSUME_VISTA,
AO_ASSUME_WINDOWS98, AO_CMPXCHG16B_AVAILABLE, AO_FORCE_USE_SWP,
AO_NO_SPARC_V9, AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE,
AO_UNIPROCESSOR, AO_USE_INTERLOCKED_INTRINSICS,
AO_USE_PENTIUM4_INSTRS, AO_USE_SYNC_CAS_BUILTIN,
AO_WEAK_DOUBLE_CAS_EMULATION): New AC template.

13 years agoPrevent AO_USE_SYNC_CAS_BUILTIN redefinition in atomic_ops.h
Ivan Maidanski [Thu, 1 Dec 2011 10:41:39 +0000 (14:41 +0400)]
Prevent AO_USE_SYNC_CAS_BUILTIN redefinition in atomic_ops.h

* src/atomic_ops.h (AO_USE_SYNC_CAS_BUILTIN): Do not redefine if it
is already defined.

13 years agoOn altering CFLAGS value in configure place client flags at end
Ivan Maidanski [Thu, 1 Dec 2011 10:35:21 +0000 (14:35 +0400)]
On altering CFLAGS value in configure place client flags at end

* configure.ac (CFLAGS): Always append old CFLAGS value (instead of
placing it at start).

13 years agoUpdate ChangeLog
Ivan Maidanski [Wed, 30 Nov 2011 12:21:00 +0000 (16:21 +0400)]
Update ChangeLog

13 years agoWorkaround ICE9 A1 chip LL bug (MIPS)
Ivan Maidanski [Wed, 30 Nov 2011 11:37:53 +0000 (15:37 +0400)]
Workaround ICE9 A1 chip LL bug (MIPS)

* src/atomic_ops/sysdeps/gcc/mips.h (AO_MIPS_LL_FIX): New macro (used
to workaround LL bug in some chips); test AO_ICE9A1_LLSC_WAR new macro.
* src/atomic_ops/sysdeps/gcc/mips.h (AO_fetch_and_add,
AO_test_and_set, AO_compare_and_swap, AO_fetch_compare_and_swap):
Insert AO_MIPS_LL_FIX after every "ll" operation.

13 years agoImplement fetch_and_add, test_and_set primitives for MIPS
Ivan Maidanski [Wed, 30 Nov 2011 10:18:27 +0000 (14:18 +0400)]
Implement fetch_and_add, test_and_set primitives for MIPS

* src/atomic_ops/sysdeps/gcc/mips.h (AO_fetch_and_add,
AO_HAVE_fetch_and_add, AO_test_and_set, AO_HAVE_test_and_set):
Implement (assuming 32-bit ABI); update FIXME.

13 years agoImplement AO_fetch_compare_and_swap for MIPS
Ivan Maidanski [Wed, 30 Nov 2011 08:30:29 +0000 (12:30 +0400)]
Implement AO_fetch_compare_and_swap for MIPS

* src/atomic_ops/sysdeps/gcc/mips.h (AO_compare_and_swap,
AO_HAVE_compare_and_swap): Do not define if AO_GENERALIZE_ASM_BOOL_CAS.
* src/atomic_ops/sysdeps/gcc/mips.h (AO_fetch_compare_and_swap,
AO_HAVE_fetch_compare_and_swap): Implement (assuming 32-bit ABI);
remove FIXME.

13 years agoReformat gcc/ia64.h code
Ivan Maidanski [Tue, 29 Nov 2011 19:11:49 +0000 (23:11 +0400)]
Reformat gcc/ia64.h code

* src/atomic_ops/sysdeps/gcc/ia64.h (AO_int_fetch_and_add1_acquire,
AO_int_fetch_and_add1_release, AO_int_fetch_and_sub1_acquire,
AO_int_fetch_and_sub1_release, AO_int_fetch_compare_and_swap_acquire,
AO_int_fetch_compare_and_swap_release): Reformat code.

13 years agoUpdate ChangeLog
Ivan Maidanski [Tue, 29 Nov 2011 18:09:00 +0000 (22:09 +0400)]
Update ChangeLog

13 years agoMerge branch 'ao_t_is_int-fix' into master
Ivan Maidanski [Tue, 29 Nov 2011 18:41:13 +0000 (22:41 +0400)]
Merge branch 'ao_t_is_int-fix' into master

13 years agoGeneralize acquire/release/full CAS primitives for MIPS
Ivan Maidanski [Tue, 29 Nov 2011 17:46:44 +0000 (21:46 +0400)]
Generalize acquire/release/full CAS primitives for MIPS

* src/atomic_ops/sysdeps/gcc/mips.h (AO_compare_and_swap_acquire,
AO_compare_and_swap_release, AO_compare_and_swap_full): Remove as
generalized; add comment.

13 years agoInclude ao_t_is_int.h from atomic_ops.h after first generalization if
Ivan Maidanski [Tue, 29 Nov 2011 17:11:06 +0000 (21:11 +0400)]
Include ao_t_is_int.h from atomic_ops.h after first generalization if
AO_T_IS_INT (new macro) is defined in 'sysdeps' file

* src/atomic_ops.h (AO_T_IS_INT): Test macro after first
generalization, if set then include ao_t_is_int.h file and force
AO_GENERALIZE_TWICE.
* src/atomic_ops/sysdeps/gcc/hexagon.h (AO_T_IS_INT): Define new macro
instead of ao_t_is_int.h inclusion.
* src/atomic_ops/sysdeps/gcc/ia64.h (AO_T_IS_INT): Likewise.
* src/atomic_ops/sysdeps/gcc/m68k.h (AO_T_IS_INT): Likewise.
* src/atomic_ops/sysdeps/gcc/mips.h (AO_T_IS_INT): Likewise.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_T_IS_INT): Likewise.
* src/atomic_ops/sysdeps/gcc/x86.h (AO_T_IS_INT): Likewise.
* src/atomic_ops/sysdeps/hpc/ia64.h (AO_T_IS_INT): Likewise.
* src/atomic_ops/sysdeps/msftc/x86.h (AO_T_IS_INT): Likewise.
* src/atomic_ops/sysdeps/sunc/x86.h (AO_T_IS_INT): Likewise.
* src/atomic_ops/sysdeps/gcc/powerpc.h: Add place-holder comment (in
case of ppc64).
* src/atomic_ops/sysdeps/gcc/hexagon.h: Do not include generalize.h
any longer (since ao_t_is_int.h is included from atomic_ops.h now).
* src/atomic_ops/sysdeps/gcc/ia64.h: Likewise.
* src/atomic_ops/sysdeps/hpc/ia64.h: Likewise.

13 years agoFix generalization for IA-64, Hexagon (include generalize.h before
Ivan Maidanski [Tue, 29 Nov 2011 16:36:56 +0000 (20:36 +0400)]
Fix generalization for IA-64, Hexagon (include generalize.h before
ao_t_is_int.h to have AO_or, AO_..._read/write and some other
int-derived primitives got defined)

* src/atomic_ops/sysdeps/gcc/hexagon.h: Include generalize.h file
before ao_t_is_int.h one.
* src/atomic_ops/sysdeps/gcc/ia64.h: Likewise.
* src/atomic_ops/sysdeps/hpc/ia64.h: Likewise.

13 years agoMerge branch 'ao_val_cas'
Ivan Maidanski [Mon, 28 Nov 2011 15:28:00 +0000 (19:28 +0400)]
Merge branch 'ao_val_cas'

13 years agoRemove "function untested" notes in code for PowerPC
Ivan Maidanski [Fri, 18 Nov 2011 08:36:56 +0000 (12:36 +0400)]
Remove "function untested" notes in code for PowerPC

* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_compare_and_swap,
AO_fetch_compare_and_swap, AO_fetch_and_add): Remove FIXME.

13 years agoFix AO_fetch_compare_and_swap (PowerPC) inline asm syntax
Andreas Tobler [Fri, 18 Nov 2011 08:29:06 +0000 (12:29 +0400)]
Fix AO_fetch_compare_and_swap (PowerPC) inline asm syntax

* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_fetch_compare_and_swap):
Remove commas after "fetched_val" inline asm parameter.

13 years agoMerge branch 'master' into ao_val_cas
Ivan Maidanski [Mon, 14 Nov 2011 13:21:03 +0000 (17:21 +0400)]
Merge branch 'master' into ao_val_cas

13 years agoDefine 'w' local variable in test_atomic_include.h only if used
Ivan Maidanski [Mon, 14 Nov 2011 13:19:50 +0000 (17:19 +0400)]
Define 'w' local variable in test_atomic_include.h only if used

* tests/test_atomic_include.template (test_atomicXX): Define "w" local
variable only if AO_HAVE_compare_[double_]and_swap_double.

13 years agoAdd AO_GENERALIZE_ASM_BOOL_CAS new macro to allow AO_compare_and_swap
Ivan Maidanski [Wed, 9 Nov 2011 17:04:37 +0000 (21:04 +0400)]
Add AO_GENERALIZE_ASM_BOOL_CAS new macro to allow AO_compare_and_swap
definition via AO_fetch_compare_and_swap instead of own ASM-based one

* src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_compare_and_swap): Do not
define if AO_GENERALIZE_ASM_BOOL_CAS.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_compare_and_swap): Likewise.
* src/atomic_ops/sysdeps/gcc/hexagon.h (AO_compare_and_swap):
Likewise.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_compare_and_swap,
AO_compare_and_swap_acquire, AO_compare_and_swap_release,
AO_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/gcc/x86.h (AO_compare_and_swap_full):
Likewise.
* src/atomic_ops/sysdeps/gcc/x86_64.h (AO_compare_and_swap_full):
Likewise.
* src/atomic_ops/sysdeps/sunc/x86.h (AO_compare_and_swap_full):
Likewise.
* src/atomic_ops/sysdeps/sunc/x86_64.h (AO_compare_and_swap_full):
Likewise.

13 years agoUpdate ChangeLog file
Ivan Maidanski [Wed, 9 Nov 2011 15:55:03 +0000 (19:55 +0400)]
Update ChangeLog file

13 years agoGeneralize AO_compare_and_swap primitives via AO_fetch_compare_and_swap
Ivan Maidanski [Tue, 8 Nov 2011 17:23:52 +0000 (21:23 +0400)]
Generalize AO_compare_and_swap primitives via AO_fetch_compare_and_swap

* src/atomic_ops.c (AO_compare_and_swap_emulation): Remove.
* src/atomic_ops/sysdeps/emul_cas.h (AO_compare_and_swap_emulation,
AO_compare_and_swap_full, AO_HAVE_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/gcc/ia64.h (AO_compare_and_swap_acquire,
AO_HAVE_compare_and_swap_acquire, AO_compare_and_swap_release,
AO_HAVE_compare_and_swap_release, AO_char_compare_and_swap_acquire,
AO_HAVE_char_compare_and_swap_acquire,
AO_char_compare_and_swap_release,
AO_HAVE_char_compare_and_swap_release,
AO_short_compare_and_swap_acquire,
AO_HAVE_short_compare_and_swap_acquire,
AO_short_compare_and_swap_release,
AO_HAVE_short_compare_and_swap_release,
AO_int_compare_and_swap_acquire, AO_HAVE_int_compare_and_swap_acquire,
AO_int_compare_and_swap_release,
AO_HAVE_int_compare_and_swap_release): Likewise.
* src/atomic_ops/sysdeps/generic_pthread.h (AO_compare_and_swap_full):
Likewise.
* src/atomic_ops/sysdeps/hpc/ia64.h (AO_compare_and_swap_acquire,
AO_HAVE_compare_and_swap_acquire, AO_compare_and_swap_release,
AO_HAVE_compare_and_swap_release, AO_char_compare_and_swap_acquire,
AO_HAVE_char_compare_and_swap_acquire,
AO_char_compare_and_swap_release,
AO_HAVE_char_compare_and_swap_release,
AO_short_compare_and_swap_acquire,
AO_HAVE_short_compare_and_swap_acquire,
AO_short_compare_and_swap_release,
AO_HAVE_short_compare_and_swap_release): Likewise.
* src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_compare_and_swap_acquire,
AO_HAVE_compare_and_swap_acquire, AO_compare_and_swap_release,
AO_HAVE_compare_and_swap_release, AO_compare_and_swap_full,
AO_HAVE_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/icc/ia64.h (AO_compare_and_swap_acquire,
AO_HAVE_compare_and_swap_acquire, AO_compare_and_swap_release,
AO_HAVE_compare_and_swap_release, AO_char_compare_and_swap_acquire,
AO_HAVE_char_compare_and_swap_acquire,
AO_char_compare_and_swap_release,
AO_HAVE_char_compare_and_swap_release,
AO_short_compare_and_swap_acquire,
AO_HAVE_short_compare_and_swap_acquire,
AO_short_compare_and_swap_release,
AO_HAVE_short_compare_and_swap_release,
AO_int_compare_and_swap_acquire, AO_HAVE_int_compare_and_swap_acquire,
AO_int_compare_and_swap_release,
AO_HAVE_int_compare_and_swap_release): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h
(AO_compare_and_swap_full, AO_HAVE_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h (AO_compare_and_swap_full,
AO_HAVE_compare_and_swap_full): Likewise.
* src/atomic_ops.h: Do not include emul_cas.h if any of
AO_HAVE_fetch_compare_and_swap_... is defined.
* src/atomic_ops.h (AO_HAVE_fetch_compare_and_swap_full): Do not
define AO_GENERALIZE_TWICE if AO_HAVE_fetch_compare_and_swap_full
and AO_CAN_EMUL_CAS are both defined.
* src/atomic_ops/generalize-small.template
(AO_XSIZE_compare_and_swap_full, AO_XSIZE_compare_and_swap_acquire,
AO_XSIZE_compare_and_swap_release): New template (based on the
corresponding AO_XSIZE_fetch_compare_and_swap primitive).
* src/atomic_ops/generalize-small.template
(AO_HAVE_XSIZE_compare_and_swap_full,
AO_HAVE_XSIZE_compare_and_swap_acquire,
AO_HAVE_XSIZE_compare_and_swap_release): Define.
* src/atomic_ops/generalize.h (AO_HAVE_compare_and_swap,
AO_HAVE_compare_and_swap_full, AO_HAVE_compare_and_swap_acquire,
AO_HAVE_compare_and_swap_release): Likewise.
* src/atomic_ops/generalize-small.h: Regenerate.
* src/atomic_ops/generalize.h (AO_compare_and_swap,
AO_compare_and_swap_full, AO_compare_and_swap_acquire,
AO_compare_and_swap_release): New function implementation (based on
the corresponding AO_fetch_compare_and_swap primitive).

13 years agoImplement most AO_fetch_compare_and_swap primitives
Ivan Maidanski [Thu, 27 Oct 2011 06:16:21 +0000 (10:16 +0400)]
Implement most AO_fetch_compare_and_swap primitives

* src/atomic_ops.c (AO_fetch_compare_and_swap_emulation): Implement.
* src/atomic_ops.h: Remove FIXME for AO_fetch_compare_and_swap.
* src/atomic_ops/generalize.h (AO_fetch_compare_and_swap_acquire,
AO_fetch_compare_and_swap_release, AO_fetch_compare_and_swap_acquire,
AO_fetch_compare_and_swap_write, AO_fetch_compare_and_swap_read,
AO_fetch_compare_and_swap, AO_fetch_compare_and_swap_full,
AO_fetch_compare_and_swap_release_write,
AO_fetch_compare_and_swap_acquire_read,
AO_fetch_compare_and_swap_dd_acquire_read): Implement; define the
corresponding AO_HAVE_... macro.
* src/atomic_ops/sysdeps/ao_t_is_int.h
(AO_int_fetch_compare_and_swap_full,
AO_int_fetch_compare_and_swap_acquire,
AO_int_fetch_compare_and_swap_release,
AO_int_fetch_compare_and_swap_write,
AO_int_fetch_compare_and_swap_read, AO_int_fetch_compare_and_swap):
Likewise.
* src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_fetch_compare_and_swap):
Likewise.
* src/atomic_ops/sysdeps/emul_cas.h (AO_fetch_compare_and_swap_full):
Likewise.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_fetch_compare_and_swap):
Likewise.
* src/atomic_ops/sysdeps/gcc/hexagon.h (AO_fetch_compare_and_swap):
Likewise.
* src/atomic_ops/sysdeps/gcc/ia64.h
(AO_fetch_compare_and_swap_acquire, AO_fetch_compare_and_swap_release,
AO_char_fetch_compare_and_swap_acquire,
AO_char_fetch_compare_and_swap_release,
AO_short_fetch_compare_and_swap_acquire,
AO_short_fetch_compare_and_swap_release,
AO_int_fetch_compare_and_swap_acquire,
AO_int_fetch_compare_and_swap_release): Likewise.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_fetch_compare_and_swap,
AO_fetch_compare_and_swap_acquire, AO_fetch_compare_and_swap_release,
AO_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/gcc/x86.h (AO_fetch_compare_and_swap_full):
Likewise.
* src/atomic_ops/sysdeps/gcc/x86_64.h
(AO_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/generic_pthread.h
(AO_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/hpc/ia64.h
(AO_fetch_compare_and_swap_acquire, AO_fetch_compare_and_swap_release,
AO_char_fetch_compare_and_swap_acquire,
AO_char_fetch_compare_and_swap_release,
AO_short_fetch_compare_and_swap_acquire,
AO_short_fetch_compare_and_swap_release): Likewise.
* src/atomic_ops/sysdeps/icc/ia64.h
(AO_fetch_compare_and_swap_acquire, AO_fetch_compare_and_swap_release,
AO_char_fetch_compare_and_swap_acquire,
AO_char_fetch_compare_and_swap_release,
AO_short_fetch_compare_and_swap_acquire,
AO_short_fetch_compare_and_swap_release,
AO_int_fetch_compare_and_swap_acquire,
AO_int_fetch_compare_and_swap_release): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h
(AO_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h
(AO_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/sunc/x86.h
(AO_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/sunc/x86_64.h
(AO_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/emul_cas.h
(AO_fetch_compare_and_swap_emulation): Declare the function.
* src/atomic_ops/sysdeps/gcc/mips.h: Adjust FIXME.
* src/atomic_ops/sysdeps/gcc/sparc.h: Likewise.
* src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_fetch_compare_and_swap,
AO_fetch_compare_and_swap_acquire, AO_fetch_compare_and_swap_release,
AO_fetch_compare_and_swap_full): Add implementation stub.
* tests/list_atomic.template (list_atomicXX): Add
AO_fetch_compare_and_swapXX call.
* tests/test_atomic_include.template (test_atomicXX): Likewise.

13 years agoAdd FIXMEs to add AO_fetch_compare_and_swap primitives
Ivan Maidanski [Fri, 21 Oct 2011 08:23:03 +0000 (12:23 +0400)]
Add FIXMEs to add AO_fetch_compare_and_swap primitives

13 years agoAdjust ChangeLog (remove 'release' word from release number)
Ivan Maidanski [Fri, 11 Nov 2011 12:33:43 +0000 (16:33 +0400)]
Adjust ChangeLog (remove 'release' word from release number)

13 years agoUpdate ChangeLog - add entries both for planned 7.2 and 7.3alpha2 releases
Ivan Maidanski [Wed, 9 Nov 2011 15:45:35 +0000 (19:45 +0400)]
Update ChangeLog - add entries both for planned 7.2 and 7.3alpha2 releases

13 years agoUpdate ChangeLog file
Ivan Maidanski [Thu, 3 Nov 2011 15:01:15 +0000 (19:01 +0400)]
Update ChangeLog file

13 years agoFix generalized AO_<type>_fetch_and_add() return type
Ivan Maidanski [Thu, 3 Nov 2011 14:43:52 +0000 (18:43 +0400)]
Fix generalized AO_<type>_fetch_and_add() return type

* src/atomic_ops/generalize-small.template
(AO_XSIZE_fetch_and_add_full, AO_XSIZE_fetch_and_add_acquire,
AO_XSIZE_fetch_and_add_release): Change return type from AO_t to
XCTYPE.
* src/atomic_ops/generalize-small.h: Regenerate.

13 years agoAdd note about __sync_bool_compare_and_swap usage (gcc/x86.h)
Ivan Maidanski [Wed, 26 Oct 2011 14:32:52 +0000 (18:32 +0400)]
Add note about __sync_bool_compare_and_swap usage (gcc/x86.h)

* src/atomic_ops/sysdeps/gcc/x86.h (AO_compare_and_swap_full): Add
comment for __sync_bool_compare_and_swap regarding variables
protection list.
* src/atomic_ops/sysdeps/gcc/x86_64.h (AO_compare_and_swap_full):
Likewise.

13 years agoFix AO_compare_and_swap_full (GCC MIPS, PowerPC) returned value type
Ivan Maidanski [Mon, 24 Oct 2011 15:05:31 +0000 (19:05 +0400)]
Fix AO_compare_and_swap_full (GCC MIPS, PowerPC) returned value type

* src/atomic_ops/sysdeps/gcc/mips.h (AO_compare_and_swap_full):
Change "result" local variable type from AO_t to int.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_compare_and_swap_full):
Likewise.

13 years agoReformat code of src/atomic_ops/sysdeps/ao_t_is_int.h
Ivan Maidanski [Mon, 24 Oct 2011 12:56:54 +0000 (16:56 +0400)]
Reformat code of src/atomic_ops/sysdeps/ao_t_is_int.h

13 years agoFix test_atomic_include for the case of missing CAS primitive
Ivan Maidanski [Mon, 24 Oct 2011 11:45:10 +0000 (15:45 +0400)]
Fix test_atomic_include for the case of missing CAS primitive

* tests/test_atomic_include.template (test_atomicXX): Add action for
the missing AO_compare_and_swap primitive.

13 years agoMinor code refactoring of src/atomic_ops.c (remove duplicated code)
Ivan Maidanski [Fri, 21 Oct 2011 11:38:51 +0000 (15:38 +0400)]
Minor code refactoring of src/atomic_ops.c (remove duplicated code)

* src/atomic_ops.c (block_all_signals): New inline function (move the
code from AO_compare_and_swap_emulation).
* src/atomic_ops.c (AO_compare_and_swap_emulation,
AO_compare_double_and_swap_double_emulation): Use block_all_signals().

13 years agoFix compiler warning in atomic_ops.c (define 'init_lock' only if used)
Ivan Maidanski [Fri, 21 Oct 2011 11:32:19 +0000 (15:32 +0400)]
Fix compiler warning in atomic_ops.c (define 'init_lock' only if used)

* src/atomic_ops.c (init_lock): Define only unless AO_USE_NO_SIGNALS.

13 years agoMinor code refactoring of sysdeps/generic_pthread.h.
Ivan Maidanski [Fri, 21 Oct 2011 10:57:55 +0000 (14:57 +0400)]
Minor code refactoring of sysdeps/generic_pthread.h.

* src/atomic_ops/sysdeps/generic_pthread.h (AO_fetch_and_add_full,
AO_char_fetch_and_add_full, AO_short_fetch_and_add_full,
AO_int_fetch_and_add_full): Rename "tmp" local variable to "old_val".

13 years agoDocument atomic 'and', 'xor' primitives in doc/README.txt
Ivan Maidanski [Fri, 21 Oct 2011 09:48:59 +0000 (13:48 +0400)]
Document atomic 'and', 'xor' primitives in doc/README.txt

13 years agoFix a typo in doc/README.txt
Ivan Maidanski [Fri, 21 Oct 2011 09:46:01 +0000 (13:46 +0400)]
Fix a typo in doc/README.txt

13 years agoReformat icc/ia64.h code (remove redundant blank lines)
Ivan Maidanski [Fri, 21 Oct 2011 09:38:17 +0000 (13:38 +0400)]
Reformat icc/ia64.h code (remove redundant blank lines)

* src/atomic_ops/sysdeps/icc/ia64.h: Remove redundant blank lines.

13 years agoFix AO_compare_and_swap (gcc/alpha.h) to suppress compiler warning
Ivan Maidanski [Fri, 21 Oct 2011 08:47:06 +0000 (12:47 +0400)]
Fix AO_compare_and_swap (gcc/alpha.h) to suppress compiler warning

* src/atomic_ops/sysdeps/gcc/alpha.h (AO_compare_and_swap): Cast
returned value to int.

13 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 17 Oct 2011 17:13:48 +0000 (21:13 +0400)]
Update ChangeLog

13 years agoUpdate AUTHORS file
Ivan Maidanski [Mon, 17 Oct 2011 09:30:51 +0000 (13:30 +0400)]
Update AUTHORS file

13 years agoFix AO_test_and_set_full on m68k
Thorsten Glaser [Mon, 17 Oct 2011 09:29:32 +0000 (13:29 +0400)]
Fix AO_test_and_set_full on m68k

* src/atomic_ops/sysdeps/gcc/m68k.h (AO_test_and_set_full): Cast the
returned value.

13 years agoFix AO_compare_and_swap() return type for s390 and PowerPC
Ivan Maidanski [Sat, 15 Oct 2011 11:35:22 +0000 (15:35 +0400)]
Fix AO_compare_and_swap() return type for s390 and PowerPC

* src/atomic_ops/sysdeps/gcc/s390.h (AO_compare_and_swap_full):
Change return from AO_t to int.
* src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_compare_and_swap_acquire,
AO_compare_and_swap_release, AO_compare_and_swap_full): Likewise.

13 years agoPut 'FIXME' word where missed
Ivan Maidanski [Sat, 15 Oct 2011 11:27:56 +0000 (15:27 +0400)]
Put 'FIXME' word where missed

* src/atomic_ops.h (AO_compiler_barrier): Add FIXME.
* src/atomic_ops/sysdeps/gcc/cris.h (header comment): Likewise.
* src/atomic_ops/sysdeps/armcc/arm_v6.h: Replace C++ style comment
with ANSI C one.

13 years agoMove names of committers from source files to AUTHORS list
Ivan Maidanski [Sat, 15 Oct 2011 11:17:58 +0000 (15:17 +0400)]
Move names of committers from source files to AUTHORS list

* src/atomic_ops/sysdeps/gcc/hppa.h (header comment): Move
"modified-by" information to AUTHORS file.
* src/atomic_ops/sysdeps/gcc/m68k.h (header comment): Likewise.
* src/atomic_ops/sysdeps/gcc/powerpc.h (header comment): Likewise.
* src/atomic_ops_malloc.c (header comment): Likewise.
* src/atomic_ops_stack.c (header comment): Likewise.
* tests/test_atomic.c (header comment): Likewise.
* tests/test_malloc.c (header comment): Likewise.
* tests/test_stack.c (header comment): Likewise.
* AUTHORS: Add more entries.
* src/atomic_ops/sysdeps/standard_ao_double_t.h: Add copyright header.

13 years agoUpdate AUTHORS
Ivan Maidanski [Tue, 11 Oct 2011 04:55:19 +0000 (08:55 +0400)]
Update AUTHORS

13 years agoImplement the basic atomic primitives for the hexagon CPU.
Linas Vepstas [Tue, 11 Oct 2011 04:43:41 +0000 (08:43 +0400)]
Implement the basic atomic primitives for the hexagon CPU.

* src/Makefile.am (nobase_private_HEADERS): Add hexagon.h.
* src/atomic_ops.h: Include hexagon.h file.
* src/atomic_ops/sysdeps/gcc/hexagon.h: New file.

13 years agoDo not put dummy AO_non_posix_impl... symbol to executables.
Ivan Maidanski [Wed, 21 Sep 2011 12:55:19 +0000 (16:55 +0400)]
Do not put dummy AO_non_posix_impl... symbol to executables.

* src/atomic_ops.c
(AO_non_posix_implementation_is_entirely_in_headers): Make external.

13 years agoFix configure for mingw-w64/32.
Ivan Maidanski [Wed, 21 Sep 2011 09:14:29 +0000 (13:14 +0400)]
Fix configure for mingw-w64/32.

* configure.ac (PICFLAG, THREADDLLIBS): Define as empty for MinGW.
* configure.ac (have_pthreads): New definition (set to true unless
MinGW).
* configure.ac (HAVE_PTHREAD_H): New AM conditional (based on
have_pthreads value).
* tests/Makefile.am (test_atomic_pthreads_SOURCES,
test_atomic_pthreads_CPPFLAGS, test_atomic_pthreads_LDADD): Define
only if HAVE_PTHREAD_H.
* tests/Makefile.am (TESTS): Don't include test_atomic_pthreads unless
HAVE_PTHREAD_H.
* tests/Makefile.am (check_PROGRAMS): Define to TESTS value.

13 years agoTurn atomic_ops_malloc static mmap-related empty functions into macro
Ivan Maidanski [Wed, 21 Sep 2011 09:02:40 +0000 (13:02 +0400)]
Turn atomic_ops_malloc static mmap-related empty functions into macro
definitions in case of missing mmap() to eliminate a compiler warning
about unused arguments.

* src/atomic_ops_malloc.c (get_mmaped, AO_malloc_large,
AO_free_large): Turn static empty function into macro definition;
remove ARGSUSED comment-based annotation.

13 years agoFix test_malloc - allocate less memory in case of missing mmap()
Ivan Maidanski [Wed, 21 Sep 2011 08:50:06 +0000 (12:50 +0400)]
Fix test_malloc - allocate less memory in case of missing mmap()

* tests/test_malloc.c (LIST_LENGTH, LARGE_OBJ_SIZE): Define to
a smaller value unless HAVE_MMAP.

13 years agotests: Invoke exit() instead of abort() in case of out of memory
Ivan Maidanski [Wed, 21 Sep 2011 08:46:39 +0000 (12:46 +0400)]
tests: Invoke exit() instead of abort() in case of out of memory

* tests/test_malloc.c (cons, run_one_test): Call exit with a non-zero
code (instead of abort) if out of memory.
* tests/test_stack.c (add_elements): Likewise.
* tests/test_stack.c (main): Use a distinct exit code if a thread
creation failed.

13 years agoFix a typo in emul_cas.h comment.
Ivan Maidanski [Thu, 15 Sep 2011 06:27:57 +0000 (10:27 +0400)]
Fix a typo in emul_cas.h comment.

* src/atomic_ops/sysdeps/emul_cas.h: Fix a typo (replace AO_FORCE_CAS
with AO_REQUIRE_CAS in a comment).

13 years agoExpand all tabs to spaces, remove trailing spaces at EOLn.
Ivan Maidanski [Wed, 14 Sep 2011 16:22:41 +0000 (20:22 +0400)]
Expand all tabs to spaces, remove trailing spaces at EOLn.

* doc/LICENSING.txt: Remove trailing spaces at EOLn.
* src/atomic_ops/sysdeps/all_acquire_release_volatile.h: Likewise.
* doc/README_win32.txt: Expand all tabs to spaces.
* src/atomic_ops/sysdeps/sunc/sparc.S: Likewise.

13 years agoDefine AO macros for libatomic_ops version identification.
Ivan Maidanski [Fri, 9 Sep 2011 10:15:40 +0000 (14:15 +0400)]
Define AO macros for libatomic_ops version identification.

* src/atomic_ops/ao_version.h: New file (defining new
AO_VERSION_MAJOR, AO_VERSION_MINOR, AO_VERSION_ALPHA macros).
* src/Makefile.am (nobase_private_HEADERS): Add
atomic_ops/ao_version.h file.
* src/atomic_ops.h: Include atomic_ops/ao_version.h file.

13 years agoAdjust AO_..._H macros in public headers.
Ivan Maidanski [Fri, 9 Sep 2011 09:17:40 +0000 (13:17 +0400)]
Adjust AO_..._H macros in public headers.

* src/atomic_ops.h (ATOMIC_OPS_H): Add AO_ prefix.
* src/atomic_ops/generalize.h (ATOMIC_OPS_H): Likewise.
* src/atomic_ops/sysdeps/emul_cas.h (ATOMIC_OPS_H): Likewise.
* src/atomic_ops/generalize.h (ATOMIC_OPS_H): Adjust #error message.
* src/atomic_ops_malloc.h (AO_ATOMIC_H): Rename to AO_MALLOC_H.

13 years agoUpdate TODO.
Ivan Maidanski [Thu, 8 Sep 2011 19:16:33 +0000 (23:16 +0400)]
Update TODO.

13 years agoUpdate TODO file.
Ivan Maidanski [Thu, 8 Sep 2011 11:33:14 +0000 (15:33 +0400)]
Update TODO file.

13 years agoBump libatomic_ops version to 7.3alpha1 (next major release development).
Ivan Maidanski [Thu, 8 Sep 2011 11:32:37 +0000 (15:32 +0400)]
Bump libatomic_ops version to 7.3alpha1 (next major release development).

* README: Change version to 7.3alpha1.
* configure.ac (AC_INIT): Likewise.

13 years agoUpdate ChangeLog.
Ivan Maidanski [Thu, 8 Sep 2011 11:10:55 +0000 (15:10 +0400)]
Update ChangeLog.

13 years agoAdd more TODO items.
Ivan Maidanski [Thu, 1 Sep 2011 11:24:42 +0000 (15:24 +0400)]
Add more TODO items.

13 years agoUpdate TODO item.
Ivan Maidanski [Thu, 18 Aug 2011 11:15:11 +0000 (15:15 +0400)]
Update TODO item.

13 years agoTurn off AO primitives inlining if AO_NO_INLINE defined.
Ivan Maidanski [Thu, 18 Aug 2011 10:00:56 +0000 (14:00 +0400)]
Turn off AO primitives inlining if AO_NO_INLINE defined.

* src/atomic_ops.h (AO_INLINE): Define as 'static' if AO_NO_INLINE
(new macro).

13 years agoAdd ARGSUSED comment-based attribute for some functions.
Ivan Maidanski [Thu, 18 Aug 2011 09:56:40 +0000 (13:56 +0400)]
Add ARGSUSED comment-based attribute for some functions.

* atomic_ops_malloc.c (get_mmaped, AO_malloc_large, AO_free_large):
Add ARGSUSED tag.

13 years agoSpecify LDFLAGS with '-no-undefined' option.
Ivan Maidanski [Wed, 17 Aug 2011 18:10:36 +0000 (22:10 +0400)]
Specify LDFLAGS with '-no-undefined' option.

* src/Makefile.am (libatomic_ops_la_LDFLAGS,
libatomic_ops_gpl_la_LDFLAGS): Define (specifying '-version-info' and
'-no-undefined' options).

13 years agoDo not pass -fPIC to Cygwin gcc.
Ivan Maidanski [Wed, 17 Aug 2011 17:39:25 +0000 (21:39 +0400)]
Do not pass -fPIC to Cygwin gcc.

* configure.ac (PICFLAG): Set to -fPIC if GCC but not Gygwin.

13 years agoReplace m4/.keep file with .gitignore one.
Ivan Maidanski [Wed, 17 Aug 2011 16:31:05 +0000 (20:31 +0400)]
Replace m4/.keep file with .gitignore one.

* m4/.keep: Rename to m4/.gitignore; update the content.
* .gitignore: Replace multiple entries in m4/ with a wildcard.

13 years agoUpdate TODO items.
Ivan Maidanski [Mon, 15 Aug 2011 13:35:21 +0000 (17:35 +0400)]
Update TODO items.

13 years agoIgnore libtool, .la and .lo files.
Ivan Maidanski [Mon, 15 Aug 2011 08:35:58 +0000 (12:35 +0400)]
Ignore libtool, .la and .lo files.

13 years agoMerge pull request #2 from paurkedal/t/build-aug-14
Ivan Maidanski [Mon, 15 Aug 2011 08:21:53 +0000 (01:21 -0700)]
Merge pull request #2 from paurkedal/t/build-aug-14

Various build fixes (add 'm4', move .pc file to pkgconfig).

13 years agoAdd -uninstalled pkg-config file, move them to pkgconfig/.
Petter Urkedal [Sun, 14 Aug 2011 10:37:31 +0000 (12:37 +0200)]
Add -uninstalled pkg-config file, move them to pkgconfig/.

* atomic_ops.pc.in -> pkgconfig/atomic_ops.pc.in: Moved.
* pkgconfig/atomic_ops-uninstalled.pc.in: Added developer version.
* configure.ac, Makefile.am: Update accordingly.

13 years agoUse libtool for linking but keep the libraries static.
Petter Urkedal [Sun, 14 Aug 2011 10:24:30 +0000 (12:24 +0200)]
Use libtool for linking but keep the libraries static.

* configure.ac: Use LT_INIT([disable-shared]) instead of AC_PROG_RANLIB.
Also, re-enable the m4 macro directory.
* Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
* m4/.keep: Create the m4 directory to avoid problems due to the above
m4 flag when running autoreconf for the first time.

13 years agoAdd include flags for test directory.
Petter Urkedal [Sun, 14 Aug 2011 10:17:28 +0000 (12:17 +0200)]
Add include flags for test directory.

* tests/Makefile.am (AM_CPPFLAGS): Include flag for the tests
sub-directory is needed when the build directory is different from the
source directory.

13 years agoMerge pull request #1 from paurkedal/master
Ivan Maidanski [Thu, 11 Aug 2011 17:25:07 +0000 (10:25 -0700)]
Merge pull request #1 from paurkedal/master

This should fix the config.h issue.