]> granicus.if.org Git - libatomic_ops/log
libatomic_ops
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.

13 years agoAdd and adjust include directories.
Petter Urkedal [Wed, 10 Aug 2011 17:38:35 +0000 (19:38 +0200)]
Add and adjust include directories.

* src/Makefile.am, tests/Makefile.am: Set compiler include paths
to $(top_builddir)/src and $(top_srcdir)/src.

13 years agoFix commits 86e8b5 and 7bd1fd regarding "make install"
Ivan Maidanski [Tue, 9 Aug 2011 17:10:25 +0000 (21:10 +0400)]
Fix commits 86e8b5 and 7bd1fd regarding "make install"
(fix paths for private header files and copy COPYING file).

* Makefile.am (dist_pkgdata_DATA): Add COPYING.
* src/Makefile.am (EXTRA_DIST): Add atomic_ops/sysdeps/README (move
from private_HEADERS).
* src/Makefile.am (privatedir): Fix path.
* src/Makefile.am (private_HEADERS): Make "nobase".

13 years agoImprove Makefile for MS VC++.
Ivan Maidanski [Tue, 9 Aug 2011 16:42:05 +0000 (20:42 +0400)]
Improve Makefile for MS VC++.

* src/Makefile.msft: Remove list_atomic.c from the comment.
* src/Makefile.msft: Compile with -W3 option; replace -o option
with /Fo.
* src/Makefile.msft (clean): New target.

13 years agoFix atomic_ops library name and fix a typo in a comment.
Ivan Maidanski [Tue, 9 Aug 2011 16:36:48 +0000 (20:36 +0400)]
Fix atomic_ops library name and fix a typo in a comment.

* atomic_ops.pc.in: Refine name.
* src/atomic_ops_malloc.h: Fix README_malloc filename in comment;
expand all tabs to spaces.

13 years agoRemove auto-generated tests/list_atomic.c and test_atomic_include.h
Ivan Maidanski [Tue, 9 Aug 2011 15:26:42 +0000 (19:26 +0400)]
Remove auto-generated tests/list_atomic.c and test_atomic_include.h
from the repo.

The files are still present in the distributive tar-ball as it is hard
to generate them on Windows (without Cygwin/MinGW).  Note that these
files are used only for testing (unlike generalize-small.h).
The later remains even in the repo as it makes possible to use
libatomic_ops without running any script.

* .gitignore: add tests/list_atomic.c and test_atomic_include.h.
* src/Makefile.msft: Add comment about test_atomic_include.h; wrap
long lines.
* src/Makefile.msft (all): Build "libatomic_ops_gpl.lib" instead of
"check".
* tests/list_atomic.c, tests/test_atomic_include.h: Remove.

13 years agoMerge all Makefile.am in /src tree (to have less auto-generated files
Ivan Maidanski [Tue, 9 Aug 2011 14:50:32 +0000 (18:50 +0400)]
Merge all Makefile.am in /src tree (to have less auto-generated files
in the project subdirectories).

* configure.ac (AC_CONFIG_FILES): Remove src/atomic_ops/Makefile,
src/atomic_ops/sysdeps/Makefile.
* src/Makefile.am (SUBDIRS): Remove.
* src/Makefile.am (EXTRA_DIST, privatedir, private_HEADERS): Add from
src/atomic_ops/Makefile.am and src/atomic_ops/sysdeps/Makefile.am.
* src/Makefile.am (generalize-small): Move from
src/atomic_ops/Makefile.am.
* src/atomic_ops/Makefile.am, src/atomic_ops/sysdeps/Makefile.am:
Remove.

13 years agoAdd TODO items.
Ivan Maidanski [Tue, 9 Aug 2011 11:37:21 +0000 (15:37 +0400)]
Add TODO items.

13 years agoRename run_parallel.inc to run_parallel.h;
Ivan Maidanski [Tue, 9 Aug 2011 11:35:25 +0000 (15:35 +0400)]
Rename run_parallel.inc to run_parallel.h;
rename test_atomic.template to test_atomic_include.template.

* tests/Makefile.am(EXTRA_DIST): Adjust for run_parallel.h and
test_atomic_include.template files.
* tests/run_parallel.inc: Rename to tests/run_parallel.h.
* test_atomic.template: Rename to test_atomic_include.template.
* test_atomic.c, test_malloc.c: Adjust included file name.

13 years agoRemove all .cvsignore files.
Ivan Maidanski [Tue, 9 Aug 2011 11:15:48 +0000 (15:15 +0400)]
Remove all .cvsignore files.

* .cvsignore, doc/.cvsignore, src/.cvsignore, src/atomic_ops/.cvsignore,
src/atomic_ops/sysdeps/.cvsignore, tests/.cvsignore: Remove.
* .gitignore: Update comment.

13 years agoRemove duplicate doc/COPYING and empty NEWS files.
Ivan Maidanski [Tue, 9 Aug 2011 11:12:30 +0000 (15:12 +0400)]
Remove duplicate doc/COPYING and empty NEWS files.

* NEWS, doc/COPYING: Remove.
* doc/Makefile.am (dist_pkgdata_DATA): Remove "COPYING".
* src/atomic_ops_malloc.c, src/atomic_ops_stack.c,
tests/list_atomic.template, tests/run_parallel.inc,
tests/test_atomic.template, tests/test_atomic.c, tests/test_malloc.c,
tests/test_stack.c: Adjust "COPYING" filename in comments.
* tests/list_atomic.c, tests/test_atomic_include.h: Regenerate.

13 years agoRemove auto-generated files and add them to .gitignore.
Ivan Maidanski [Tue, 9 Aug 2011 10:48:21 +0000 (14:48 +0400)]
Remove auto-generated files and add them to .gitignore.

* .gitignore: Add more files to ignore in the repo.
* INSTALL, Makefile.in, aclocal.m4, compile, config.guess, config.sub,
configure, depcomp, doc/Makefile.in, install-sh, missing, mkinstalldirs,
src/Makefile.in, src/atomic_ops/Makefile.in, src/config.h.in,
src/atomic_ops/sysdeps/Makefile.in, tests/Makefile.in: Remove.

13 years agoAdd TODO item (FIXME).
Ivan Maidanski [Mon, 8 Aug 2011 09:15:29 +0000 (13:15 +0400)]
Add TODO item (FIXME).

13 years agoDo not run reconf on configure. Ensure proper autoconf version.
Ivan Maidanski [Mon, 8 Aug 2011 08:56:38 +0000 (12:56 +0400)]
Do not run reconf on configure. Ensure proper autoconf version.

* configure.ac (AC_PREREQ, AM_MAINTAINER_MODE): New macro.
* configure.ac (AM_INIT_AUTOMAKE): Add options.
* configure.ac (AC_HEADER_STDC): Remove (as not needed).
* Makefile.in, aclocal.m4, configure, doc/Makefile.in, src/Makefile.in,
src/atomic_ops/Makefile.in, src/atomic_ops/sysdeps/Makefile.in,
tests/Makefile.in: Regenerate.

13 years agoShow extra compiler warnings (GCC).
Ivan Maidanski [Mon, 8 Aug 2011 07:32:15 +0000 (11:32 +0400)]
Show extra compiler warnings (GCC).

* configure.ac (CFLAGS): Add -Wall -Wextra (GCC only).
* configure: Regenerate.

13 years agoFix compiler extra warnings.
Ivan Maidanski [Thu, 4 Aug 2011 18:49:51 +0000 (22:49 +0400)]
Fix compiler extra warnings.

* src/atomic_ops_stack.c (AO_stack_pop_explicit_aux_acquire): Remove
non-negative-value test for an unsigned value.
* src/atomic_ops_stack.h (AO_STACK_INITIALIZER): Add {} to match type
definition.
* tests/test_atomic.c (acqrel_thr): Fix code indentation.
* tests/test_atomic.c (test_and_set_thr): Print thread Id in case of error.
* tests/test_malloc.c (cons): Declare "i" local variable as unsigned (as it
is compared to another unsigned value).
* tests/test_malloc.c (check_list): Test upper bound as well, abort with the
appropriate message in case of mismatch.
* tests/test_malloc.c (run_one_test): Return "arg" parameter (to suppress
"unused parameter" compiler warning).

13 years agoAdd atomic_ops.pc.
Ivan Maidanski [Thu, 4 Aug 2011 17:37:42 +0000 (21:37 +0400)]
Add atomic_ops.pc.

* .cvsignore, .gitignore: ignore atomic_ops.pc.
* atomic_ops.pc.in: new file.
* Makefile.am (pkgconfigdir, pkgconfig_DATA): new items.
* configure.ac (AC_CONFIG_FILES): add atomic_ops.pc.
* configure, Makefile.in: Regenerate.

13 years ago* ChangeLog: drop the entire content in favor of the Git commit log;
Ivan Maidanski [Thu, 4 Aug 2011 16:50:24 +0000 (20:50 +0400)]
* ChangeLog: drop the entire content in favor of the Git commit log;
place only major per-release changes description here.

13 years agoAdd TODO item
Ivan Maidanski [Thu, 4 Aug 2011 10:11:53 +0000 (14:11 +0400)]
Add TODO item

13 years agoInstruct Git to ignore 'tests/core' file
Ivan Maidanski [Thu, 4 Aug 2011 08:13:11 +0000 (12:13 +0400)]
Instruct Git to ignore 'tests/core' file

13 years agoEnsure normalized text line encodings in repo.
Ivan Maidanski [Thu, 4 Aug 2011 07:54:59 +0000 (11:54 +0400)]
Ensure normalized text line encodings in repo.

13 years ago* src/atomic_ops.h: Update comment (add AO_and, AO_xor).
Ivan Maidanski [Wed, 3 Aug 2011 19:03:33 +0000 (23:03 +0400)]
* src/atomic_ops.h: Update comment (add AO_and, AO_xor).
* src/atomic_ops/generalize.h (AO_and_full, AO_xor_full): New functions.
* src/atomic_ops/sysdeps/gcc/x86.h: Ditto.
* src/atomic_ops/sysdeps/gcc/x86_64.h: Ditto.
* src/atomic_ops/sysdeps/generic_pthread.h: Ditto.
* src/atomic_ops/sysdeps/sunc/x86.h: Ditto.
* src/atomic_ops/sysdeps/sunc/x86_64.h: Ditto.
* src/atomic_ops/generalize.h (AO_and_..., AO_xor_..., AO_HAVE_and_...,
AO_HAVE_xor_...): New macros.
* tests/test_atomic.template (test_atomicXX): Fix "or" constant; add AO_xor()
and AO_and() tests.
* tests/test_atomic_include.h: Regenerate.

13 years ago* src/atomic_ops/generalize.h (AO_or_full): Rename incr argument to value.
Ivan Maidanski [Wed, 3 Aug 2011 17:26:44 +0000 (21:26 +0400)]
* src/atomic_ops/generalize.h (AO_or_full): Rename incr argument to value.
* src/atomic_ops/sysdeps/gcc/x86.h: Ditto.
* src/atomic_ops/sysdeps/gcc/x86_64.h: Ditto.
* src/atomic_ops/sysdeps/sunc/x86.h: Ditto.
* src/atomic_ops/sysdeps/sunc/x86_64.h: Ditto.

13 years ago* generic_pthread.h (AO_compare_and_swap_full,
Ivan Maidanski [Wed, 3 Aug 2011 17:14:06 +0000 (21:14 +0400)]
* generic_pthread.h (AO_compare_and_swap_full,
AO_compare_double_and_swap_double_full, AO_compare_and_swap_double_full):
fix code indentation.

13 years agogeneric_pthread.h (AO_or_full): rename incr parameter to value; remove tmp local...
Ivan Maidanski [Wed, 3 Aug 2011 16:32:38 +0000 (20:32 +0400)]
generic_pthread.h (AO_or_full): rename incr parameter to value; remove tmp local variable

13 years agoExpand all tabs to spaces; remove trailing blank lines
Ivan Maidanski [Wed, 3 Aug 2011 16:08:54 +0000 (20:08 +0400)]
Expand all tabs to spaces; remove trailing blank lines

13 years agoAdd project-wide .gitignore file
Ivan Maidanski [Wed, 3 Aug 2011 10:20:55 +0000 (14:20 +0400)]
Add project-wide .gitignore file

13 years agoUpdate AUTHORS file - now it lists all contributors
Ivan Maidanski [Wed, 3 Aug 2011 10:01:24 +0000 (14:01 +0400)]
Update AUTHORS file - now it lists all contributors

13 years agoAdd TODO file; regenerate Makefile.in; add note to ChangeLog.
Ivan Maidanski [Wed, 3 Aug 2011 08:08:38 +0000 (12:08 +0400)]
Add TODO file; regenerate Makefile.in; add note to ChangeLog.

13 years ago2011-07-21 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 21 Jul 2011 05:14:16 +0000 (05:14 +0000)]
2011-07-21  Ivan Maidanski <ivmai@mail.ru>

* .cvsignore: Don't ignore *.orig and *.rej files (having them
ignored turned out to be inconvenient when processing the
patches).

13 years ago2011-07-14 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 14 Jul 2011 14:39:15 +0000 (14:39 +0000)]
2011-07-14  Ivan Maidanski <ivmai@mail.ru>

* .cvsignore: Add more auto-generated files.
* src/.cvsignore: Ditto.
* tests/.cvsignore: Ditto.

13 years ago2011-07-14 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 14 Jul 2011 13:03:28 +0000 (13:03 +0000)]
2011-07-14  Ivan Maidanski <ivmai@mail.ru>

* tests/list_atomic.template (list_atomicXX): Remove "addr" local
variable (use "&val" instead); initialize "newval" and "oldval"
local variables; rename "tsaddr" local variable to "ts" one.
* tests/list_atomic.template (list_atomicXX): Fix
AO_test_and_setXX call (pass address instead of value).
* tests/list_atomic.template: Expand all tabs to spaces; remove
trailing spaces at EOLn.
* tests/run_parallel.inc: Ditto.
* tests/test_atomic.c: Ditto.
* tests/list_atomic.c: Regenerate.
* tests/run_parallel.inc (AO_PTRDIFF_T): New macro.
* tests/run_parallel.inc (tramp): Cast between pointer and integer
types via casting to AO_PTRDIFF_T.
* tests/test_atomic.c (add1sub1_thr, acqrel_thr): Ditto.
* tests/run_parallel.inc (run_parallel): Adjust printf format
specifiers for DWORD parameters.
* tests/test_stack.c: Skip test if no pthreads.

