Only device drivers get this kind of power.
If user mode code could do this, it would be able to freeze the system up
completely. Imagine what would happen if your code asked for this an then
entered a loop that never finishes. The CPU would now be stuck in here and
wouldn't be allowedd out, and your system would freeze up completely - it
would be unable to respond to any kind of user input.
Device drivers can do this, but shouldn't obviously... But as anyone who
has written device drivers will tell you, it's relatively easy to end up
completely freezing up the system if you have certain kinds of bugs in your
driver. (No BSOD, just a sudden freeze where the mouse stops moving and the
system suddenly stops working.) You really don't want bugs in user-mode
code to be able to do this...
--
Ian Griffiths -
http://www.interact-sw.co.uk/iangblog/
DevelopMentor -
http://www.develop.com/
"Sharon" wrote:
Isn't there a way to make sure that a set of calls will be excuted before
the
CPU leaves?