summaryrefslogtreecommitdiff
path: root/tests/test_atomic.c
Commit message (Collapse)AuthorAgeFilesLines
* Add dd_acquire_read case to test_atomicIvan Maidanski2016-10-251-0/+1
| | | | | | | * tests/Makefile.am (test_atomic_include.h): Add "_dd_acquire_read" test generation. * tests/test_atomic.c [!AO_NO_PTHREADS || !AO_USE_PTHREAD_DEFS] (main): Call test_atomic_dd_acquire_read().
* Fix missing casts to match printf format specifier in test_atomicIvan Maidanski2014-06-131-2/+2
| | | | | | * tests/test_atomic.c (test_and_set_thr): Add missing casts to long for locked_counter (which is unsigned long) to match printf format specifier.
* tests: Do not use deprecated AO_T and AO_TS_TIvan Maidanski2013-08-111-1/+1
| | | | | | | | * tests/list_atomic.template (list_atomicXX): Use AO_t instead of deprecated AO_T. * tests/list_atomic.template (list_atomicXX): Use AO_TS_t instead of deprecated AO_TS_T. * tests/test_atomic.c (lock): Likewise.
* Enable build using toolchain without pthreadsGilles Talis2013-05-261-0/+12
| | | | | | | | | * src/atomic_ops.c: Include pthread.h only if not AO_NO_PTHREADS (new macro). * src/atomic_ops.c (AO_pt_lock): Define only unless AO_NO_PTHREADS. * tests/test_atomic.c (main): Skip test_atomic_pthreads if both AO_NO_PTHREADS and AO_USE_PTHREAD_DEFS are defined (preventing test link failure if AO_NO_PTHREADS passed via CFLAGS).
* Specify AO_fetch_and_add/sub1 result is unused in test_atomicIvan Maidanski2012-10-181-5/+5
| | | | | | * tests/test_atomic.c (add1sub1_thr): Explicitly cast result of AO_fetch_and_sub1 and AO_fetch_and_add1 to void (to outline that the result is unused intentionally); reformat code.
* Terminate tests with abort after error reportedIvan Maidanski2012-09-181-1/+4
| | | | | | * tests/test_atomic.c (acqrel_thr): Call abort() after fprintf(stderr). * tests/test_malloc.c (run_one_test): Likewise. * tests/test_stack.c (check_list, main): Likewise.
* Change function prototype specifications to follow strict ANSI C styleIvan Maidanski2012-01-191-1/+1
| | | | | | * tests/test_atomic.c (main): Put "void" keyword into the arguments specification of the function prototype. * tests/test_stack.c (main): Likewise.
* Move names of committers from source files to AUTHORS listIvan Maidanski2011-10-151-1/+0
| | | | | | | | | | | | | | * 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.
* Rename run_parallel.inc to run_parallel.h;Ivan Maidanski2011-08-091-1/+1
| | | | | | | | | | 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.
* Remove duplicate doc/COPYING and empty NEWS files.Ivan Maidanski2011-08-091-1/+1
| | | | | | | | | | * 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.
* Fix compiler extra warnings.Ivan Maidanski2011-08-041-31/+31
| | | | | | | | | | | | | | | * 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).
* 2011-07-14 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-251-35/+35
| | | | | | | | | | | | | | | | | | | | * 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.
* 2006-03-28 Hans Boehm <Hans.Boehm@hp.com>hboehm2011-07-251-0/+7
| | | | | | | | Integrate Earl Chew's atomic_ops improvements. More details are in the libatomic_ops ChangeLog. * ChangeLog, src/atomic_ops.h, src/atomic_ops/sysdeps/gcc/powerpc.h, src/atomic_ops/sysdeps/msftc/x86.h, tests/run_parallel.inc, tests/test_atomic.c, tests/test_atomic_include.h.
* libatomic_ops-1.0 tarball importlibatomic_ops-1_0Ivan Maidanski2011-07-251-0/+183