Function report |
Source Code:lib\percpu_counter.c |
Create Date:2022-07-28 07:10:56 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This function is both preempt and irq safe. The former is due to explicit* preemption disable. The latter is guaranteed by the fact that the slow path* is explicitly protected by an irq-safe spinlock whereas the fast patch uses
Proto:void percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount, s32 batch)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct percpu_counter * | fbc | |
s64 | amount | |
s32 | batch |
87 | count = Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.( * counters) + amount |
90 | raw_spin_lock_irqsave( & lock, flags) |
92 | __this_cpu_sub( * counters, count - amount) |
93 | raw_spin_unlock_irqrestore( & lock, flags) |
94 | Else |
95 | this_cpu_add( * counters, amount) |
97 | preempt_enable() |
Name | Describe |
---|---|
__fprop_inc_percpu | Event of type pl happened |
__fprop_inc_percpu_max | Like __fprop_inc_percpu() except that event is counted only if the given* type has fraction smaller than @max_frac/FPROP_FRAC_BASE |
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 |