函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\percpu-refcount.c Create Date:2022-07-27 07:22:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__percpu_ref_switch_to_percpu

函数原型:static void __percpu_ref_switch_to_percpu(struct percpu_ref *ref)

返回类型:void

参数:

类型参数名称
struct percpu_ref *ref
196  __percpupercpu_count等于percpu_count_ptr(ref)
199  BUG_ON(!percpu_count)
201  如果非* 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的值则返回
204  如果WARN_ON_ONCE(!allow_reinit)则返回
207  atomic_long_add(Initially, a percpu refcount is just a set of percpu counters, & count)
215  遍历可用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)
调用者
名称描述
__percpu_ref_switch_mode