diff options
author | Steve French <sfrench@hera.kernel.org> | 2005-06-06 09:57:33 -0700 |
---|---|---|
committer | Steve French <sfrench@hera.kernel.org> | 2005-06-06 09:57:33 -0700 |
commit | 0b68177ccd12866d9f19cafad212b861c9d02a8c (patch) | |
tree | 6fc26aa59fb183fe9c86d44ae14ce423ad7211da /arch/m68knommu/kernel/process.c | |
parent | d0d2f2df65ddea9a30ddd117f769bfff65d3fc56 (diff) | |
parent | 7cef5677ef3a8084f2588ce0a129dc95d65161f6 (diff) |
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/m68knommu/kernel/process.c')
-rw-r--r-- | arch/m68knommu/kernel/process.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 2b6c9d32b7a..c4a33f265dc 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c @@ -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; @@ -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) |