www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/17/08:28:39

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE3359D56@probe-2.Acclaim-Euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: how to switch tasks?
Date: Thu, 17 Dec 1998 13:08:57 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii writes:
> It might be possible, but it's very tricky.  The DPMI spec explicitly 
> forbids task switching inside a real-mode interrupt handler (such as a 
> timer tick handler).  So AFAIK this is impossible without relying on 
> specific internal details of a certain DPMI server.

I think you can do it by using the signal handling mechanism to defer 
the event into a protected mode exception, and then using setjmp() / 
longjmp(). I don't know all the details of how this works, but packages 
like LWP seem able to use this method quite successfully...

Robert Darmochwal writes:
> and if i wanted to do that manual ?
> like messing with crX,task regs, and so on ?.

You can't. These are privileged instructions, and most DPMI providers 
will disallow you from messing with them. It would be a major flaw in 
the protection scheme if you were allowed to alter these things directly!


	Shawn Hargreaves.

- Raw text -


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