Changeset 7edfde9 in mainline for uspace/lib/c/generic/irq.c


Ignore:
Timestamp:
2015-05-13T02:22:50Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0683992
Parents:
6d81e1e
Message:

fix the device driver regressions in a generic way
therefore the previous fix (revision 2329) can be reverted
the root cause of the regression was a forgotten fallback to default_ucode that disappeared in the refactoring of revision 2170 (mea culpa)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/irq.c

    r6d81e1e r7edfde9  
    3535#include <ipc/irq.h>
    3636#include <libc.h>
     37#include <stdlib.h>
     38#include <macros.h>
     39
     40static irq_cmd_t default_cmds[] = {
     41        {
     42                .cmd = CMD_ACCEPT
     43        }
     44};
     45
     46static const irq_code_t default_ucode = {
     47        0,
     48        NULL,
     49        ARRAY_SIZE(default_cmds),
     50        default_cmds
     51};
    3752
    3853/** Subscribe to IRQ notification.
     
    4964    const irq_code_t *ucode)
    5065{
     66        if (ucode == NULL)
     67                ucode = &default_ucode;
     68       
    5169        return __SYSCALL4(SYS_IPC_IRQ_SUBSCRIBE, inr, devno, method,
    5270            (sysarg_t) ucode);
Note: See TracChangeset for help on using the changeset viewer.