Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer_benchmark.c Create Date:2022-07-28 11:56:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ring_buffer_consumer

Proto:static void ring_buffer_consumer(void)

Type:void

Parameter:Nothing

185  read_events ^= 1
187  read = 0
192  When Not READ_ONCE(reader_finish) cycle
193  found = 1
195  When found && Not test_error cycle
198  found = 0
202  If read_events Then stat = read_event(cpu)
204  Else stat = read_page(cpu)
207  If test_error Then Break
210  If stat == EVENT_FOUND Then found = 1
219  set_current_state(TASK_INTERRUPTIBLE)
220  If reader_finish Then Break
223  schedule()
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;* (Used in tsk->state: )
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.
Caller
NameDescribe
ring_buffer_consumer_thread