-
Notifications
You must be signed in to change notification settings - Fork 24
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
disable interrupts for global mutex #488
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks to me like an important change. Is there a reason this a draft PR? I’ve made one small suggestion, but otherwise, I think we should merge this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me also.
…ltithreaded-critical-section
Co-authored-by: Edward A. Lee <[email protected]>
We need to make disable/enable ISR part of the platform API for threaded applications also. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's merge this when the tests passs.
Possible fix for #393
Untested; to make sure this is viable, would need to demonstrate that (1) deadlocks actually occur without this fix, (2) this solves the deadlocks, and (3) there are no forseeable adverse affects from this additional logic.
On most platforms, disabling/enabling interrupts is a no-op, so there should be no performance impact on these platforms.
The main problem with this approach is I don't think it works with enclaves; I remember considering whether interrupts should be disabled for other environments besides the global environment (but it's been a while since I originally wrote this and I've forgotten why I didn't).