summaryrefslogtreecommitdiff
path: root/test/testatomic.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* No pthread_setconcurrency here on Darwin.William A. Rowe Jr2002-12-291-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64236 13f79535-47bb-0310-9956-ffa450edef68
* Testatomic needs to be run on all platforms. Adding a platform specificRyan Bloom2002-12-061-10/+2
| | | | | | | | | | | check to the test doesn't help us find problems. If the test fails, that is important information to have. Also, get the test to run on platforms without threads, it used to segfault. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64127 13f79535-47bb-0310-9956-ffa450edef68
* Remove the apr_thread_once test from testatomic.c. We already test thatRyan Bloom2002-12-061-23/+0
| | | | | | | | feature in testthread.c (using the exact same code), so it is just confusing an already complicated test program. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64125 13f79535-47bb-0310-9956-ffa450edef68
* fix the label on one of the new testsBrian Pane2002-10-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63955 13f79535-47bb-0310-9956-ffa450edef68
* updated testatomic to cover apr_atomic_casptrBrian Pane2002-10-191-1/+28
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63954 13f79535-47bb-0310-9956-ffa450edef68
* Test all of the atomic math operations in the multithreadedBrian Pane2002-09-221-1/+4
| | | | | | | phase of the tests git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63880 13f79535-47bb-0310-9956-ffa450edef68
* We shouldn't presume any specific int sizes here, no?William A. Rowe Jr2002-07-021-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63549 13f79535-47bb-0310-9956-ffa450edef68
* - Make this more legible (style police)Justin Erenkrantz2002-05-011-53/+71
| | | | | | | | | - Modify output to indicate that the threads may take a while to complete (No compelling functional changes.) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63325 13f79535-47bb-0310-9956-ffa450edef68
* Fix a compile break:Cliff Woolley2002-04-181-2/+2
| | | | | | | | | In file included from testatomic.c:61: /usr/include/stdlib.h:485: parse error before `;' make[1]: *** [testatomic.lo] Error 1 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63278 13f79535-47bb-0310-9956-ffa450edef68
* Remove all uses of the apr_lock.h API from the tests.Aaron Bannert2002-04-091-6/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63232 13f79535-47bb-0310-9956-ffa450edef68
* get this working on OS/390.Greg Ames2002-03-221-1/+1
| | | | | | | (MVS == ancient name for OS/390) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63181 13f79535-47bb-0310-9956-ffa450edef68
* apr_atomic_dec now returns zero if the value is zero.Ian Holsman2002-03-161-1/+12
| | | | | | | | | | PR: Obtained from: Submitted by: Greg Ames Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63139 13f79535-47bb-0310-9956-ffa450edef68
* freebsd atomic support will only be available in 5Ian Holsman2002-03-151-1/+1
| | | | | | | | | | | as the functionality is just not there in 4.5, and cripples the api PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63131 13f79535-47bb-0310-9956-ffa450edef68
* Since atomic_t isn't available on FreeBSD < 4, don't test it.Ben Laurie2002-03-141-0/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63120 13f79535-47bb-0310-9956-ffa450edef68