delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/29/05:22:14

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Tue, 29 Jan 2002 12:19:15 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Christophe BARIBAUD <cbaribau AT jnjfr DOT jnj DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: multi-threading
In-Reply-To: <a35i6q$jdn$1@suaar1ab.prod.compuserve.com>
Message-ID: <Pine.SUN.3.91.1020129121506.6458I-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 29 Jan 2002, Christophe BARIBAUD wrote:

> I do think that a pre-emptive multi-threading kernel under MS-DOS is a wrong
> way, since DJGPP libraries, DPMI and DOS aren't reentrant.

Nevertheless, you could still have preemptive threading if you are 
willing to accept the limitation that thread switch would be delayed 
until system calls (DPMI and DOS calls) return.  This limitation is 
certainly no worse than cooperative threading.

If this limitation is okay, you can build your scheduler as a handler for 
some signal, like SIGALRM, and use timers to preempt threads.

- Raw text -


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