summaryrefslogtreecommitdiff
path: root/src/util/u_atomic_test.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-04util: fix comment typoGiuseppe Bilotta1-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 <emil.l.velikov@gmail.com>
2015-03-25util/u_atomic: Ignore warnings interlocked accesses.Jose Fonseca1-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 <brianp@vmware.com>
2015-02-13uti/u_atomic: Don't test p_atomic_add with booleans.Jose Fonseca1-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 <sroland@vmware.com>
2015-02-12util/u_atomic: Test p_atomic_add() for 8bit integers.Jose Fonseca1-15/+17
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-02-09util/u_atomic: Add new macro p_atomic_addCarl Worth1-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 <mattst88@gmail.com> Reviewed-by: Aaron Watry <awatry@gmail.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-12-01util/u_atomic: Add a simple test.José Fonseca1-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 <mattst88@gmail.com>