-
Notifications
You must be signed in to change notification settings - Fork 1
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
newlib threadsafe: Control allocation through thread flag #10
base: pr/newlib_thread_safe
Are you sure you want to change the base?
newlib threadsafe: Control allocation through thread flag #10
Conversation
Example output, note that the stack usage on the idle thread has not increased because it uses the global reent struct (
|
Looks good. I'm just wondering if |
I'm not sure either. I am also not sure which reent will be used from interrupt context, I assume it will be whatever thread was active when the interrupt happened. |
I have tested this very little, just wrote it to prove to myself that it would work like this. The documentation on the internals of newlib are pretty scarce. |
d05c147
to
3d2318d
Compare
2a31cbf
to
8b43d5b
Compare
Example proof of concept for introducing a thread flag for allocating a thread local reentrancy struct.
See tests/thread_msg for an example printout of thread local vs. global reent pointers.
Threads
main
andnr3
have thread local reents, threadsnr1
,nr2
use the global reent struct.