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

Should interrupts be enabled when the scheduler yields? #56

Open
rmn30 opened this issue Apr 14, 2023 · 2 comments
Open

Should interrupts be enabled when the scheduler yields? #56

rmn30 opened this issue Apr 14, 2023 · 2 comments

Comments

@rmn30
Copy link
Collaborator

rmn30 commented Apr 14, 2023

As of the merge of #44 e24f37f disabled interrupts when yielding in the scheduler.
It's not clear whether the comment on yield_interrupt_enabled which describes the need for enabling interrupts still applies.
A simple test of a thread calling thread_sleep with interrupts disabled worked as expected: the thread was suspended, yielded and the idle thread was scheduled allowing timer interrupts to be received.

We should think about this and, at the very least, fix the comment.

@rmn30
Copy link
Collaborator Author

rmn30 commented Jun 3, 2024

I still don't understand the comment and it is now even more confusing as the function does not enable interrupts. If you think it's fine as is we should rename the function to just yield and remove the comment.

@rmn30 rmn30 reopened this Jun 3, 2024
@davidchisnall
Copy link
Collaborator

I think the comment is wrong and we should rename the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants