Changeset 3dea17f in mainline for kernel/arch/ppc32/src/drivers/cuda.c


Ignore:
Timestamp:
2006-10-19T17:33:08Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f0450658
Parents:
80ca47e
Message:

Add mutual exclusion to keyboard grab and release
functions on sparc64, ppc32, mips32 and ia64.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/drivers/cuda.c

    r80ca47e r3dea17f  
    274274void cuda_grab(void)
    275275{
     276        ipl_t ipl = interrupts_disable();
     277        spinlock_lock(&cuda_irq.lock);
    276278        cuda_irq.notif_cfg.notify = false;
     279        spinlock_unlock(&cuda_irq.lock);
     280        interrupts_restore(ipl);
    277281}
    278282
     
    281285void cuda_release(void)
    282286{
     287        ipl_t ipl = interrupts_disable();
     288        spinlock_lock(&cuda_irq.lock);
    283289        if (cuda_irq.notif_cfg.answerbox)
    284290                cuda_irq.notif_cfg.notify = true;
     291        spinlock_unlock(&cuda_irq.unlock);
     292        interrupts_restore(ipl);
    285293}
    286294
Note: See TracChangeset for help on using the changeset viewer.