Mail Archives: djgpp/1996/10/21/22:26:39
> I've been using a dynamic stack instead of a static stack in my
> interrupt routines. Is it SAFE to call DPMI functions (501 and 502)
> while servicing an interupt. My program used to lock up when I used a
> static stack.
Well, they are probably safe in CWSDPMI, but they are dirt slow. This may
not be the case with all providers, so it's a bad idea. Don't
do this. Next - you didn't lock the memory (bad, bad, bad). Once you
have swapped to your local stack, it is the locked stack, so you don't
need to swap again in the case of nesting (ie, if you enter your
interrupt handler with SS what you want, don't change SS:ESP). So only
one stack is needed, and it can be pre-allocated (this should have been
fixed in the default _go32... wrappers, but never was). You don't check
for where the new memory is provided, so it might be outside your current
ds/es/... limit (yet another reason to preallocate).
- Raw text -