Changeset 7e58979 in mainline for kernel/arch/ia32/src/smp/apic.c


Ignore:
Timestamp:
2007-04-07T22:30:01Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7bcfbbc
Parents:
201abde
Message:

On SMP amd64 and ia32 systems, release the irq→lock
before calling clock() from the interrupt handler.
This is important for maintaining kernel preemption
since no preemption can take place while a spinlock
is held.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/smp/apic.c

    r201abde r7e58979  
    140140static void l_apic_timer_irq_handler(irq_t *irq, void *arg, ...)
    141141{
     142        /*
     143         * Holding a spinlock could prevent clock() from preempting
     144         * the current thread. In this case, we don't need to hold the
     145         * irq->lock so we just unlock it and then lock it again.
     146         */
     147        spinlock_unlock(&irq->lock);
    142148        clock();
     149        spinlock_lock(&irq->lock);
    143150}
    144151
Note: See TracChangeset for help on using the changeset viewer.