OpenQNX :: The QNX Community Portal

Jul 25, 2008 - 04:43 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 23 unlogged users and 3 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Michael Tasche
Post subject: InterruptStatus  PostPosted: Nov 08, 2007 - 01:20 PM
Guest





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
 
   
Reply with quote Back to top
Colin Burgess
Post subject: Re: InterruptStatus  PostPosted: Nov 08, 2007 - 02:16 PM
Guest





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:
Quote:
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
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.