Gunar Schorcht
|
cfb2ef7de2
|
tests/bitalgorithm_timings: fix compilation with NDEBUG
|
2021-12-12 13:18:46 +01:00 |
|
Jan Romann
|
4384795cb9
|
treewide: Remove excessive newlines
|
2021-08-13 19:50:38 +02:00 |
|
|
1c0560a205
|
tests/bitarithm_timings: add limits.h include
|
2020-11-23 16:56:34 +01:00 |
|
Bas Stottelaar
|
6deaf39e5d
|
tests/*: add missing include of assert.h
|
2020-10-22 11:13:09 +02:00 |
|
Benjamin Valentin
|
74bbb87f78
|
tests/bitarithm_timings: add bitarithm_test_and_clear() to the test
|
2020-07-21 16:03:59 +02:00 |
|
Marian Buschsieweke
|
8854255d7a
|
tests/bitarithm_timings: Fix use of volatile
The tests used the volatile qualifier for two this:
1. Prevent the compiler to optimize out calls to the inline-able functions
bitarithm_msb, bitarithm_lsb, bitarithm_bits_set
2. Communication between IRQ context and thread context
While the first use is valid, the second is dangerous, see [1], [2], [3], [4].
This commit replaces the second use with C11 atomics, which were explicitly
added to the C standard to address this use case.
[1]: https://www.kernel.org/doc/html/latest/process/volatile-considered-harmful.html
[2]: http://c.isvolatileusefulwiththreads.com/
[3]: https://web.archive.org/web/20181124154026/http://software.intel.com/en-us/blogs/2007/11/30/volatile-almost-useless-for-multi-threaded-programming/
[4]: https://blog.regehr.org/archives/28
|
2019-11-15 09:22:18 +01:00 |
|
Marian Buschsieweke
|
a1be610c9d
|
tests/bitarithm_timings: Fixed hang
Prevent bitarithm_lsb() from being called with 0, as it loops forever then
|
2019-11-15 09:21:24 +01:00 |
|
Oleg Hahm
|
4f4214235b
|
timex: unambiguous time conversion macros
|
2017-01-19 13:18:08 +01:00 |
|
|
14cbec41bb
|
tests: bitarithm_timings: convert to xtimer
|
2015-09-16 10:58:53 +02:00 |
|
Joakim Gebart
|
c3b8114cbc
|
tests/bitarithm_timings: Fix warning about integer overflow on msp430
|
2015-07-14 08:11:19 +02:00 |
|
Ludwig Ortmann
|
d667c4964a
|
tests: fix cppcheck findings
- bitarithm_timings: use more void, decrease range
- struct_tm_utility: add cppcheck-suppress invalidscanf
|
2014-08-05 17:54:19 +02:00 |
|
René Kijewski
|
d46c7e00d4
|
tests: remove test_ prefix
Closes #1485.
|
2014-07-31 07:34:11 +02:00 |
|