Function report |
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 activity | Download SCCT | Chinese |
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:
| Type | Parameter | Name |
|---|---|---|
| struct ring_buffer * | buffer | |
| unsigned long | length | |
| void * | data |
| 3126 | preempt_disable_notrace() |
| 3128 | If atomic_read( & record_disabled) Then Go to out |
| 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 |
| 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 : |
| 3164 | out : |
| 3165 | preempt_enable_notrace() |
| 3167 | Return ret |
| Name | Describe |
|---|---|
| __buffer_unlock_commit |
| 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 |