Changeset 37c9fc8 in mainline for kernel/generic/src/proc/scheduler.c
- Timestamp:
- 2010-04-25T10:15:35Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aa028db
- Parents:
- 883fedc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/scheduler.c
r883fedc r37c9fc8 187 187 188 188 loop: 189 interrupts_enable();190 189 191 190 if (atomic_get(&CPU->nrdy) == 0) { … … 196 195 */ 197 196 198 /* 197 /* Mark CPU as it was idle this clock tick */ 198 spinlock_lock(&CPU->lock); 199 CPU->idle = true; 200 spinlock_unlock(&CPU->lock); 201 202 interrupts_enable(); 203 /* 199 204 * An interrupt might occur right now and wake up a thread. 200 205 * In such case, the CPU will continue to go to sleep 201 206 * even though there is a runnable thread. 202 207 */ 203 204 spinlock_lock(&CPU->lock);205 CPU->idle = true;206 spinlock_unlock(&CPU->lock);207 208 cpu_sleep(); 209 interrupts_disable(); 208 210 goto loop; 209 211 } 210 211 interrupts_disable();212 212 213 213 for (i = 0; i < RQ_COUNT; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.