Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-28 09:36:35
Last Modify:2022-05-22 13:40:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Mimics kernel/events/core.c perf_copy_attr().

Proto:static int sched_copy_attr(struct sched_attr __user *uattr, struct sched_attr *attr)

Type:int

Parameter:

TypeParameterName
struct sched_attr __user *uattr
struct sched_attr *attr
5134  memset(attr, 0, size of attr )
5136  ret = Get a simple variable from user space(size, & size)
5137  If ret Then Return ret
5141  If Not size Then size = sizeof first published struct
5143  If size < sizeof first published struct || size > PAGE_SIZE Then Go to err_size
5146  ret = py_struct_from_user: copy a struct from userspace*@dst: Destination address, in kernel space
5147  If ret Then
5148  If ret == -E2BIG Then Go to err_size
5150  Return ret
5153  If sched_flags & SCHED_FLAG_UTIL_CLAMP && size < add: util_{min,max} Then Return -EINVAL
5161  SCHED_NORMAL, SCHED_BATCH = clamp - return a value clamped to a given range with strict typechecking*@val: current value*@lo: lowest allowable value*@hi: highest allowable value* This macro does strict typechecking of @lo/@hi to make sure they are of the* same type as @val(SCHED_NORMAL, SCHED_BATCH , MIN_NICE, MAX_NICE)
5163  Return 0
5165  err_size :
5166  Write a simple value into user space( size of attr , & size)
5167  Return -E2BIG
Caller
NameDescribe
SYSCALL_DEFINE3sys_sched_setattr - same as above, but with extended sched_attr*@pid: the pid in question.*@uattr: structure containing the extended parameters.*@flags: for future extension.