mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[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:
committed by
EmilieNumworks
parent
1c9b402645
commit
bc7d598517
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user