函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:seq_file methods for the tasks/procs files. The seq_file position is the* next pid to display; the seq_file iterator is a pointer to the pid* in the cgroup->l->list array.

函数原型:static void *cgroup_pidlist_start(struct seq_file *s, loff_t *pos)

返回类型:void

参数:

类型参数名称
struct seq_file *s
loff_t *pos
400  of等于private
401  cgrp等于PI: the cgroup that this css is attached to
403  type等于private
404  index等于0, pid等于pos
407  mutex_lock( & pidlist_mutex)
415  如果privpriv等于cgroup_pidlist_find(cgrp, type)
422  如果非priv
423  ret等于Load a cgroup's pidarray with either procs' tgids or tasks' pids
425  如果ret则返回:错误号
428  l等于priv
430  如果pid
431  end等于how many elements the above list has
433 index小于end循环
434  mid等于indexend的和除2
435  如果array of xids [mid]恒等于pid
436  index等于mid
437  退出
438  否则如果array of xids [mid]小于等于pidindex等于mid加1
440  否则end等于mid
445  如果index大于等于how many elements the above list has 则返回:NULL
448  iter等于array of xids index
449  pos等于iter
450  返回:iter