[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cpu_intr_p() related question
On Sep 1, 2013, at 4:24 PM, Yann Sionneau <yann.sionneau%gmail.com@localhost>
> On 01/09/13 23:42, Yann Sionneau wrote :
>> Hello NetBSD hackers,
>> I have read over there  that cpu_intr_p() should return true if curcpu()
>> is currently "in the context of a hardware interrupt".
>> Does this mean that cpu_intr_p() should return true when CPU is in exception
>> handler (tlb miss handler, tlb fault handler, division by zero etc) as well
>> as in exception caused by an interruption? Or Should it only return true for
>> true interruption like UART or timer interrupt and not for exception
>> handlers not related to an interruption?
Only those that are caused by an interrupt (think asynchronous event).
Synchronous exceptions (tlb misc, syscall etc) do not affect cpu_intr_p.
cpu_intr_p() in a tlb miss in an interrupt handler would return true.
>> I also had a look at this thread  but it did not provide me with much
>> information, except that I could just implement it as "return false;", is it
>> still true?
Not really since that means there will be no reporting interrupt time.
Main Index |
Thread Index |