函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-27 10:37:28
Last Modify:2022-05-22 13:40:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, unsigned long __user *, user_mask_ptr)

返回类型:

参数:

5566  如果lenBITS_PER_BYTE小于nr_cpu_ids则返回:负EINVAL
5568  如果len按位与sizeof(unsignedlong)减1则返回:负EINVAL
5571  如果非分配CPU掩码则返回:负ENOMEM
5574  ret等于sched_getaffinity(pid, mask)
5575  如果ret恒等于0则
5576  retlen等于两数取小(len, CPU信息的大小)
5578  如果copy_to_user(user_mask_ptr, mask, retlen)则ret等于负EFAULT
5580  否则ret等于retlen
5583  释放CPU掩码
5585  返回:ret