Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\percpu-refcount.c Create Date:2022-07-28 06:24:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__percpu_ref_switch_to_percpu

Proto:static void __percpu_ref_switch_to_percpu(struct percpu_ref *ref)

Type:void

Parameter:

TypeParameterName
struct percpu_ref *ref
196  __percpu * percpu_count = percpu_count_ptr(ref)
199  BUG_ON(!percpu_count)
201  If Not (* The low bit of the pointer indicates whether the ref is in percpu * mode; if set, then get/put will manipulate the atomic_t. & __PERCPU_REF_ATOMIC) Then Return
204  If WARN_ON_ONCE(!allow_reinit) Then Return
207  atomic_long_add(Initially, a percpu refcount is just a set of percpu counters, & count)
215  for_each_possible_cpu(cpu)
216  per_cpu_ptr(percpu_count, cpu) = 0
218  smp_store_release( & * The low bit of the pointer indicates whether the ref is in percpu * mode; if set, then get/put will manipulate the atomic_t., * The low bit of the pointer indicates whether the ref is in percpu * mode; if set, then get/put will manipulate the atomic_t. & ~__PERCPU_REF_ATOMIC)
Caller
NameDescribe
__percpu_ref_switch_mode