中断服务例程中什么都不存在? [英] What all cant be there in an Interrupt service routine?

查看:82
本文介绍了中断服务例程中什么都不存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道ISR需要非常快,并且应该非常快速地处理中断.但是我不明白同样的原因.为什么要满足这个条件?而且,为了这样做,ISR代码的全部功能是否有限制?通常,什么不应该包含在ISR的代码中?

I know that an ISR needs to be very quick and should handle an interrupt very quickly. But I do not understand the reason for the same. Why should this condition be met? Moreover, in order to do so are there any restrictions on what all can an ISR code have? Typically, what all should not be included in the code of an ISR?

谢谢

推荐答案

我知道ISR需要非常快,并且应该处理 很快打断.但我不明白造成这种情况的原因 一样

I know that an ISR needs to be very quick and should handle an interrupt very quickly. But I do not understand the reason for the same

最严格的要求是ISR不能阻止-它不能入睡.因此,您不能使用信号量.

The most stringent requirement is that an ISR can't block - it can't sleep. So you can't use semaphores for example.

每个中断都与硬件有关.想一想网络设备.它的内存非常小,但是却可以高速接收帧.您最好将它们中的内容快速复制到主内存中,否则帧会使设备不堪重负,并且会溢出帧.

Each interrupt has something to do with hardware. Think of a network device. It has a really tiny memory and yet it receives frames at high speed. Your had better copy quickly stuff from it into main memory, or the frames will overwhelm the device and it will spill frames.

这篇关于中断服务例程中什么都不存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