Changeset 4874c2d in mainline for kernel/genarch/src/kbd/z8530.c


Ignore:
Timestamp:
2006-10-17T20:32:35Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b14e35f2
Parents:
8513ad7
Message:

Do not copy notification config out of the IRQ structure.
Add the notify member, that toggles notifications on and off instead.
This is good for preventing other tasks from registering the notification
while the notification config is stored outside the IRQ structure.
It should also help to implement the cleanup code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/kbd/z8530.c

    r8513ad7 r4874c2d  
    6363static irq_t z8530_irq;         /**< z8530's IRQ. */
    6464
    65 static ipc_notif_cfg_t saved_notif_cfg;
    66 
    6765static void z8530_suspend(chardev_t *);
    6866static void z8530_resume(chardev_t *);
     
    9290        z8530_write_a(&z8530, WR9, WR9_MIE);            /* Master Interrupt Enable. */
    9391       
    94         if (z8530_irq.notif_cfg.answerbox) {
    95                 saved_notif_cfg = z8530_irq.notif_cfg;
    96                 z8530_irq.notif_cfg.answerbox = NULL;
    97                 z8530_irq.notif_cfg.code = NULL;
    98                 z8530_irq.notif_cfg.method = 0;
    99                 z8530_irq.notif_cfg.counter = 0;
    100         }
     92        z8530_irq.notif_cfg.notify = false;
    10193}
    10294
     
    10496void z8530_release(void)
    10597{
    106         if (saved_notif_cfg.answerbox)
    107                 z8530_irq.notif_cfg = saved_notif_cfg;
     98        if (z8530_irq.notif_cfg.answerbox)
     99                z8530_irq.notif_cfg.notify = true;
    108100}
    109101
     
    205197         * interrupt traps. Process the interrupt directly.
    206198         */
    207         if (irq->notif_cfg.answerbox)
     199        if (irq->notif_cfg.notify && irq->notif_cfg.answerbox)
    208200                ipc_irq_send_notif(irq);
    209201        else
Note: See TracChangeset for help on using the changeset viewer.