Changeset 3dea17f in mainline for kernel/genarch/src/kbd/z8530.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/genarch/src/kbd/z8530.c

    r80ca47e r3dea17f  
    7575void z8530_grab(void)
    7676{
     77        ipl_t ipl = interrupts_disable();
     78
    7779        (void) z8530_read_a(&z8530, RR8);
    7880
     
    9092        z8530_write_a(&z8530, WR9, WR9_MIE);            /* Master Interrupt Enable. */
    9193       
     94        spinlock_lock(&z8530_irq.lock);
    9295        z8530_irq.notif_cfg.notify = false;
     96        spinlock_unlock(&z8530_irq.lock);
     97        interrupts_restore(ipl);
    9398}
    9499
     
    96101void z8530_release(void)
    97102{
     103        ipl_t ipl = interrupts_disable();
     104        spinlock_lock(&z8530_irq.lock);
    98105        if (z8530_irq.notif_cfg.answerbox)
    99106                z8530_irq.notif_cfg.notify = true;
     107        spinlock_unlock(&z8530_irq.lock);
     108        interrupts_restore(ipl);
    100109}
    101110
Note: See TracChangeset for help on using the changeset viewer.