aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/u_atomic_test.c
Commit message (Collapse)AuthorAgeFilesLines
* util: fix comment typoGiuseppe Bilotta2015-12-041-1/+1
| | | | | | | | Undefining the NDEBUG is relevant for release build, as they are the ones that set it. [Emil Velikov: split from previous patch] Signed-off-by: Emil Velikov <[email protected]>
* util/u_atomic: Ignore warnings interlocked accesses.Jose Fonseca2015-03-251-0/+5
| | | | | | | | | These are due how we implemented the atomic tests, not the atomic implementation itself. It's also difficult to refactor the code to avoid the warnings due to the use of macros -- the code would be quite hairy. Reviewed-by: Brian Paul <[email protected]>
* uti/u_atomic: Don't test p_atomic_add with booleans.Jose Fonseca2015-02-131-6/+19
| | | | | | | | | | | Add another class of tests. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=89112 I failed to spot this in my previous change, because bool was a typedef for char on the system I tested. Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_atomic: Test p_atomic_add() for 8bit integers.Jose Fonseca2015-02-121-15/+17
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_atomic: Add new macro p_atomic_addCarl Worth2015-02-091-0/+5
| | | | | | | | | | | | | This provides for atomic addition, which will be used by an upcoming shader-cache patch. A simple test is added to "make check" as well. Note: The various O/S functions differ on whether they return the original value or the value after the addition, so I did not provide an add_return() macro which would be sensitive to that difference. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Aaron Watry <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* util/u_atomic: Add a simple test.José Fonseca2014-12-011-0/+137
It was much easier for me to verify things build and run as expected with this simple test, than building and testing whole Mesa. With scons the test can be build and run merely by doing: scons u_atomic_test Building the test with autotools is left as a future exercise. Reviewed-by: Matt Turner <[email protected]>