函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\cpupri.c Create Date:2022-07-27 10:42:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pupri_set - update the CPU priority setting*@cp: The cpupri context*@cpu: The target CPU*@newpri: The priority (INVALID-RT99) to assign to this CPU* Note: Assumes cpu_rq(cpu)->lock is locked* Returns: (void)

函数原型:void cpupri_set(struct cpupri *cp, int cpu, int newpri)

返回类型:void

参数:

类型参数名称
struct cpupri *cp
intcpu
intnewpri
133  currpri等于cpu_to_pri[cpu]
134  oldpri等于currpri
135  do_mb等于0
137  newpri等于Convert between a 140 based task->prio, and our 102 based cpupri
139  BUG_ON(newpri >= SPDX-License-Identifier: GPL-2.0 )
141  如果newpri恒等于oldpri则返回
150  如果此条件成立可能性大(为编译器优化)(newpri != CPUPRI_INVALID)则
151  vec等于pri_to_cpu[newpri]
153  设置CPU信息
159  smp_mb__before_atomic()
160  atomic_inc( & count)
161  do_mb等于1
163  如果此条件成立可能性大(为编译器优化)(oldpri != CPUPRI_INVALID)则
164  vec等于pri_to_cpu[oldpri]
178  如果do_mbsmp_mb__after_atomic()
185  atomic_dec( & count)
186  smp_mb__after_atomic()
187  清空CPU信息
190  currpri等于newpri