13 years ago2011-06-27 Ivan Maidanski <ivmai@mail.ru> (really Jeremy Huddleston)
ivmai [Mon, 27 Jun 2011 06:48:12 +0000 (06:48 +0000)]
2011-06-27  Ivan Maidanski <ivmai@mail.ru> (really Jeremy Huddleston)

* src/atomic_ops/sysdeps/gcc/x86.h (AO_test_and_set_full):
Explicitly cast 0xff to unsigned char (otherwise LLVM v2.7 GAS
reports an error); don't recognize AO_XCHGB_RET_WORD.
* src/atomic_ops/sysdeps/gcc/x86_64.h (AO_test_and_set_full):
Ditto.

13 years ago2011-06-15 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 15 Jun 2011 11:41:30 +0000 (11:41 +0000)]
2011-06-15  Ivan Maidanski <ivmai@mail.ru>

* include/gc_version.h, configure.ac, doc/README: Change to
version 7.2alpha7.
* configure: Regenerate.

13 years ago2011-06-14 Ivan Maidanski <ivmai@mail.ru> libatomic_ops-7_2alpha6
ivmai [Tue, 14 Jun 2011 12:34:55 +0000 (12:34 +0000)]
2011-06-14  Ivan Maidanski  <ivmai@mail.ru>

