Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1819
b: refs/heads/master
c: b05a720
h: refs/heads/master
i:
  1817: 247a6bd
  1815: c3b88cb
v: v3
  • Loading branch information
Greg Ungerer authored and Linus Torvalds committed Jun 3, 2005
1 parent 9ab49b7 commit 0045a48
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4d340cf869b2b63e1043eed72aa2eab6fa2cb2c
refs/heads/master: b05a720b374ac6af05b2fd4c70bb2c61a9f461ca
17 changes: 12 additions & 5 deletions trunk/arch/m68knommu/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ asmlinkage void ret_from_fork(void);
*/
void default_idle(void)
{
while(1) {
if (need_resched())
__asm__("stop #0x2000" : : : "cc");
schedule();
local_irq_disable();
while (!need_resched()) {
/* This stop will re-enable interrupts */
__asm__("stop #0x2000" : : : "cc");
local_irq_disable();
}
local_irq_enable();
}

void (*idle)(void) = default_idle;
Expand All @@ -63,7 +65,12 @@ void (*idle)(void) = default_idle;
void cpu_idle(void)
{
/* endless idle loop with no priority at all */
idle();
while (1) {
idle();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

void machine_restart(char * __unused)
Expand Down

0 comments on commit 0045a48

Please sign in to comment.