Is it possible to make some privileged instructions (eg sti, cli) available via some Java's API?
(That is, to build a Java's library that would provide sti() and cli() as static methods)
(Suppose this library is buit for a specific machine, not meant to be portable or anything)
I've heard of the
native interface which would allow one to interact with some C-code from a Java program.
So I just wonder if we could use it to call into some C-procedure which could call some assembly procedure that does the sti/cli instruction.
Why on earth would you want to do this? I know, I know! I've got this same question from other people! So I'll just answer it here to save you the asking-part. I'm new to OS, and my instructor talked about something like this today, and regardless of the 'enourmous' amount of time I spent discussing with him, I still don't get what he means, and perhaps he still doesn't get what I mean either. I dont mean to be criticising anyone or appear cocky or anything. I just want to get things straight and make sure I get things correctly)
Thanks in advance!
Edited 4 Years Ago by dicauca: typos