函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ring_buffer_benchmark_init

函数原型:static int __init ring_buffer_benchmark_init(void)

返回类型:int

参数:

435  buffer等于Because the ring buffer is generic, if other users of the ring buffer get* traced by ftrace, it can produce lockdep warnings. We need to keep each* ring buffer's lock class separate.(1000000, RB_FL_OVERWRITE)
436  如果非buffer则返回:负ENOMEM
439  如果非disable_reader
440  consumer等于kthread_create - create a kthread on the current node*@threadfn: the function to run in the thread*@data: data pointer for @threadfn()*@namefmt: printf-style format string for the thread name*@arg(ring_buffer_consumer_thread, NULL, "rb_consumer")
442  ret等于错误
443  如果是错误则转到:out_fail
447  producer等于kthread_run - create and wake a thread.*@threadfn: the function to run until signal_pending(current).*@data: data ptr for @threadfn.*@namefmt: printf-style name for the thread.* Description: Convenient wrapper for kthread_create() followed by(ring_buffer_producer_thread, NULL, "rb_producer")
449  ret等于错误
451  如果是错误则转到:out_kill
457  如果非disable_reader
458  如果consumer_fifo大于等于0则
463  否则set_user_nice(consumer, consumer_nice)
467  如果producer_fifo大于等于0则
468  struct sched_param param = {sched_priority = producer_fifo}
471  sched_setscheduler - change the scheduling policy and/or RT priority of a thread.*@p: the task in question.*@policy: new policy.*@param: structure containing the new RT priority.* Return: 0 on success. An error code otherwise.
472  否则set_user_nice(producer, producer_nice)
475  返回:0
477  out_kill :
478  如果consumer结束线程的运行
481  out_fail :
482  g_buffer_free - free a ring buffer.*@buffer: the buffer to free.
483  返回:ret