Commit 0568c6e
ring-buffer: Check for empty ring-buffer with rb_num_of_entries()
Currently there are two ways of identifying an empty ring-buffer. One
relying on the current status of the commit / reader page
(rb_per_cpu_empty()) and the other on the write and read counters
(rb_num_of_entries() used in rb_get_reader_page()).
with rb_num_of_entries(). This intends to ease later
introduction of ring-buffer writers which are out of the kernel control
and with whom, the only information available is through the meta-page
counters.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Vincent Donnefort <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent 5bc55a3 commit 0568c6e
1 file changed
+14
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4682 | 4682 | | |
4683 | 4683 | | |
4684 | 4684 | | |
4685 | | - | |
| 4685 | + | |
| 4686 | + | |
| 4687 | + | |
| 4688 | + | |
| 4689 | + | |
| 4690 | + | |
| 4691 | + | |
| 4692 | + | |
4686 | 4693 | | |
4687 | | - | |
4688 | | - | |
4689 | | - | |
4690 | | - | |
4691 | | - | |
4692 | | - | |
4693 | | - | |
4694 | | - | |
4695 | | - | |
4696 | | - | |
4697 | | - | |
4698 | | - | |
4699 | | - | |
4700 | | - | |
4701 | | - | |
4702 | | - | |
4703 | | - | |
4704 | | - | |
4705 | | - | |
4706 | | - | |
4707 | | - | |
4708 | | - | |
4709 | | - | |
4710 | | - | |
4711 | | - | |
| 4694 | + | |
| 4695 | + | |
| 4696 | + | |
4712 | 4697 | | |
4713 | | - | |
4714 | | - | |
4715 | | - | |
4716 | | - | |
4717 | | - | |
4718 | | - | |
| 4698 | + | |
| 4699 | + | |
| 4700 | + | |
4719 | 4701 | | |
4720 | 4702 | | |
4721 | 4703 | | |
| |||
4861 | 4843 | | |
4862 | 4844 | | |
4863 | 4845 | | |
4864 | | - | |
4865 | | - | |
4866 | | - | |
4867 | | - | |
4868 | | - | |
4869 | | - | |
4870 | | - | |
4871 | | - | |
4872 | | - | |
4873 | | - | |
4874 | | - | |
4875 | | - | |
4876 | | - | |
4877 | 4846 | | |
4878 | 4847 | | |
4879 | 4848 | | |
| |||
0 commit comments