Rev 784 | Rev 787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 784 | Rev 785 | ||
---|---|---|---|
Line 129... | Line 129... | ||
129 | if (atomic_get(&CPU->nrdy) == 0) { |
129 | if (atomic_get(&CPU->nrdy) == 0) { |
130 | /* |
130 | /* |
131 | * For there was nothing to run, the CPU goes to sleep |
131 | * For there was nothing to run, the CPU goes to sleep |
132 | * until a hardware interrupt or an IPI comes. |
132 | * until a hardware interrupt or an IPI comes. |
133 | * This improves energy saving and hyperthreading. |
133 | * This improves energy saving and hyperthreading. |
134 | * |
- | |
135 | * - we might get an interrupt here that makes some thread runnable, |
- | |
136 | * in such a case we must wait for the next quantum to come |
- | |
137 | */ |
134 | */ |
- | 135 | ||
- | 136 | /* |
|
- | 137 | * An interrupt might occur right now and wake up a thread. |
|
- | 138 | * In such case, the CPU will continue to go to sleep |
|
- | 139 | * even though there is a runnable thread. |
|
- | 140 | */ |
|
- | 141 | ||
138 | cpu_sleep(); |
142 | cpu_sleep(); |
139 | goto loop; |
143 | goto loop; |
140 | } |
144 | } |
141 | 145 | ||
142 | interrupts_disable(); |
146 | interrupts_disable(); |