* include/gc_version.h, configure.ac, doc/README: Change to
version 7.2alpha6.
* configure: Regenerate.

13 years ago2011-06-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 7 Jun 2011 16:57:06 +0000 (16:57 +0000)]
2011-06-07  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full, AO_load): Do not
define for pre-ARMv6 directly (revert part of the previous
commit).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set,
AO_test_and_set_full): Refine the comment.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set_full): Define
SWP-based implementation at the end of file (if none of
AO_test_and_set functions are defined previously).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set): Remove
SWP-based implementation (revert part of the previous commit).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_store): Remove redundant
definition at the file end (revert part of the previous commit).

13 years ago2011-06-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 7 Jun 2011 14:13:16 +0000 (14:13 +0000)]
2011-06-07  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/sysdeps/gcc/arm.h: Handle ARMv6M architecture.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set): Force "swp"
instruction usage (instead of ldrex/strex) if AO_FORCE_USE_SWP;
add a comment.
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Handle ARMv7EM architecture
(similar to ARMv7M).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set, AO_nop_full,
AO_load, AO_store): Define at the end of file (in case not defined
previously).

13 years ago2011-06-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 7 Jun 2011 09:48:44 +0000 (09:48 +0000)]
2011-06-07  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/generalize.h: Reformat code.
* src/atomic_ops/generalize.h (AO_test_and_set_acquire): Fix
return type.
* src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_test_and_set): Ditto.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set): Ditto.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set): Add
a comment (about SWP instruction).

13 years ago2011-06-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 6 Jun 2011 20:28:43 +0000 (20:28 +0000)]
2011-06-06  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/sysdeps/gcc/arm.h (AO_THUMB_GO_ARM,
AO_THUMB_RESTORE_MODE): Use single-digit labels (to workaround
a bug in GCC v4.2.1 which reports "garbage following instruction"
otherwise).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_compare_and_swap): Use "IT"
instruction only for Thumb-2 mode.

13 years ago2011-06-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 6 Jun 2011 13:34:11 +0000 (13:34 +0000)]
2011-06-06  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/sysdeps/gcc/arm.h (AO_THUMB_GO_ARM,
AO_THUMB_RESTORE_MODE, AO_THUMB_SWITCH_CLOBBERS): Define as empty
for Thumb-2 mode.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_store, AO_test_and_set,
AO_fetch_and_add, AO_fetch_and_add1, AO_fetch_and_sub1,
AO_compare_and_swap, AO_compare_double_and_swap_double): Remove
unnecessary "memory" keyword from the list of clobbered registers
(revert part of the previous commit).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_compare_and_swap): Add
a comment for "IT" instruction.
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Don't define on the
architectures where unimplemented; add a comment; replace return
(in the loop) statement with break.

13 years ago2011-06-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 6 Jun 2011 09:04:58 +0000 (09:04 +0000)]
2011-06-06  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/sysdeps/gcc/arm.h (AO_THUMB_GO_ARM,
AO_THUMB_RESTORE_MODE, AO_THUMB_SWITCH_CLOBBERS): Define new
macro (to switch temporarily CPU mode to ARM in inline assembler
if compiling in the Thumb mode and to restore it back on leave).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full, AO_store,
AO_test_and_set, AO_fetch_and_add, AO_fetch_and_add1,
AO_fetch_and_sub1, AO_compare_and_swap, AO_test_and_set_full):
Enable compilation in the Thumb mode (use AO_THUMB_GO_ARM,
AO_THUMB_RESTORE_MODE and AO_THUMB_SWITCH_CLOBBERS macros).
* src/atomic_ops/sysdeps/gcc/arm.h (AO_store, AO_test_and_set,
AO_fetch_and_add, AO_fetch_and_add1, AO_fetch_and_sub1,
AO_compare_and_swap, AO_compare_double_and_swap_double): Add
"memory" to the list of clobbered registers.

