Function report |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-28 11:53:10 |
| Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:g_buffer_wait - wait for input to the ring buffer*@buffer: buffer to wait on*@cpu: the cpu buffer to wait on*@full: wait until a full page is available, if @cpu != RING_BUFFER_ALL_CPUS* If @cpu == RING_BUFFER_ALL_CPUS then the task will wake up as soon
Proto:int ring_buffer_wait(struct ring_buffer *buffer, int cpu, int full)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct ring_buffer * | buffer | |
| int | cpu | |
| int | full |
| 578 | cpu_buffer = cpu_buffer |
| 579 | DEFINE_WAIT(wait) |
| 581 | ret = 0 |
| 588 | If cpu == RING_BUFFER_ALL_CPUS Then |
| 592 | Else |
| 593 | If Not pumask_test_cpu - test for a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@cpumask: the cpumask pointer* Returns 1 if @cpu is set in @cpumask, else returns 0 Then Return -ENODEV |
| 595 | cpu_buffer = buffers[cpu] |
| 600 | When (true) cycle |
| 626 | If full Then full_waiters_pending = true |
| 628 | Else waiters_pending = true |
| 631 | If signal_pending(current process) Then |
| 636 | If cpu == RING_BUFFER_ALL_CPUS && Not d_buffer_empty - is the ring buffer empty?*@buffer: The ring buffer to test Then Break |
| 646 | If Not full Then Break |
| 649 | raw_spin_lock_irqsave( & serialize readers , flags) |
| 650 | pagebusy = reader_page == committed pages |
| 653 | If Not shortest_full || shortest_full < full Then shortest_full = full |
| 656 | raw_spin_unlock_irqrestore( & serialize readers , flags) |
| 662 | schedule() |
| 670 | Return ret |
| Name | Describe |
|---|---|
| wait_on_pipe |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |