Mail Archives: djgpp/1996/06/19/00:12:25
Xref: | news2.mv.net comp.os.msdos.djgpp:5149
|
From: | Shawn Hargreaves <slh100 AT york DOT ac DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Structured index of the FAQs?
|
Date: | Tue, 18 Jun 1996 17:48:42 +0100
|
Organization: | The University of York, UK
|
Lines: | 29
|
Message-ID: | <Pine.SGI.3.91.960618173132.174B-100000@tower.york.ac.uk>
|
NNTP-Posting-Host: | tower.york.ac.uk
|
Mime-Version: | 1.0
|
In-Reply-To: | <31c6ae92.sandmann@clio.rice.edu>
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
On Tue, 18 Jun 1996, Charles Sandmann wrote:
> > It seems that, using go32_dpmi_set_protected_mode_interrupt_vector,
> > reetrance is not allowed... Is there a solution?
>
> Yes, re-write the interrupt wrapper code, or don't use it. You could
> write your interrupt routines in assembler and stay on the locked 4K
> stack, or you need to write code to handle multiple interrupt stacks.
> Non-trivial in either case. Certainly not a two minute sort of question.
It's non-trivial, but it can be done. I ran into this problem with
Allegro a while back, and ended up implementing my own wrappers that use
multiple stacks. It's not _that_ hard, if you keep your wits about you
(and was particularly easy in my case because Marcel de Kogel wrote most
of the tricky stuff for me :-)
In any case, you could save yourself the hassle of reimplementing this by
grabbing the files irq.c and irq_wrap.s from Allegro. They provide a
similar set of irq wrappers to the libc functions, but handler
reentrancy, plus you can dynamically control whether to iret or chain to
the old handler by the return value from your C function.
/*
* Shawn Hargreaves. Why is 'phonetic' spelt with a ph?
* Check out Allegro and FED on http://www.york.ac.uk/~slh100/
*/
- Raw text -