-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Reschedule points are currently undocumented #21111
Comments
As I have noted elsewhere this behavior appears to be inconsistent with the described behavior of cooperative threads which appears to specifically disallow a context switch on a mutex release of a blocked higher-priority thread. The architectural description of cooperative thread behavior must be done before individual API descriptions can be annotated as part of #18970. Removing assignment and priority so this can be discussed in triage tomorrow. |
I think it's fine. "reschedule" doesn't mean "force a context switch". See #20919 (comment) To discuss but I think this issue can be closed as redundant with #18970, unless it turns out we can't define the behavior in terms of standard feature sets, in which case we can address it then. |
API 2020-07-07: Closing as duplicate of #18970 which is the centerpoint of current plans to document API expectations. |
Zephyr has never been good about documenting its schedule points, where a call to z_swap() (via the z_reschedule family of internal utilities) can be made and a new thread can be selected to run. This complicates user analysis, especially in the case of cooperative/non-preemptible threads, and can lead to surprising behavior (see for example #20802, where a priority change due to mutex release is not immediately honored by the scheduler).
We should be rigorous about this and document all the circumstances under which each API can reschedule. For example:
And lots more...
The lack of documentation here is blocking work on existing code, so we really need to get this fixed.
The text was updated successfully, but these errors were encountered: