Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\cpupri.c Create Date:2022-07-28 09:41:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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)

Proto:void cpupri_set(struct cpupri *cp, int cpu, int newpri)

Type:void

Parameter:

TypeParameterName
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  If newpri == oldpri Then Return
150  If Value is more likely to compile time(newpri != CPUPRI_INVALID) Then
151  vec = pri_to_cpu[newpri]
153  pumask_set_cpu - set a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@dstp: the cpumask pointer
159  smp_mb__before_atomic()
160  atomic_inc( & count)
161  do_mb = 1
163  If Value is more likely to compile time(oldpri != CPUPRI_INVALID) Then
164  vec = pri_to_cpu[oldpri]
178  If do_mb Then smp_mb__after_atomic()
185  atomic_dec( & count)
186  smp_mb__after_atomic()
187  pumask_clear_cpu - clear a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@dstp: the cpumask pointer
190  currpri = newpri