1

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.

phuclv
  • 37,963
  • 15
  • 156
  • 475
Ilan Aizelman WS
  • 1,630
  • 2
  • 21
  • 44
  • Woah.. they still teach xinu... Not that it is a bad thing. – Eugene Sh. Feb 09 '18 at 16:29
  • @EugeneSh. I know right? Such a useless course. Waste of time but in the end 40% of my exam mark. – Ilan Aizelman WS Feb 09 '18 at 16:31
  • Well.. I actually said it is *not* a bad thing :) It gives the concepts nicely.. well as far as I can remember from like 20 years ago.... Well one can argue it's better to start with real-life OS right away. – Eugene Sh. Feb 09 '18 at 16:33
  • We learn both, that XINU part is in the OS II course. I guess they're not synced with the industry yet so they teach what they know. Unfortunately. @EugeneSh. – Ilan Aizelman WS Feb 09 '18 at 16:38

0 Answers0