InterruptStatus

bridged with qnx.rtos
Post Reply
Michael Tasche

InterruptStatus

Post by Michael Tasche » Thu Nov 08, 2007 1:20 pm

Hi all,

is there a way, to figure out, if the actual CPU is running at IRQ-Level.
I found the undocumented InterruptStatus() in "sys/neutrino.h".
With this call I can figure out, that I called InterruptLock() or
InterruptDisable() before, because the call returns the IRQ Flag from
the status reg on x86, right ?
But I cannot figure out, if I am called from an Hardware-IRQ.
Is it possible, to query the actual runlevel of a CPU?

Regards
Michael

Colin Burgess

Re: InterruptStatus

Post by Colin Burgess » Thu Nov 08, 2007 2:16 pm

check the state field in the cpupage. Take a look at lib/c/kercover/traceevent.c for an example.
It will be non-zero if you are in an interrupt or event handler, 0 otherwise.

Colin

Michael Tasche wrote:
Hi all,

is there a way, to figure out, if the actual CPU is running at IRQ-Level.
I found the undocumented InterruptStatus() in "sys/neutrino.h".
With this call I can figure out, that I called InterruptLock() or
InterruptDisable() before, because the call returns the IRQ Flag from
the status reg on x86, right ?
But I cannot figure out, if I am called from an Hardware-IRQ.
Is it possible, to query the actual runlevel of a CPU?

Regards
Michael



--
cburgess@qnx.com

Post Reply

Return to “qnx.rtos”