函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sys.c Create Date:2022-07-27 10:20:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:getrusage

函数原型:void getrusage(struct task_struct *p, int who, struct rusage *r)

返回类型:void

参数:

类型参数名称
struct task_struct *p
intwho
struct rusage *r
1712  maxrss等于0
1714  memset((char * )r, 0, r的长度)
1715  utime等于stime等于0
1717  如果who恒等于ly the calling thread
1718  task_cputime_adjusted(当前进程, & utime, & stime)
1719  It would make sense to put struct rusage in the task_struct,* except that would make the task_struct be *really big*
1720  maxrss等于maxrss
1721  转到:out
1724  如果非lock_task_sighand(p, & flags)则返回
1728  :who恒等于sys_wait4() uses this
1729  :who恒等于RUSAGE_CHILDREN
1730  utime等于cutime
1731  stime等于cstime
1732  voluntary context switches 等于cnvcsw
1733  involuntary " 等于cnivcsw
1734  page reclaims 等于cmin_flt
1735  page faults 等于cmaj_flt
1736  block input operations 等于cinblock
1737  block output operations 等于coublock
1738  maxrss等于cmaxrss
1740  如果who恒等于RUSAGE_CHILDREN退出
1744  :who恒等于Definition of struct rusage taken from BSD 4.3 Reno* We don't support all of these yet, but we might as well have them....* Otherwise, each time we add new items, programs which depend on this* structure will lose
1745  thread_group_cputime_adjusted(p, & tgutime, & tgstime)
1746  utime加等于tgutime
1747  stime加等于tgstime
1748  voluntary context switches 加等于切换计数
1749  involuntary " 加等于上下文切换计数
1750  page reclaims 加等于换页信息
1751  page faults 加等于换页信息
1752  block input operations 加等于inblock
1753  block output operations 加等于oublock
1754  如果maxrss小于maxrssmaxrss等于maxrss
1756  t等于p
1757  循环
1760  退出
1762  默认
1763  BUG()
1765  unlock_task_sighand(p, & flags)
1767  out :
1768  user time used 等于ns_to_kernel_old_timeval(utime)
1769  system time used 等于ns_to_kernel_old_timeval(stime)
1771  如果who不等于RUSAGE_CHILDREN
1774  如果mm
1779  maximum resident set size 等于maxrssPAGE_SIZE除1024
调用者
名称描述
wait_task_zombieHandle sys_wait4 work for one task in state EXIT_ZOMBIE. We hold* read_lock(&tasklist_lock) on entry. If we return zero, we still hold* the lock and this task is uninteresting. If we return nonzero, we have
wait_task_stoppedwait_task_stopped - Wait for %TASK_STOPPED or %TASK_TRACED*@wo: wait options*@ptrace: is the wait for ptrace*@p: task to wait for* Handle sys_wait4() work for %p in state %TASK_STOPPED or %TASK_TRACED
wait_task_continuedHandle do_wait work for one task in a live, non-stopped state.* read_lock(&tasklist_lock) on entry. If we return zero, we still hold* the lock and this task is uninteresting. If we return nonzero, we have
SYSCALL_DEFINE2
COMPAT_SYSCALL_DEFINE2