Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sys_sched_getaffinity - get the CPU affinity of a process*@pid: pid of the process*@len: length in bytes of the bitmask pointed to by user_mask_ptr*@user_mask_ptr: user-space pointer to hold the current CPU mask

Proto:SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, unsigned long __user *, user_mask_ptr)

Type:

Parameter:Nothing

5566  If len * BITS_PER_BYTE < nr_cpu_ids Then Return -EINVAL
5568  If len & sizeof(unsignedlong) - 1 Then Return -EINVAL
5571  If Not alloc_cpumask_var( & mask, GFP_KERNEL) Then Return -ENOMEM
5574  ret = sched_getaffinity(pid, mask)
5575  If ret == 0 Then
5576  retlen = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(len, pumask_size - size to allocate for a 'struct cpumask' in bytes)
5578  If copy_to_user(user_mask_ptr, mask, retlen) Then ret = -EFAULT
5580  Else ret = retlen
5583  free_cpumask_var(mask)
5585  Return ret