From 659a9be536c851763fd6e7627f08825e1971d1a7 Mon Sep 17 00:00:00 2001 From: Manbing Date: Thu, 12 Mar 2020 09:04:39 +0800 Subject: [PATCH] Cgroups/linux-cgroups-1.md: Fix typo Modify "cp_cgrp_subsys" to "cpu_cgrp_subsys". Signed-off-by: Manbing --- Cgroups/linux-cgroups-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cgroups/linux-cgroups-1.md b/Cgroups/linux-cgroups-1.md index 20c4d6c..b19cf94 100644 --- a/Cgroups/linux-cgroups-1.md +++ b/Cgroups/linux-cgroups-1.md @@ -403,7 +403,7 @@ SUBSYS(cpu) ... ``` -This works because of `#undef` statement after first definition of the `SUBSYS` macro. Look at the `&_x ## _cgrp_subsys` expression. The `##` operator concatenates right and left expression in a `C` macro. So as we passed `cpuset`, `cpu` and etc., to the `SUBSYS` macro, somewhere `cpuset_cgrp_subsys`, `cp_cgrp_subsys` should be defined. And that's true. If you will look in the [kernel/cpuset.c](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/kernel/cpuset.c) source code file, you will see this definition: +This works because of `#undef` statement after first definition of the `SUBSYS` macro. Look at the `&_x ## _cgrp_subsys` expression. The `##` operator concatenates right and left expression in a `C` macro. So as we passed `cpuset`, `cpu` and etc., to the `SUBSYS` macro, somewhere `cpuset_cgrp_subsys`, `cpu_cgrp_subsys` should be defined. And that's true. If you will look in the [kernel/cpuset.c](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/kernel/cpuset.c) source code file, you will see this definition: ```C struct cgroup_subsys cpuset_cgrp_subsys = {