Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer.c Create Date:2022-07-28 11:54:43
Last Modify:2020-03-17 19:30:04 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:g_buffer_write - write data to the buffer without reserving*@buffer: The ring buffer to write to

Proto:int ring_buffer_write(struct ring_buffer *buffer, unsigned long length, void *data)

Type:int

Parameter:

TypeParameterName
struct ring_buffer *buffer
unsigned longlength
void *data
3123  ret = -EBUSY
3126  preempt_disable_notrace()
3128  If atomic_read( & record_disabled) Then Go to out
3131  cpu = These macros fold the SMP functionality into a single CPU system()
3133  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 Go to out
3136  cpu_buffer = buffers[cpu]
3138  If atomic_read( & record_disabled) Then Go to out
3141  If length > Max payload is BUF_PAGE_SIZE - header (8bytes) Then Go to out
3144  If Value for the false possibility is greater at compile time(The lock and unlock are done within a preempt disable section) Then Go to out
3147  event = rb_reserve_next_event(buffer, cpu_buffer, length)
3148  If Not event Then Go to out_unlock
3151  body = line for ring buffer fast paths
3153  No 3D Now!(body, data, length)
3155  rb_commit(cpu_buffer, event)
3157  rb_wakeups(buffer, cpu_buffer)
3159  ret = 0
3161  out_unlock :
3162  trace_recursive_unlock(cpu_buffer)
3164  out :
3165  preempt_enable_notrace()
3167  Return ret
Caller
NameDescribe
__buffer_unlock_commit