Skip to contentSkip to conversation

Introducing my own interrupt in dosemu.

DISCUSSION Stas Sergeev 2 participants 2 messages Jul 16, 2004 – Jul 21, 2004

lore
Share & tools
lore
#0 lore raw

Hello.

Quoted 5 lines · Wartan Hachaturow

Then, in signal handler:
pic_sched(PIC_IRQ10, 1); /* That should schedule an irq 10 in

			   * 1 "dosemu jiffie", right?
			   */
      do_irq(); 

That's rather wrong. You took that from the timer code, but that's really not the case here. You should just use pic_request().

Quoted 3 lines

Additionally, I initialize PIC to unmask the interrupt in init.c:
pic_seti(PIC_IRQ10, my_interrupt, 0, NULL); pic_unmaski(PIC_IRQ10);

That's correct.

Quoted 2 lines

But my_interrupt() (which should just do a warn()) doesn't get called either :(

Note that pic_unmaski() unmasks the IRQ only internally, i.e. it makes it available for the use of a DOS prog. You still have to unmask it from within your DOS program yourself, when setting up the handler. I guess this is what you have not done.

#1 lore raw
Quoted 6 lines · Stas Sergeev

Note that pic_unmaski() unmasks the IRQ only internally, i.e. it makes it available for the use of a DOS prog. You still have to unmask it from within your DOS program yourself, when setting up the handler. I guess this is what you have not done.

Thanks a lot, that helped.

If you don't mind, another small question :)

At irq frequencies of, say, 128 HZ, I've faced a "lost interrupts" problem -- in some cases, my interrupts are lost (i.e. the amount of interrupts I count from inside isn't the same as the amount of signals that are sent). I think the reason is that one pending interrupt-deep queue.
Are there any common ways to deal with serialization of interrupts (with a trade-off delay in triggering, of course) by dosemu "devices" or I have to somehow figure out my own?

Signature · 1 line
Thanks in advance, Wartan.