13 years ago2011-06-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 6 Jun 2011 07:30:09 +0000 (07:30 +0000)]
2011-06-06  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/sysdeps/gcc/arm.h: Reformat code.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full,
AO_test_and_set_full): Add assembler comment containing the
function name.

13 years ago2011-06-03 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 3 Jun 2011 13:25:31 +0000 (13:25 +0000)]
2011-06-03  Ivan Maidanski  <ivmai@mail.ru>

* tests/test_malloc.c (run_one_test): Test AO_malloc() result
(if out of memory then print the message and abort).
* tests/test_stack.c (add_elements): Ditto.

13 years ago2011-06-03 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 3 Jun 2011 13:02:26 +0000 (13:02 +0000)]
2011-06-03  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/generalize.h (AO_HAVE_or_full): Add missing
definition.
* src/atomic_ops/sysdeps/ordered_except_wr.h (AO_HAVE_nop_write):
Fix macro name.
* src/atomic_ops/sysdeps/read_ordered.h (AO_HAVE_nop_read): Ditto.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_HAVE_store_release):
Ditto.

13 years ago2011-06-03 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 3 Jun 2011 10:39:38 +0000 (10:39 +0000)]
2011-06-03  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/generalize-small.template
(AO_HAVE_XSIZE_fetch_and_add_full): Add missing definition.
* src/atomic_ops/generalize-small.template: Reformat code.
* src/atomic_ops/generalize-small.h: Regenerate.

13 years ago2011-06-03 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 3 Jun 2011 09:17:00 +0000 (09:17 +0000)]
2011-06-03  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/sysdeps/aligned_atomic_load_store.h: Remove
blank line between AO_func and AO_HAVE_func definitions.
* src/atomic_ops/sysdeps/atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/char_atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/generic_pthread.h: Ditto.
* src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/int_atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/ordered.h: Ditto.
* src/atomic_ops/sysdeps/ordered_except_wr.h: Ditto.
* src/atomic_ops/sysdeps/read_ordered.h: Ditto.
* src/atomic_ops/sysdeps/short_aligned_atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/short_atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/gcc/alpha.h: Ditto.
* src/atomic_ops/sysdeps/gcc/arm.h: Ditto.
* src/atomic_ops/sysdeps/gcc/cris.h: Ditto.
* src/atomic_ops/sysdeps/gcc/hppa.h: Ditto.
* src/atomic_ops/sysdeps/gcc/ia64.h: Ditto.
* src/atomic_ops/sysdeps/gcc/m68k.h: Ditto.
* src/atomic_ops/sysdeps/gcc/mips.h: Ditto.
* src/atomic_ops/sysdeps/gcc/powerpc.h: Ditto.
* src/atomic_ops/sysdeps/gcc/s390.h: Ditto.
* src/atomic_ops/sysdeps/gcc/sparc.h: Ditto.
* src/atomic_ops/sysdeps/gcc/x86.h: Ditto.
* src/atomic_ops/sysdeps/gcc/x86_64.h: Ditto.
* src/atomic_ops/sysdeps/hpc/hppa.h: Ditto.
* src/atomic_ops/sysdeps/hpc/ia64.h: Ditto.
* src/atomic_ops/sysdeps/ibmc/powerpc.h: Ditto.
* src/atomic_ops/sysdeps/msftc/common32_defs.h: Ditto.
* src/atomic_ops/sysdeps/msftc/x86.h: Ditto.
* src/atomic_ops/sysdeps/msftc/x86_64.h: Ditto.
* src/atomic_ops/sysdeps/sunc/sparc.h: Ditto.
* src/atomic_ops/sysdeps/sunc/x86.h: Ditto.
* src/atomic_ops/sysdeps/sunc/x86_64.h: Ditto.
* src/atomic_ops/sysdeps/aligned_atomic_load_store.h: Reformat
comment.
* src/atomic_ops/sysdeps/atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/char_atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/int_aligned_atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/int_atomic_load_store.h: Ditto.
* src/atomic_ops/sysdeps/ordered.h: Ditto.
* src/atomic_ops/sysdeps/gcc/arm.h: Ditto.
* src/atomic_ops/sysdeps/test_and_set_t_is_char.h: Remove file
tail blank lines.
* src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set_full): Don't
define for ARMv2.
* src/atomic_ops/sysdeps/gcc/powerpc.h (AO_load_acquire,
AO_test_and_set, AO_compare_and_swap): Merge adjacent definitions.
* src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_HAVE_store_release):
Define.
* src/atomic_ops/sysdeps/sunc/sparc.h: Expand all tabs to spaces;
remove trailing spaces at EOLn.

