mirror of
https://github.com/0xAX/linux-insides.git
synced 2024-12-22 06:38:07 +00:00
Merge pull request #769 from SmallPond/concepts-linux-cpu-2-cpumask-fix
Update Concepts/Linux-cpu-2.md cpumask
This commit is contained in:
commit
2ad1272085
@ -59,7 +59,7 @@ where `BITS_TO_LONGS`:
|
|||||||
As we are focusing on the `x86_64` architecture, `unsigned long` is 8-bytes size and our array will contain only one element:
|
As we are focusing on the `x86_64` architecture, `unsigned long` is 8-bytes size and our array will contain only one element:
|
||||||
|
|
||||||
```
|
```
|
||||||
(((8) + (8) - 1) / (8)) = 1
|
(((8) + (64) - 1) / (64)) = 1
|
||||||
```
|
```
|
||||||
|
|
||||||
`NR_CPUS` macro represents the number of CPUs in the system and depends on the `CONFIG_NR_CPUS` macro which is defined in [include/linux/threads.h](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/include/linux/threads.h) and looks like this:
|
`NR_CPUS` macro represents the number of CPUs in the system and depends on the `CONFIG_NR_CPUS` macro which is defined in [include/linux/threads.h](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/include/linux/threads.h) and looks like this:
|
||||||
|
@ -132,3 +132,4 @@ Thank you to all contributors:
|
|||||||
* [Zhouyi Zhou](https://github.com/zhouzhouyi-hub)
|
* [Zhouyi Zhou](https://github.com/zhouzhouyi-hub)
|
||||||
* [Mingzhe Yang](https://github.com/Mutated1994)
|
* [Mingzhe Yang](https://github.com/Mutated1994)
|
||||||
* [Yuxin Wu](https://github.com/chaffz)
|
* [Yuxin Wu](https://github.com/chaffz)
|
||||||
|
* [Biao Ding](https://github.com/SmallPond)
|
||||||
|
Loading…
Reference in New Issue
Block a user