函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer_benchmark.c Create Date:2022-07-27 13:01:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ring_buffer_consumer

函数原型:static void ring_buffer_consumer(void)

返回类型:void

参数:

185  read_events异或等于1
187  read等于0
192  当非READ_ONCE(reader_finish)循环
193  found等于1
195 found且非test_error循环
198  found等于0
202  如果read_eventsstat等于read_event(cpu)
204  否则stat等于read_page(cpu)
207  如果test_error退出
210  如果stat恒等于EVENT_FOUNDfound等于1
219  set_current_state(睡眠态)
220  如果reader_finish退出
223  进程调度
225  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (就绪态)
226  reader_finish等于0
227  mplete: - signals a single thread waiting on this completion*@x: holds the state of this particular completion* This will wake up a single thread waiting on this completion. Threads will be* awakened in the same order in which they were queued.
调用者
名称描述
ring_buffer_consumer_thread