| Function report | 
| 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 activity | Download SCCT | Chinese | 
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 | 
| 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 | 
| 5583 | free_cpumask_var(mask) | 
| 5585 | Return ret | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |