Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\compat.c Create Date:2022-07-28 11:05:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:COMPAT_SYSCALL_DEFINE3

Proto:COMPAT_SYSCALL_DEFINE3(sched_getaffinity, compat_pid_t, pid, unsigned int, len, compat_ulong_t __user *, user_mask_ptr)

Type:

Parameter:Nothing

214  If len * BITS_PER_BYTE < Setup number of possible processor ids Then Return -EINVAL
216  If len & sizeof(compat_ulong_t) - 1 Then Return -EINVAL
219  If Not alloc_cpumask_var( & mask, GFP_KERNEL) Then Return -ENOMEM
222  ret = sched_getaffinity(pid, mask)
223  If ret == 0 Then
224  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)
226  If compat_put_bitmap(user_mask_ptr, cpumask_bits - get the bits in a cpumask*@maskp: the struct cpumask ** You should only assume nr_cpu_ids bits of this mask are valid. This is* a macro so it's const-correct.(mask), retlen * 8) Then ret = -EFAULT
228  Else ret = retlen
231  free_cpumask_var(mask)
233  Return ret