中断处理函数 IRQn_interupt 在那里定义的

wyfwx 2011-09-07 10:08:53
#define IRQ(x,y) \
IRQ##x##y##_interrupt

#define IRQLIST_16(x) \
IRQ(x,0), IRQ(x,1), IRQ(x,2), IRQ(x,3), \
IRQ(x,4), IRQ(x,5), IRQ(x,6), IRQ(x,7), \
IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f)

#define IRQLIST_14(x) \
IRQ(x,0), IRQ(x,1), IRQ(x,2), IRQ(x,3), \
IRQ(x,4), IRQ(x,5), IRQ(x,6), IRQ(x,7), \
IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
IRQ(x,c), IRQ(x,d)

void (*interrupt[NR_IRQS])(void) = {
IRQLIST_16(0x0),

#ifdef CONFIG_X86_IO_APIC
IRQLIST_16(0x1), IRQLIST_16(0x2), IRQLIST_16(0x3),
IRQLIST_16(0x4), IRQLIST_16(0x5), IRQLIST_16(0x6), IRQLIST_16(0x7),
IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
IRQLIST_16(0xc), IRQLIST_16(0xd)

#ifdef CONFIG_PCI_MSI
, IRQLIST_14(0xe)
#endif

#endif
};


IRQ01_interrupt等我在代码里没有搜索到,请问是在那里定义的
...全文
223 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wyfwx 2011-09-07
  • 打赏
  • 举报
回复
#define IRQ(x,y) \
IRQ##x##y##_interrupt

这只是获取了个函数名字而已,具体的对应函数定义我没有搜索到
帅得不敢出门 2011-09-07
  • 打赏
  • 举报
回复
IRQLIST_16(0x0),

#define IRQLIST_16(x) \
IRQ(x,0), IRQ(x,1),...........

IRQLIST_16(0x0) 就是 IRQ(0x0,0), IRQ(0x0,1) ............
这里的
IRQ(0x0,1) 我怎么觉得应该是IRQ0x01_interrupt
帅得不敢出门 2011-09-07
  • 打赏
  • 举报
回复
#define IRQ(x,y) \
IRQ##x##y##_interrupt

IRQ01_interrupt 其实只要通过IRQ(0,1)便可以了. 宏替换后,就出来了.

##是字符串连接作用.

4,437

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