mirror of
https://github.com/0xAX/linux-insides.git
synced 2025-01-03 04:10:56 +00:00
cpu_idle_loop logical in book is wrong, based on linux v3.10 code, the
schedule_preempt_disabled() is in while(1) scope.
This commit is contained in:
parent
b7fad6ac7c
commit
9d0bc19841
@ -51,16 +51,17 @@ static void cpu_idle_loop(void)
|
|||||||
{
|
{
|
||||||
while (1) {
|
while (1) {
|
||||||
while (!need_resched()) {
|
while (!need_resched()) {
|
||||||
|
...
|
||||||
|
...
|
||||||
|
...
|
||||||
|
/* the main idle function */
|
||||||
|
cpuidle_idle_call();
|
||||||
|
}
|
||||||
...
|
...
|
||||||
...
|
...
|
||||||
...
|
...
|
||||||
/* the main idle function */
|
schedule_preempt_disabled();
|
||||||
cpuidle_idle_call();
|
|
||||||
}
|
}
|
||||||
...
|
|
||||||
...
|
|
||||||
...
|
|
||||||
schedule_preempt_disabled();
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -134,3 +134,4 @@ Thank you to all contributors:
|
|||||||
* [Yuxin Wu](https://github.com/chaffz)
|
* [Yuxin Wu](https://github.com/chaffz)
|
||||||
* [Biao Ding](https://github.com/SmallPond)
|
* [Biao Ding](https://github.com/SmallPond)
|
||||||
* [Arfy slowy](https://github.com/slowy07)
|
* [Arfy slowy](https://github.com/slowy07)
|
||||||
|
* [Junbo Jiang](https://github.com/junbo42)
|
||||||
|
Loading…
Reference in New Issue
Block a user