Skip navigation.
Home
The QNX Community Portal

View topic - InterruptStatus

InterruptStatus

Read-only archive of qnx.rtos (Writing resources managers, and general discussion around the QNX Neutrino RTOS) at inn.qnx.com

InterruptStatus

Postby 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
Michael Tasche
 

Re: InterruptStatus

Postby 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
Colin Burgess
 


Return to qnx.rtos

Who is online

Users browsing this forum: No registered users and 3 guests