13 years ago2011-06-02 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 2 Jun 2011 14:42:01 +0000 (14:42 +0000)]
2011-06-02  Ivan Maidanski  <ivmai@mail.ru>

* tests/test_malloc.c (main): Remove unused "exper_n" local
variable.
* tests/test_stack.c (run_one_test): Remove unused "aux" local
variable.

13 years ago2011-06-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 1 Jun 2011 22:43:19 +0000 (22:43 +0000)]
2011-06-01  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double,
AO_HAVE_compare_double_and_swap_double): Define only starting from
ARMv6K.
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Fix function name in
assembler code; replace while (1) loop with "do-while".

13 years ago2011-06-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 1 Jun 2011 13:57:18 +0000 (13:57 +0000)]
2011-06-01  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops/sysdeps/sunc/x86.h (AO_test_and_set_full):
Specify "%b0" (instead of "%0") in "xchg" instruction (to
workaround a bug in Sun C 5.11).
* src/atomic_ops/sysdeps/sunc/x86_64.h (AO_test_and_set_full):
Ditto.

13 years ago2011-06-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 1 Jun 2011 12:34:42 +0000 (12:34 +0000)]
2011-06-01  Ivan Maidanski  <ivmai@mail.ru>

* src/atomic_ops_malloc.c (AO_malloc_enable_mmap): Workaround for
Sun C compiler (call "release" variant of AO_store).

13 years ago2011-06-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 1 Jun 2011 07:51:37 +0000 (07:51 +0000)]
2011-06-01  Ivan Maidanski  <ivmai@mail.ru>

* configure.ac (_PTHREADS): New template (used for NetBSD).
* configure.ac (THREADDLLIBS): New macro.
* tests/Makefile.am (test_atomic_LDADD, test_stack_LDADD,
test_atomic_pthreads_LDADD, test_malloc_LDADD): Use THREADDLLIBS
instead of "-lpthread".
* configure: Regenerate.
* Makefile.in: Ditto.
* doc/Makefile.in: Ditto.
* src/Makefile.in: Ditto.
* src/atomic_ops/Makefile.in: Ditto.
* src/atomic_ops/sysdeps/Makefile.in: Ditto.
* src/config.h.in: Ditto.
* tests/Makefile.in: Ditto.

13 years ago2011-05-30 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 30 May 2011 16:52:54 +0000 (16:52 +0000)]
2011-05-30  Ivan Maidanski  <ivmai@mail.ru>

* configure.ac (PIC): Add workaround for GCC v3.4.6 which does not
define the corresponding macro.
* configure.ac: Don't check for GCC twice.
* configure: Regenerate.
* tests/test_malloc.c (DEFAULT_NTHREADS): New macro.
* tests/test_malloc.c (run_one_test): Refine printed message (in
case of HAVE_MMAP).
* tests/test_malloc.c (main): Use DEFAULT_NTHREADS.
* tests/test_stack.c (main): Cast AO_stack_pop() returned pointer.
* src/atomic_ops_malloc.c (USE_MMAP_ANON, GC_MMAP_FLAGS,
OPT_MAP_ANON): New macro.
* src/atomic_ops_malloc.c (get_mmaped): Pass -1 (instead of 0) as
file descriptor to mmap() if MAP_ANONYMOUS (same as for MAP_ANON).
* src/atomic_ops_malloc.c (get_mmaped): Use USE_MMAP_ANON,
GC_MMAP_FLAGS and OPT_MAP_ANON macros; reformat code; check open()
returned value.