开发者

Blocking or sleeping an interrupt handler

开发者 https://www.devze.com 2023-01-28 09:40 出处:网络
Assume: 1) Multi-cpu environment 2) Process that gets interrupted, is the same process that executes the interrupt handler, so I guess technically nothing gets interrupted except what the process was

Assume:

1) Multi-cpu environment

2) Process that gets interrupted, is the same process that executes the interrupt handler, so I guess technically nothing gets interrupted except what the process was doing before, but it is still executing as it is executing the handler.

3) There is no top or bot开发者_如何学Ctom half, when an interrupt takes place the handler is invoked, executes, then return from interrupt, simple as that.

Why would sleeping the handler (puts in sleep queue, context switch to next runnable process) be a bad idea?


Pls refer to Why kernel code/thread executing in interrupt context cannot sleep?

I just posted answer. Hope it makes sense for you.

0

精彩评论

暂无评论...
验证码 换一张
取 消