8000 sys/chunked_ringbuffer: let `crb_end_chunk()` return size of the chunk by benpicco · Pull Request #20942 · RIOT-OS/RIOT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sys/chunked_ringbuffer: let crb_end_chunk() return size of the chunk #20942

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

8000
Merged

Conversation

benpicco
Copy link
Contributor

Contribution description

It can be handy to know the size of the chunk that we just stored. Since we already have that information, it's very cheap to return that instead of true.

Testing procedure

Technically an API change, but now we already returned 0 in the error case and 1 on success, so changing bool -> int won't need any code changes.

Issues/PRs references

@github-actions github-actions bot added the Area: sys Area: System label Oct 28, 2024
@benpicco benpicco changed the title sys/chunked_ringbuffer: let crb_end_chunk() return size of the chunk sys/chunked_ringbuffer: let crb_end_chunk() return size of the chunk Oct 28, 2024
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 28, 2024
@riot-ci
Copy link
riot-ci commented Oct 28, 2024

Murdock results

✔️ PASSED

3429621 sys/chunked_ringbuffer: let crb_end_chunk() return size of the chunk

Success Failures Total Runtime
10271 0 10271 12m:36s

Artifacts

Copy link
Contributor
@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

@mguetschow
Copy link
Contributor

Oh, but there's a merge conflict, would you mind rebasing @benpicco ?

@benpicco benpicco force-pushed the sys/chunked_ringbuffer-return_size branch from 1b4e1af to 3429621 Compare January 29, 2025 10:54
@mguetschow mguetschow added this pull request to the merge queue Jan 29, 2025
Merged via the queue into RIOT-OS:master with commit d3676ca Jan 29, 2025
25 checks passed
@benpicco benpicco deleted the sys/chunked_ringbuffer-return_size branch January 29, 2025 15:20
@mguetschow mguetschow added this to the Release 2025.04 milestone Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0