函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\exit.c Create Date:2022-07-27 10:03:24
Last Modify:2020-03-17 11:17:32 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kernel_waitid

函数原型:static long kernel_waitid(int which, pid_t upid, struct waitid_info *infop, int options, struct rusage *ru)

返回类型:long

参数:

类型参数名称
intwhich
pid_tupid
struct waitid_info *infop
intoptions
struct rusage *ru
1494  struct pid * pid = NULL
1498  如果options按位与WNOHANG按位或Don't reap, just poll status. 按位或WEXITED按位或WSTOPPED按位或WCONTINUED按位或Don't wait on children of other threads in this group 按位或Wait only on non-SIGCHLD children 按位或Wait on all children, regardless of type 的值的反则返回:负EINVAL
1501  如果非options按位与WEXITED按位或WSTOPPED按位或WCONTINUED的值的值则返回:负EINVAL
1505  :which恒等于First argument to waitid:
1506  type等于最大进程
1507  退出
1508  :which恒等于P_PID
1509  type等于单一进程
1510  如果upid小于等于0则返回:负EINVAL
1513  pid等于Lookup a PID in the hash table, and return with it's count elevated.
1514  退出
1515  :which恒等于P_PGID
1516  type等于进程组
1517  如果upid小于0则返回:负EINVAL
1520  如果upidpid等于Lookup a PID in the hash table, and return with it's count elevated.
1522  否则pid等于get_task_pid(当前进程, 进程组)
1524  退出
1525  :which恒等于P_PIDFD
1526  type等于单一进程
1527  如果upid小于0则返回:负EINVAL
1530  pid等于pidfd_get_pid(upid)
1531  如果是错误则返回:错误
1533  退出
1534  默认
1535  返回:负EINVAL
1538  wo_type等于type
1539  wo_pid等于pid
1540  wo_flags等于options
1541  wo_info等于infop
1542  wo_rusage等于ru
1543  ret等于do_wait( & wo)
1545  put_pid(pid)
1546  返回:ret
调用者
名称描述
SYSCALL_DEFINE5
COMPAT_SYSCALL_DEFINE5