函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sched_getaffinity

函数原型:long sched_getaffinity(pid_t pid, struct cpumask *mask)

返回类型:long

参数:

类型参数名称
pid_tpid
struct cpumask *mask
5530  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
5532  retval等于负ESRCH
5533  p等于d_process_by_pid - find a process with a matching PID value.*@pid: the pid in question.* The task of @pid, if found. %NULL otherwise.
5534  如果非p则转到:out_unlock
5537  retval等于security_task_getscheduler(p)
5538  如果retval则转到:out_unlock
5541  raw_spin_lock_irqsave( & Protection of the PI data structures: , flags)
5542  pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
5543  raw_spin_unlock_irqrestore( & Protection of the PI data structures: , flags)
5545  out_unlock :
5546  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
5548  返回:retval
调用者
名称描述
SYSCALL_DEFINE3sys_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
COMPAT_SYSCALL_DEFINE3