This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
Proposal: Support reading from multiple RTT channels #265
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.
My application requires fast responses to certain interrupts, so I need to minimize the amount of time that interrupts are disabled. To this end I created an RTT logger which allocates a separate Up channel for each execution thread priority so each thread can write in a lock-free manner. The channels >0 are left in nonblocking mode and I rely on the rzcobs framing to recover from buffer overruns. This method works very well to transmit a large amount of tracing data using a fast probe. probe-run is modified to read from all available Up channels, so it continues working with single-channel uses as normal.
This PR currently includes all the changes from my branch. I wanted to first open this as a discussion to see if there's interest in supporting this before putting the time in to clean it up for merging.
Things to consider: