Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sched_getaffinity

Proto:long sched_getaffinity(pid_t pid, struct cpumask *mask)

Type:long

Parameter:

TypeParameterName
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  If Not p Then Go to out_unlock
5537  retval = security_task_getscheduler(p)
5538  If retval Then Go to 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  Return retval
Caller
NameDescribe
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