Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sberkun
Copy link
Collaborator

@sberkun sberkun commented Oct 7, 2024

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).

Copy link
Contributor

@edwardalee edwardalee left a 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.

core/threaded/reactor_threaded.c Show resolved Hide resolved
Copy link
Collaborator

@erlingrj erlingrj left a 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.

@erlingrj erlingrj marked this pull request as ready for review October 28, 2024 01:50
@erlingrj erlingrj added enhancement Enhancement of existing feature platform labels Oct 28, 2024
@erlingrj
Copy link
Collaborator

We need to make disable/enable ISR part of the platform API for threaded applications also.

Copy link
Contributor

@edwardalee edwardalee left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing feature platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants