Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kcmp_epoll_target

Proto:static int kcmp_epoll_target(struct task_struct *task1, struct task_struct *task2, unsigned long idx1, struct kcmp_epoll_slot __user *uslot)

Type:int

Parameter:

TypeParameterName
struct task_struct *task1
struct task_struct *task2
unsigned longidx1
struct kcmp_epoll_slot __user *uslot
112  If copy_from_user( & slot, uslot, size of slot ) Then Return -EFAULT
115  filp = The caller must have pinned the task
116  If Not filp Then Return -EBADF
119  files = get_files_struct(task2)
120  If Not files Then Return -EBADF
123  spin_lock( & written part on a separate cache line in SMP)
124  filp_epoll = fcheck_files(files, poll file descriptor )
125  If filp_epoll Then get_file(filp_epoll)
127  Else filp_tgt = ERR_PTR( - EBADF)
129  spin_unlock( & written part on a separate cache line in SMP)
130  put_files_struct(files)
132  If filp_epoll Then
133  filp_tgt = get_epoll_tfile_raw_ptr(filp_epoll, arget file number , arget offset within same numbered sequence )
134  fput(filp_epoll)
137  If IS_ERR(filp_tgt) Then Return PTR_ERR(filp_tgt)
140  Return 0 - equal, i.e. v1 = v2* 1 - less than, i.e. v1 < v2* 2 - greater than, i.e. v1 > v2* 3 - not equal but ordering unavailable (reserved for future)
Caller
NameDescribe
SYSCALL_DEFINE5