Function report |
Source Code:kernel\cgroup\cgroup-v1.c |
Create Date:2022-07-28 11:12:49 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Load a cgroup's pidarray with either procs' tgids or tasks' pids
Proto:static int pidlist_array_load(struct cgroup *cgrp, enum cgroup_filetype type, struct cgroup_pidlist **lp)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct cgroup * | cgrp | |
enum cgroup_filetype | type | |
struct cgroup_pidlist ** | lp |
335 | n = 0 |
340 | lockdep_assert_held( & pidlist_mutex) |
348 | length = group_task_count - count the number of tasks in a cgroup.*@cgrp: the cgroup in question |
349 | array = kvmalloc_array(length, sizeof(pid_t), GFP_KERNEL) |
355 | If Value for the false possibility is greater at compile time(n == length) Then Break |
358 | If type == CGROUP_FILE_PROCS Then pid = task_tgid_vnr(tsk) |
360 | Else pid = task_pid_vnr(tsk) |
369 | If type == CGROUP_FILE_PROCS Then length = pidlist_uniq - given a kmalloc()ed list, strip out all duplicate entries* Returns the number of unique elements. |
373 | If Not l Then |
379 | kvfree(array of xids ) |
380 | array of xids = array |
383 | Return 0 |
Name | Describe |
---|---|
cgroup_pidlist_start | 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. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |