Skip to content

Ring buffer implementation ported from OSCL#29

Open
mnmoron wants to merge 4 commits intojohnttaylor:masterfrom
mnmoron:master
Open

Ring buffer implementation ported from OSCL#29
mnmoron wants to merge 4 commits intojohnttaylor:masterfrom
mnmoron:master

Conversation

@mnmoron
Copy link
Copy Markdown

@mnmoron mnmoron commented Feb 3, 2023

Add a ring buffer implementation that was simplified-modified-and ported from OSCL.

@mnmoron
Copy link
Copy Markdown
Author

mnmoron commented Feb 4, 2023

@johnttaylor The "Run Windows build script" CI has been "executing" for 22 hours now.

@johnttaylor
Copy link
Copy Markdown
Owner

@mnmoron the build machine is not in the running state. Not sure why Github has not figured out the build failed :(. That said - you need to add unit test for new Ring buffer (in the _0test/) directory. In theory when you push your changes for the unit tests - it should trigger a new build

Comment thread src/Cpl/Container/Ring.h Outdated
Comment thread src/Cpl/Container/Ring.h
released and are ready to be recognized as such by
the transmitting end of the ring.
*/
void commitAll() noexcept;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does RxDesc have commitAll() and TxDesc does not?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was driven by a need in a particular situation where the receiver (a framer) needed to read a number of items ahead before deciding to commit() or rewind ( resetAllocationOffset() ).
This operation is an optimization making use of the RxDesc internal knowledge rather than calling commit() n-times in a loop.
There has not been any particular situation where a similar mechanism was needed by a TxDesc client.

Comment thread src/Cpl/Container/Ring.h
@mnmoron
Copy link
Copy Markdown
Author

mnmoron commented Feb 5, 2023

That said - you need to add unit test for new Ring buffer (in the _0test/) directory.

Will that work if I move the Ring code to Cpl/Container/Ring ? Or will I need a whole new test application rather than adding an additional test to Cpl/Container/_0test?

@johnttaylor
Copy link
Copy Markdown
Owner

@mnmoron Solved the mystery on why the build does not work...
References service endpoint. PRs from repository forks are not allowed to access secrets in the pipeline. For more information see https://go.microsoft.com/fwlink/?linkid=862029

Not sure how to fix this. That is problem for later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants