Function report |
Source Code:kernel\cgroup\cgroup.c |
Create Date:2022-07-28 11:11:19 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:proc_cgroup_show()* - Print task's cgroup paths into seq_file, one line for each hierarchy* - Used for /proc/<pid>/cgroup.
Proto:int proc_cgroup_show(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *tsk)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct seq_file * | m | |
struct pid_namespace * | ns | |
struct pid * | pid | |
struct task_struct * | tsk |
5789 | buf = Allocation memory |
5794 | spin_lock_irq( & css_set_lock) |
5796 | rate across the hierarchies (root) |
5799 | count = 0 |
5804 | seq_printf(m, "%d:", Unique id for this hierarchy. ) |
5807 | If The bitmask of subsystems attached to this hierarchy & 1 << ssid Then seq_printf(m, "%s%s", count++ ? "," : "", optional, initialized automatically during boot if not set ) |
5810 | If strlen - Find the length of a string*@s: The string to be sized Then seq_printf(m, "%sname=%s", count ? "," : "", The name for this hierarchy - may be empty ) |
5815 | cgrp = Return the cgroup for "task" from the given hierarchy. Must be* called with cgroup_mutex and css_set_lock held. |
5829 | If retval >= # chars in a path name including nul Then retval = -ENAMETOOLONG |
5831 | If retval < 0 Then Go to out_unlock |
5835 | Else |
5845 | retval = 0 |
5846 | out_unlock : |
5847 | spin_unlock_irq( & css_set_lock) |
5850 | out : |
5851 | Return retval |
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 |