newlib threadsafe: Control allocation through thread flag#10
Open
jnohlgard wants to merge 5 commits intoOTAkeys:pr/newlib_thread_safefrom
Open
newlib threadsafe: Control allocation through thread flag#10jnohlgard wants to merge 5 commits intoOTAkeys:pr/newlib_thread_safefrom
jnohlgard wants to merge 5 commits intoOTAkeys:pr/newlib_thread_safefrom
Conversation
Author
|
Example output, note that the stack usage on the idle thread has not increased because it uses the global reent struct ( |
Member
|
Looks good. I'm just wondering if |
Author
|
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. |
Author
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mainandnr3have thread local reents, threadsnr1,nr2use the global reent struct.