InterruptStatus

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

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