Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在Linux中进行中断处理时,我有一个问题,如果我们可以引用当前宏指向被中断的任务,而核心处于硬中断模式?此外,如果这种引用是可能的,如果我们调用信号量“down”会发生什么,尽管这是非常不鼓励的。?
我相信至少在 x86 上是可以做到的,因为它不会立即引起恐慌。
然而,这样做总是错误的。中断与任何任务无关,中断与正在运行的某个任务之间没有联系,因此无论如何都没有合理的理由尝试这样做。如果当前任务可以是系统上的任何任务,它有什么好处?