Commit Graph

1 Commits

Author SHA1 Message Date
Carlos Chinchilla
64021a8b19 pw_multisink & pw_ring_buffer: Add Peek APIs
pw_multisink: Add PeekEntry, PopEntry, and CommitEntry APIs.
pw_ring_buffer: Add PeekFrontPreamble to allow a reader peak the user
preamble without the need to copy data. This lets the multisink commit
multiple entries, peeking one at a time to check if it should be popped
without having to get the entry's data.

Change-Id: I2304af3d149c10942e61f2ca65400acfeda978ca
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/56246
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Carlos Chinchilla <cachinchilla@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
2021-09-02 01:28:49 +00:00