struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = {
[0 ... NR_IRQS-1] = {
.status = IRQ_DISABLED,
.chip = &no_irq_chip,
.handle_irq = handle_bad_irq,
.depth = 1,
.lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock),
#ifdef CONFIG_SMP
.affinity = CPU_MASK_ALL
#endif
}
};
读中断源码的时候,看到 [0 ... NR_IRQS-1],表示不理解。
其中的 “...”和printf(char *fmt,...)的是一样的么,不知道编译器是怎么解析的
[0 ... NR_IRQS-1] = {
.status = IRQ_DISABLED,
.chip = &no_irq_chip,
.handle_irq = handle_bad_irq,
.depth = 1,
.lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock),
#ifdef CONFIG_SMP
.affinity = CPU_MASK_ALL
#endif
}
};
读中断源码的时候,看到 [0 ... NR_IRQS-1],表示不理解。
其中的 “...”和printf(char *fmt,...)的是一样的么,不知道编译器是怎么解析的
我以前都没有见过这样的语法
********************************************************************************
gcc的扩展你可以把它看成是 |