Mail Archives: djgpp/1998/05/19/06:17:25
On Tue, 19 May 1998, Paul Derbyshire wrote:
> How does it manage this, using a timer interrupt to plant a signal whose
> handler manages task switching? What signal is used?
Either SIGALRM or SIGTIMR, I'd guess. DJGPP already has almost all the
facilities to generate these signals on a timer tick. (A PM handler for
Int 8 is installed when you call `alarm' or one of the itimer functions.)
But the signal delivery is delayed until system calls like spawn and
others which call DOS/BIOS return. So when a thread spawns a child
program, all the other threads won't get CPU until the child program
exits.
> How so... are there any other mechanisms? Which if any wouldn't bomb under
> WIndows, or Desqview, or some other non-CWSDPMI environment? Is there a way to
> at least run multiple DJGPP programs using such a scheme, or would it be easier
> to design a method of dynamically loading modules?
I'm no specialist in this field, but using other methods is surely much
more tricky and crash-prone, since doing anything non-trivial from a
protected-mode hardware interrupt handler is tantamount to running
circles on a minefield. The fact that DJGPP's signals work like they do
is no coincidence.
- Raw text -