Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pupri_init - initialize the cpupri structure*@cp: The cpupri context* Return: -ENOMEM on memory allocation failure.

Proto:int cpupri_init(struct cpupri *cp)

Type:int

Parameter:

TypeParameterName
struct cpupri *cp
203  When i < SPDX-License-Identifier: GPL-2.0 cycle
204  vec = pri_to_cpu[i]
206  atomic_set( & count, 0)
207  If Not zalloc_cpumask_var( & mask, GFP_KERNEL) Then Go to cleanup
211  cpu_to_pri = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
212  If Not cpu_to_pri Then Go to cleanup
215  for_each_possible_cpu(i)
216  cpu_to_pri[i] = CPUPRI_INVALID
218  Return 0
220  cleanup :
221  When i >= 0 cycle free_cpumask_var(mask)
223  Return -ENOMEM
Caller
NameDescribe
init_rootdomain