delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/29/06:16:40

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "Florian Schulze" <florian DOT proff DOT schulze AT gmx DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: multi-threading
Date: Tue, 29 Jan 2002 11:56:20 +0100
Organization: T-Online
Lines: 18
Message-ID: <a35vdp$4rk$00$1@news.t-online.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1020129121506 DOT 6458I-100000 AT is>
Mime-Version: 1.0
X-Trace: news.t-online.com 1012302074 00 4980 tHCjT01SSmHkjT 020129 11:01:14
X-Complaints-To: abuse AT t-online DOT com
X-Sender: 510037581706-0001 AT t-dialin DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> 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.

This is how it's done in LWP.

Is a signal really processed after all system calls? That would be good to know,
as I'm using LWP for some project and I could make my work a little bit easier
if I know. I guess the only places where I have to be carfull, are functions
which save an internal state.

Florian


- Raw text -


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