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/mips32/src/drivers/msim.c

    r80ca47e r3dea17f  
    121121void msim_kbd_grab(void)
    122122{
     123        ipl_t ipl = interrupts_disable();
     124        spinlock_lock(&msim_irq.lock);
    123125        msim_irq.notif_cfg.notify = false;
     126        spinlock_unlock(&msim_irq.lock);
     127        interrupts_restore(ipl);
    124128}
    125129
    126130void msim_kbd_release(void)
    127131{
     132        ipl_t ipl = interrupts_disable();
     133        spinlock_lock(&msim_irq.lock);
    128134        if (msim_irq.notif_cfg.answerbox)
    129135                msim_irq.notif_cfg.notify = true;
     136        spinlock_unlock(&msim_irq.lock);
     137        interrupts_restore(ipl);
    130138}
    131139
Note: See TracChangeset for help on using the changeset viewer.