Changeset e9cc6be in libbsdport


Ignore:
Timestamp:
Feb 20, 2009, 7:48:28 PM (10 years ago)
Author:
Till Straumann <strauman@…>
Branches:
master
Children:
43dca75
Parents:
1df069b
Message:
  • detect use of INTR_FAST and produce a compile-time error with a hint what the porter has to do.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsd_eth_drivers/libbsdport/bus.h

    r1df069b re9cc6be  
    157157#define INTR_MPSAFE         0
    158158#define INTR_TYPE_NET   0
    159 /* INTR_FAST indicates that a 'handler' is actually
    160  * a 'fast' handler which already uses taskqueues
     159
     160/*
     161 * INTR_FAST handlers are already more like 'filters',
     162 * i.e., they disable interrupts and schedule work
     163 * on a task queue.
     164 *
     165 * During porting the fast handler has to be slightly
     166 * rewritten (must return an int value, FILTER_HANDLED
     167 * if a valid IRQ was detected and work has been scheduled
     168 * and FILTER_STRAY if this device didn't interrupt).
     169 *
     170 * You need to then remove INTR_FAST from the flags,
     171 * pass the converted handler as the 'filter' argument
     172 * and a NULL handler argument to bus_setup_intr().
     173 *
    161174 */
    162 #define INTR_FAST       1
     175extern int __INTR_FAST() __attribute__((
     176        error("\n\n==> you need to convert bus_setup_intr(INTR_FAST) to new API;\n"
     177              "    consult <sys/bus.h>\n\n")
     178));
     179
     180/* Barf at compile time if they try to use INTR_FAST */
     181#define INTR_FAST       (__INTR_FAST())
    163182
    164183int
Note: See TracChangeset for help on using the changeset viewer.