'XINU - How can I take control over an interrupt vector
Well, I've met this question a lot in OS, we've implemented this by diff. ways (Inline Assembly with setvect, getvect, etc..)
At XINU it's a little bit different and I'm trying to figure this out.
What I found so far, which may be correct but I want to confirm that.
I need to use mapinit(vec_numner,myNewISR,minor_device_number);
function.
Where should I use it?
myNEWISR function, should I declare it it initiali.c
and then implement that function at initiali.c
or just use and extern other_file_name.c
and implement that there. or it doesn't matter, both approaches are correct/wrong?
After I finish with that newISR, I need to restore the old vector interrupts with maprestore()
- where should I call that function? as the last line of myNewISR's code? as the last line of xmain()
?
Am I missing some step through that process?
I'll update this post if I find some more insights about this procedure so others also can learn from that.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|