ring_buffer: make finish methods final
Make it possible to "finish" with fewer bytes than what was "claimed". This was possible before on the get side, but the put side was cummulative wrt finish. The revamp made it cummulative on both sides. Turns out that existing users rely on the opposite behavior which is more logical and useful. So make both sides that way. Adjust documentation, test case and users accordingly. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
parent
d9a74dda54
commit
eee5b8e563
5 changed files with 16 additions and 18 deletions
|
@ -62,6 +62,7 @@ static void rng_pool_work_handler(struct k_work *work)
|
|||
ring_buf_put_finish(&rnd_rbuf, len);
|
||||
return;
|
||||
}
|
||||
ring_buf_put_finish(&rnd_rbuf, 0);
|
||||
}
|
||||
|
||||
k_work_submit(work);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue