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

Add functions for busy waiting #354

Closed
PatrickKa opened this issue Mar 14, 2025 · 0 comments · Fixed by #355
Closed

Add functions for busy waiting #354

PatrickKa opened this issue Mar 14, 2025 · 0 comments · Fixed by #355

Comments

@PatrickKa
Copy link
Contributor

Description

If we only want to wait for a very short amount of time, then at some point suspending a thread and thereby performing a context switch, becomes less efficient than busy waiting. I would guess that up to a few or maybe a couple dozen microseconds we should busy wait. This matches with what Prof. Montenegro told me in an E-Mail. They did some measurements with an STM32F4 (I don't know the clock rate they used) and found that switch from a thread to an interrupt and back takes < 6 µs.

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

Successfully merging a pull request may close this issue.

1 participant