-
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
doc: kernel: document general policy for Zephyr without threads #29338
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 like a good starting point. I don't miss anything in here, and my comments are mostly nits.
|
||
* Non-sleeping delays e.g. :c:func:`k_busy_wait` | ||
|
||
* The system clock including :c:func:`k_uptime_get` |
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.
I think it would be worthwhile mentioning SYS_CLOCK_EXISTS
here, because when no MT is often combined with no system clock
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.
OK, I'll have to look at that. Looks like SYS_CLOCK_EXISTS=n
means nothing related to ticks is supported, including k_uptime_get()
. So the only way to detect passage of time is k_cycle_get_32()
.
I guess this one goes too. The value of this feature to me is diminishing rapidly....
* Applications that select :option:`CONFIG_UART_INTERRUPT_DRIVEN` may | ||
work, depending on driver implementation. | ||
|
||
* Applications that select :option:`CONFIG_UART_ASYNC_API` may |
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.
I am not sure about this one. I always thought this actually required at least k_timer
:
https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/serial/uart_nrfx_uarte.c#L830
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.
That's unfortunate. I wouldn't expect other SoC's to have that problem. I suppose we don't support that API, then.
@nashif @andyross @andrewboie this addresses the documentation of the scope of |
b193945
to
2474ec2
Compare
I've tweaked the text a little, and added more structure. I've also explicitly noted the requirement that Note that all this is preliminary, intended to capture high level requirements before reviewing the code to determine what can actually be supported based on existing use and target-specific capabilities. |
2474ec2
to
75ac020
Compare
Subsystem Behavior Without Thread Support | ||
***************************************** | ||
|
||
The seconds below list driver and functional subsystems that are |
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.
The seconds below?
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.
s/seconds/sections/
Functionality that will not work with :option:`CONFIG_MULTITHREADING` | ||
includes but is not limited to: | ||
|
||
* :c:func:`k_sleep()` and any other API that causes a thread to |
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.
We should consider being explicit here, just like we are explicit above.
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.
Better would be to make progress on #18970 so we can just say "Any api that sleeps except if using the no-wait path".
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.
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.
I'm not sure if the direction given was to list all API that meets the "sleeps" criteria (which I can't do until #18970 progresses to the point where we've identified that API), or to just refine the text to match what I said. So I did the latter.
75ac020
to
f4ac592
Compare
This provides the documentation of scope required as a stage towards removing deprecation for CONFIG_MULTITHREADING=n. The specific lists of what does work will follow as the code base is inspected and updated. Signed-off-by: Peter Bigot <[email protected]>
f4ac592
to
43b8b9e
Compare
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
@pabigot if you are ok with that I would like to pick up this work and reopen PR as i would like to de-deprecate no multithreading support. |
@nordic-krch it's yours. |
This provides the documentation of scope required as a stage towards removing deprecation for CONFIG_MULTITHREADING=n. The specific lists of what does work will follow as the code base is inspected and updated.
Addresses a gating item in #27415.