Changeset 4874c2d in mainline for kernel/arch


Ignore:
Timestamp:
2006-10-17T20:32:35Z (19 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/arch/ppc32/src/drivers/cuda.c

    r8513ad7 r4874c2d  
    6464static volatile uint8_t *cuda = NULL;
    6565static irq_t cuda_irq;          /**< Cuda's IRQ. */
    66 
    67 static ipc_notif_cfg_t saved_notif_cfg;
    68 
    6966
    7067static char lchars[0x80] = {
     
    255252static void cuda_irq_handler(irq_t *irq, void *arg, ...)
    256253{
    257         if (irq->notif_cfg.answerbox)
     254        if (irq->notif_cfg.notify && irq->notif_cfg.answerbox)
    258255                ipc_irq_send_notif(irq);
    259256        else {
     
    277274void cuda_grab(void)
    278275{
    279         if (cuda_irq.notif_cfg.answerbox) {
    280                 saved_notif_cfg = cuda_irq.notif_cfg;
    281                 cuda_irq.notif_cfg.answerbox = NULL;
    282                 cuda_irq.notif_cfg.code = NULL;
    283                 cuda_irq.notif_cfg.method = 0;
    284                 cuda_irq.notif_cfg.counter = 0;
    285         }
     276        cuda_irq.notif_cfg.notify = false;
    286277}
    287278
     
    290281void cuda_release(void)
    291282{
    292         if (saved_notif_cfg.answerbox)
    293                 cuda_irq.notif_cfg = saved_notif_cfg;
     283        if (cuda_irq.notif_cfg.answerbox)
     284                cuda_irq.notif_cfg.notify = true;
    294285}
    295286
Note: See TracChangeset for help on using the changeset viewer.