summaryrefslogtreecommitdiff
path: root/test/testatomic.c
Commit message (Collapse)AuthorAgeFilesLines
* testatomic: Fix apr_uint64_t format to APR_UINT64_T_FMT.Yann Ylavic2023-04-211-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909310 13f79535-47bb-0310-9956-ffa450edef68
* atomic: test 4-bytes aligned and/or cross-cacheline atomics (on 32bit systems).Yann Ylavic2023-03-021-19/+33
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907985 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: initialize in the test the globals used by it.Yann Ylavic2023-02-151-0/+3
| | | | | | | | | Just in case the test is later reordered (e.g. test_atomics_threaded64 and test_atomics_threaded_setread64 use the same atomic_ops64 variable). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907677 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: Follow up to r1902199: More numeric types assertions.Yann Ylavic2022-06-231-2/+2
| | | | | | | | | | | | * test/testatomic.c(busyloop_dec32): Use ABTS_UINT_EQUAL(). * test/testatomic.c(busyloop_dec64): Use ABTS_ULLONG_EQUAL(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902204 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: Use new numeric types assertions from r1902191 to avoid warnings.Yann Ylavic2022-06-231-46/+46
| | | | | | | | | | * test/testatomic.c(): Use ABTS_UINT_EQUAL() to compare apr_uint32_t atomics, and ABTS_ULLONG_EQUAL() for apr_uint64_t ones. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902199 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: Fix gcc-11 warnings.Yann Ylavic2022-01-071-9/+9
| | | | | | | | | | Not sure why it wants the "a" local variable to point to something since we only use its pointer, but that's how it is.. While at it let's initialize "b" too. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1896803 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: Silence -Wmissing-prototypes warning.Branko Čibej2020-05-061-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1877444 13f79535-47bb-0310-9956-ffa450edef68
* apr_atomic_read64(): Fix non-atomic read on 32-bit Windows.Ivan Zhakov2019-10-081-0/+38
| | | | | | | | | | | | | | * atomic/win32/apr_atomic64.c (apr_atomic_read64): Use InterlockedCompareExchange64() instead of direct memory read. * test/testatomic.c (test_atomics_threaded_setread64): New test. (test_func_set64): Helepr for test_atomics_threaded_setread64 test. * CHANGES: Add changelog entry. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1868129 13f79535-47bb-0310-9956-ffa450edef68
* Add in Atomics for 64bit intsJim Jagielski2018-09-171-0/+387
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1841078 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1763666: adapt unit test.Yann Ylavic2016-10-071-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1763670 13f79535-47bb-0310-9956-ffa450edef68
* testatomic: silence Sun compiler warning.Yann Ylavic2015-04-231-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1675656 13f79535-47bb-0310-9956-ffa450edef68
* Test that adding a negative number works as expectedJim Jagielski2013-11-251-0/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1545279 13f79535-47bb-0310-9956-ffa450edef68
* Fix amd64 assembler version of apr_atomic_xchgptr()Stefan Fritsch2013-04-211-2/+3
| | | | | | | | PR: 51851 Submitted by: Mattias Engdegård <mattiase acm org> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1470348 13f79535-47bb-0310-9956-ffa450edef68
* fix some obvious reversals of expected and actual values in invocations Jeff Trawick2007-11-181-5/+5
| | | | | | | of ABTS_INT_EQUAL et al git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@596028 13f79535-47bb-0310-9956-ffa450edef68
* Introduce apr_atomic_xchgptr, which atomically exchanges a pair of pointerDavi Arnaut2007-07-101-0/+12
| | | | | | | values. Missing OS/390 implementation. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@554995 13f79535-47bb-0310-9956-ffa450edef68
* Remove unused variables and make thread function local.Davi Arnaut2007-07-081-5/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@554294 13f79535-47bb-0310-9956-ffa450edef68
* The test can run faster by relinquishing the processor when the count valueDavi Arnaut2007-07-061-30/+27
| | | | | | | is not the thread pre-value. This change lets increase the number of loops. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@553863 13f79535-47bb-0310-9956-ffa450edef68
* Call apr_thread_exit() on thread exit.Davi Arnaut2007-07-051-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@553604 13f79535-47bb-0310-9956-ffa450edef68
* Add a threaded atomic test that busy-loops on a count variable. Once the countDavi Arnaut2007-07-051-0/+201
| | | | | | | | variable meets a predetermined value for each thread, the count will be atomically changed, triggering another busy-loop (on another thread), and so on.. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@553514 13f79535-47bb-0310-9956-ffa450edef68
* Remove test code that is commented out. While at it, clean up the code a bit.Davi Arnaut2007-07-051-48/+21
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@553350 13f79535-47bb-0310-9956-ffa450edef68
* Fix assertion message, function tests apr_atomic_inc32(-1).Davi Arnaut2007-07-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@552360 13f79535-47bb-0310-9956-ffa450edef68
* add a test for apr_atomic_casptr, used in theGreg Ames2007-02-091-0/+36
| | | | | | | httpd worker and event MPMs git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@505091 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.Joe Orton2006-08-031-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.Joe Orton2006-08-031-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* As per apr_hints.m4, SOLARIS2 is set to "6" for Solaris 2.6, "10" forColm MacCarthaigh2006-06-131-1/+1
| | | | | | | 2.10 and so on. Reflect that in our use of the macro. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@413784 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* Presently if we fail in apr_assert_success we get the line number forDavid Reid2004-06-071-2/+2
| | | | | | | | | | | | testutil.c reported. Not very useful. This change adds the passing of the (correct) line number and also a macro to ease said passing. I've changed all instances of apr_assert_success to use the new macro, but not all the tests build on this platform so others should check that all is well for them. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65171 13f79535-47bb-0310-9956-ffa450edef68
* Add the line number to the verbose output from abts. This also removesRyan Bloom2004-05-141-28/+28
| | | | | | | a test that is segfaulting in testshm. That will need to be fixed. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65095 13f79535-47bb-0310-9956-ffa450edef68
* Move the APR test suite from CuTest to abts. The output is cleaner,Ryan Bloom2004-05-131-60/+60
| | | | | | | | | | | | and it prints output while running the test. Also, if a test fails the rest of the test function is run, allowing for proper cleanup. Finally, it is possible to call the same function multiple times with different data, and each call is considered a separate test. This is the first of a multi-step process to get a more useful test suite. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65091 13f79535-47bb-0310-9956-ffa450edef68
* Remove unused var.Ryan Bloom2004-03-131-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64976 13f79535-47bb-0310-9956-ffa450edef68
* No reason to keep track of the old return values.Ryan Bloom2004-03-131-8/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64975 13f79535-47bb-0310-9956-ffa450edef68
* Declare variables at the beginning of functions, I'm surprised thisRyan Bloom2004-03-131-2/+4
| | | | | | | actually compiled on Linux. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64973 13f79535-47bb-0310-9956-ffa450edef68
* Migrate testatomic to testall. I have commented out a test thatRyan Bloom2004-03-131-253/+173
| | | | | | | | specifically states that we expect it to fail. We aren't actually testing APR with that test. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64970 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0Justin Erenkrantz2004-02-131-49/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* * testatomic.c (check_basic_atomics32): Test wrapping around zero.Joe Orton2004-01-061-0/+25
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64860 13f79535-47bb-0310-9956-ffa450edef68
* add return value checks for apr_atomic_add32 and apr_atomic_inc32Greg Ames2003-12-091-2/+22
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64827 13f79535-47bb-0310-9956-ffa450edef68
* * testatomic.c: Whitelist rather than blacklist to enableJoe Orton2003-12-051-2/+5
| | | | | | | | pthread_setconcurrency (fix build on a bunch of platforms which don't have pthread_setconcurrency at all). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64813 13f79535-47bb-0310-9956-ffa450edef68
* move the implementations of apr atomics out of the public header fileJeff Trawick2003-12-031-2/+2
| | | | | | | | | | | in order to . aid in keeping the different flavors consistent . prevent bug fixes from requiring that apps be rebuilt Reviewed and/or fixed by: Brad Nicholes, Greg Marr git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64803 13f79535-47bb-0310-9956-ffa450edef68
* do the right thing on BEOSJeff Trawick2003-11-161-2/+7
| | | | | | | avoid some duplication of platform knowledge git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64752 13f79535-47bb-0310-9956-ffa450edef68
* axing deprecated apr_atomic_foo functionsJeff Trawick2003-11-161-111/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64747 13f79535-47bb-0310-9956-ffa450edef68
* Fix default impl of apr_atomic_xchg32, and add a test case for itBrian Pane2003-09-261-0/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64642 13f79535-47bb-0310-9956-ffa450edef68
* make empty parameter list explicit to avoid compile warningJeff Trawick2003-09-251-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64641 13f79535-47bb-0310-9956-ffa450edef68
* new version of atomic API that works specifically on apr_uint32_t values for ↵Brian Pane2003-09-251-0/+83
| | | | | | greater portability git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64639 13f79535-47bb-0310-9956-ffa450edef68
* minor syntax tweakJeff Trawick2003-09-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64631 13f79535-47bb-0310-9956-ffa450edef68
* remove an unused function argumentBrian Pane2003-09-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64630 13f79535-47bb-0310-9956-ffa450edef68
* remove an unused function argumentBrian Pane2003-09-191-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64629 13f79535-47bb-0310-9956-ffa450edef68
* run more loop iterations to better check for race conditionsBrian Pane2003-09-141-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64623 13f79535-47bb-0310-9956-ffa450edef68
* remove some debug code that leaked in to the last commitBrian Pane2003-09-141-5/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64621 13f79535-47bb-0310-9956-ffa450edef68
* fix error message in add testBrian Pane2003-09-141-1/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64620 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright notices to 2003.Thom May2003-01-011-1/+1
| | | | | | | No functional changes git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68