[ion] do not increment volatile variable in isr_systick

In 2019 a proposal was approved which is deprecating this and other
harmful usage of volatile in C++ in 2020. See web links at the end.

Note that this did not at all change the GCC-generated machine code.

Deprecating volatile (adopted in 2019 for C++20):
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1152r0.html
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1152r4.html

Related, but less relevant:

volatile_load<T> and volatile_store<T>:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1382r1.pdf

Deprecating volatile: library:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1831r0.html
This commit is contained in:
Neven Sajko
2020-02-27 23:39:52 +00:00
committed by EmilieNumworks
parent 1c9b402645
commit bc7d598517

View File

@@ -119,5 +119,7 @@ void __attribute__((noinline)) start() {
}
void __attribute__((interrupt, noinline)) isr_systick() {
Ion::Device::Timing::MillisElapsed++;
auto t = Ion::Device::Timing::MillisElapsed;
t++;
Ion::Device::Timing::MillisElapsed = t;
}