免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1738 | 回复: 3
打印 上一主题 下一主题

[中断] 2.6 linux内核可以配置成中断(或软中断)线程化么 [复制链接]

论坛徽章:
9
程序设计版块每日发帖之星
日期:2016-02-13 06:20:00数据库技术版块每日发帖之星
日期:2016-06-15 06:20:00数据库技术版块每日发帖之星
日期:2016-06-16 06:20:00数据库技术版块每日发帖之星
日期:2016-06-18 06:20:00程序设计版块每日发帖之星
日期:2016-06-27 06:20:00程序设计版块每日发帖之星
日期:2016-07-09 06:20:00IT运维版块每日发帖之星
日期:2016-07-15 06:20:00IT运维版块每日发帖之星
日期:2016-07-27 06:20:00程序设计版块每日发帖之星
日期:2016-08-18 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-12-06 09:04 |只看该作者 |倒序浏览
2.6 linux内核可以配置成中断(或软中断)线程化么

论坛徽章:
0
2 [报告]
发表于 2013-12-06 11:05 |只看该作者
之前在lwn上看到过一篇文章,貌似有这个发展趋势。最后不知道是否有合入mainline。
楼主2.6哪个版本?需要查一下commit log。

论坛徽章:
9
程序设计版块每日发帖之星
日期:2016-02-13 06:20:00数据库技术版块每日发帖之星
日期:2016-06-15 06:20:00数据库技术版块每日发帖之星
日期:2016-06-16 06:20:00数据库技术版块每日发帖之星
日期:2016-06-18 06:20:00程序设计版块每日发帖之星
日期:2016-06-27 06:20:00程序设计版块每日发帖之星
日期:2016-07-09 06:20:00IT运维版块每日发帖之星
日期:2016-07-15 06:20:00IT运维版块每日发帖之星
日期:2016-07-27 06:20:00程序设计版块每日发帖之星
日期:2016-08-18 06:20:00
3 [报告]
发表于 2013-12-06 11:16 |只看该作者
lenky0401 发表于 2013-12-06 11:05
之前在lwn上看到过一篇文章,貌似有这个发展趋势。最后不知道是否有合入mainline。
楼主2.6哪个版本?需要 ...


kernel version 2.6.36

论坛徽章:
17
水瓶座
日期:2013-08-29 12:09:27白羊座
日期:2014-08-07 12:36:42丑牛
日期:2014-07-24 12:44:41寅虎
日期:2014-04-16 16:15:33寅虎
日期:2014-03-12 09:28:43摩羯座
日期:2014-03-06 13:22:04技术图书徽章
日期:2014-03-06 11:34:50天蝎座
日期:2014-01-09 11:31:44寅虎
日期:2013-12-27 17:01:44双子座
日期:2013-12-27 12:32:29双子座
日期:2013-12-25 09:03:33丑牛
日期:2013-12-24 16:18:44
4 [报告]
发表于 2013-12-06 11:57 |只看该作者
回复 1# mordorwww

/**
*        request_threaded_irq - allocate an interrupt line
*        @irq: Interrupt line to allocate
*        @handler: Function to be called when the IRQ occurs.
*                  Primary handler for threaded interrupts
*                  If NULL and thread_fn != NULL the default
*                  primary handler is installed
*        @thread_fn: Function called from the irq handler thread
*                    If NULL, no irq thread is created
*        @irqflags: Interrupt type flags
*        @devname: An ascii name for the claiming device
*        @dev_id: A cookie passed back to the handler function
*
*        This call allocates interrupt resources and enables the
*        interrupt line and IRQ handling. From the point this
*        call is made your handler function may be invoked. Since
*        your handler function must clear any interrupt the board
*        raises, you must take care both to initialise your hardware
*        and to set up the interrupt handler in the right order.
*
*        If you want to set up a threaded irq handler for your device
*        then you need to supply @handler and @thread_fn. @handler is
*        still called in hard interrupt context and has to check
*        whether the interrupt originates from the device. If yes it
*        needs to disable the interrupt on the device and return
*        IRQ_WAKE_THREAD which will wake up the handler thread and run
*        @thread_fn. This split handler design is necessary to support
*        shared interrupts.

*
*        Dev_id must be globally unique. Normally the address of the
*        device data structure is used as the cookie. Since the handler
*        receives this value it makes sense to use it.
*
*        If your interrupt is shared you must pass a non NULL dev_id
*        as this is required when freeing the interrupt.
*
*        Flags:
*
*        IRQF_SHARED                Interrupt is shared
*        IRQF_TRIGGER_*                Specify active edge(s) or level
*
*/


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP