Skip to content

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

Merged
mguetschow merged 1 commit intoRIOT-OS:masterfrom
benpicco:sys/chunked_ringbuffer-return_size
Jan 29, 2025
Merged

sys/chunked_ringbuffer: let crb_end_chunk() return size of the chunk#20942
mguetschow merged 1 commit intoRIOT-OS:masterfrom
benpicco:sys/chunked_ringbuffer-return_size

Conversation

@benpicco
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
@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