Newlib local patch: Add weak symbols for locking functions #13
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.
Hi Max,
I don't know how you'll feel about this patch, but I thought I'd ask. It lets me produce a thread safe newlib that I can link with FreeRTOS' locking primitives for esp-open-rtos.
There might be a better way to do this that I don't know of. Most of the people using FreeRTOS with newlib seem to just modify it directly and compile a FreeRTOS-specific libc, but I figured that was a last resort.
Cheers,
Angus
This allows a lock implementation to be optionally added at link time.
Small performance hit if using single threaded, in that locks are now a
call to a no-op dummy function rather than a compiled in no-op.