Changeset f619ec11 in mainline for kernel/arch/mips32/src/interrupt.c


Ignore:
Timestamp:
2007-02-03T21:26:54Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cf5ddf6
Parents:
80bcaed
Message:

When clock() is called by an external interrupt dispatched by the IRQ dispatcher,
no spinlock can be held or the kernel will not be preemptive. This fixes Ticket #24.

Formating and indentation fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/interrupt.c

    r80bcaed rf619ec11  
    114114        nextcount = cp0_count_read() + cp0_compare_value - drift;
    115115        cp0_compare_write(nextcount);
     116
     117        /*
     118         * We are holding a lock which prevents preemption.
     119         * Release the lock, call clock() and reacquire the lock again.
     120         */
     121        spinlock_unlock(&irq->lock);
    116122        clock();
     123        spinlock_lock(&irq->lock);
    117124       
    118125        if (virtual_timer_fnc != NULL)
Note: See TracChangeset for help on using the changeset viewer.