www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/19/11:05:15

Date: Mon, 19 Oct 1998 17:03:45 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Olivier Perron <perron AT art DOT alcatel DOT fr>
cc: djgpp AT delorie DOT com
Subject: Re: Questions about protected mode interrupt handler
In-Reply-To: <Pine.GSO.4.05.9810191403060.7524-100000@rtbsci146s>
Message-ID: <Pine.SUN.3.91.981019165510.12098C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Mon, 19 Oct 1998, Olivier Perron wrote:

> Now, I've installed the real mode handler using the
> _go32_dpmi_allocate_real_mode_callback_iret function and not as you
> suggest in the FAQ.

The relevant section of the FAQ doesn't fit this case, it is for the case 
where you want to hook the interrupt in real mode to avoid the overhead 
of the mode switch and the interrupt reflection when dealing with high 
rates of interrupts that cannot cope with this overhead.

However, in your case, you are working around a bug or misfeature in 
Windows whereby it doesn't seem to reflect the interrupt to PM.  So in 
your case, the wrapper *is* the solution.

> Are there really penalties if I do so ?

The wrapper is non-reentrant, so you should make sure it is never called 
again while the previous instance is active.  If you don't EOI the PIC 
until near the end of your function, this should never happen.

I don't know about any other gotchas, but since I didn't even know that 
Windows doesn't reflect the serial interrupt to PM, you are in uncharted 
territory, so you will have to find out about the pitfalls as you go.

> Do you have some pointers to code snippet which do what you suggest?

Not off the top of my head.  You might try the PCTIME package (the exact 
URL in the FAQ) and the other serial libraries written for DJGPP (also in 
the FAQ, in section 22.3).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019