-
-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Add option to disable non-lock-free atomics #1022
Comments
I'll take a look at that. |
Any macro to disable non-lock-free atomics will not work for
|
There was a property added to |
I checked the STL from gcc and MSVC: https://gcc.gnu.org/onlinedocs/gcc-8.4.0/gcc/_005f_005fatomic-Builtins.html
Is there any reason that etl don't use built-ins for large data types? Can we just use those built-ins? So the user can be notified by a linker error and no unexpected behavior will happen. |
I'm adding a |
Do you mean this? |
Yes |
This somehow relates to my previous feature request: #880 |
Creating a generic, non-OS, ETL mutex would need to be implemented GCC/Clang atomic builtins. |
Hi,
In etl's atomic, when the data can't be accessed with compiler's lock-free statements, a spin lock is used.
But when trying to access those atomics from ISR, the spin lock can deadlock.
Here's an example:
LEDBlink.cpp
The "store" instruction in ISR will wait for "load" in main to release the lock. However since we are in ISR, the lock is never released.
The text was updated successfully, but these errors were encountered: