Searched hist:"8789 a9e7df6bf9b93739c4c7d4e380725bc9e936" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/include/linux/ |
H A D | ring_buffer.h | diff 8789a9e7df6bf9b93739c4c7d4e380725bc9e936 Tue Dec 02 14:34:07 CST 2008 Steven Rostedt <srostedt@redhat.com> ring-buffer: read page interface
Impact: new API to ring buffer
This patch adds a new interface into the ring buffer that allows a page to be read from the ring buffer on a given CPU. For every page read, one must also be given to allow for a "swap" of the pages.
rpage = ring_buffer_alloc_read_page(buffer); if (!rpage) goto err; ret = ring_buffer_read_page(buffer, &rpage, cpu, full); if (!ret) goto empty; process_page(rpage); ring_buffer_free_read_page(rpage);
The caller of these functions must handle any waits that are needed to wait for new data. The ring_buffer_read_page will simply return 0 if there is no data, or if "full" is set and the writer is still on the current page.
Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
|
/openbmc/linux/kernel/trace/ |
H A D | ring_buffer.c | diff 8789a9e7df6bf9b93739c4c7d4e380725bc9e936 Tue Dec 02 14:34:07 CST 2008 Steven Rostedt <srostedt@redhat.com> ring-buffer: read page interface
Impact: new API to ring buffer
This patch adds a new interface into the ring buffer that allows a page to be read from the ring buffer on a given CPU. For every page read, one must also be given to allow for a "swap" of the pages.
rpage = ring_buffer_alloc_read_page(buffer); if (!rpage) goto err; ret = ring_buffer_read_page(buffer, &rpage, cpu, full); if (!ret) goto empty; process_page(rpage); ring_buffer_free_read_page(rpage);
The caller of these functions must handle any waits that are needed to wait for new data. The ring_buffer_read_page will simply return 0 if there is no data, or if "full" is set and the writer is still on the current page.
Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
|