Date: Tue, 28 Jul 1998 11:26:40 +0300 (IDT) From: Eli Zaretskii To: Archee/CoNTRACT cc: djgpp AT delorie DOT com Subject: Re: CWSDPMI: slow IRQ wrapper In-Reply-To: <199807272008.QAA29986@delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 27 Jul 1998, Archee/CoNTRACT wrote: > IRQ wrapper of CWSDPMI sets up a new stack for the app, however > the app can have big stack and little IRQ handler. > When I use other extenders there is no so many code at the IRQ handler > header. > > When I use DJGPP, I use the _go32_dpmi_allocate_iret_wrapper, which is > very slow when I code a program to use serial port. The wrappers are NOT the tools to write production-quality code. The issue is not only speed, but realiability: the wrappers don't allow to lock all of the code/data that are accessed by the handler. In fact, locking code and data of a C function is almost impossible. The FAQ explains this further in sections 18.9 and 18.10. So I suggest to write your handler in assembly. This will also make it faster, I think. As a reference, Quake was built with DJGPP, uses CWSDPMI, and supports serial ports as well. > Is there other extender avaiable with fast IRQ handling capables as > PMODE by TRAN for DJGPP ? The wrappers have nothing to do with the DPMI server. They are library helper functions which work the same with any server. So switching a server won't change much. If you want faster response, use CSWDPR0 which runs at ring 0, but doesn't support virtual memory.