diff options
Diffstat (limited to 'include/task.h')
-rw-r--r-- | include/task.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/task.h b/include/task.h index ff3fe30f60..edf278c066 100644 --- a/include/task.h +++ b/include/task.h @@ -196,10 +196,9 @@ struct irq_priority { uint8_t priority; }; -/* Helper macros to build the IRQ handler name */ -#define IRQ_BUILD_NAME(prefix, irqnum, postfix) prefix ## irqnum ## postfix -#define IRQ_HANDLER(irqname) IRQ_BUILD_NAME(irq_,irqname,_handler) - +/* Helper macros to build the IRQ handler and priority struct names */ +#define IRQ_HANDLER(irqname) CONCAT3(irq_, irqname, _handler) +#define IRQ_PRIORITY(irqname) CONCAT2(prio_, irqname) /* * Macro to connect the interrupt handler "routine" to the irq number "irq" and * ensure it is enabled in the interrupt controller with the right priority. @@ -212,7 +211,7 @@ struct irq_priority { routine(); \ task_resched_if_needed(ret); \ } \ - const struct irq_priority IRQ_BUILD_NAME(prio_, irq, ) \ + const struct irq_priority IRQ_PRIORITY(irq) \ __attribute__((section(".rodata.irqprio"))) \ = {irq, priority} |