-
Notifications
You must be signed in to change notification settings - Fork 214
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
Prevent modifying INT_ENA (and other shared registers) in a way allowing race-conditions #1874
Comments
Ideally the atomicity should be achieved with a more granular construct than
What should be used instead is some kind of mutex construct that works the same way as critical section but instead of using a global flag, is uses a non-global flag instead. A flag per mutex. Or a flag per register to protect. This way both both cores can lock two separate/unrelated mutexes without having to unnecessarily wait for one another. Going even a step further it'd be even more ideal if the locking mechanism were left to the user to deal with by providing a |
Sure - |
The current precedent is to use |
Some drivers allow "splitting" the resource into parts (e.g. SYSTIMER/TIMGs - probably more).
Those parts usually allow modifying shared registers in some way but we need to make sure to atomically modify them (e.g. modifying it in a critical-section)
The text was updated successfully, but these errors were encountered: