delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/14/05:32:06

Date: Tue, 14 Dec 1999 09:21:16 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Pierre Muller <muller AT cerbere DOT u-strasbg DOT fr>
cc: Peter Johnson <locke AT mcs DOT net>, djgpp AT delorie DOT com
Subject: Re: NT4 DPMI BUG (303h, Allocate Real-Mode Callback)
In-Reply-To: <199912131743.SAA15432@cerbere.u-strasbg.fr>
Message-ID: <Pine.SUN.3.91.991214092054.9300D-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 13 Dec 1999, Pierre Muller wrote:

> >I don't think this will work.  What about the case when you have two 
> >callbacks and one gets called while the other is in the midst of 
> >execution?  That single registers structure will be overwritten.
> 
>   Are you sure that you cannot have the same problem 
> with a single callback ?
> (ie that its called again while you are still inside it ?)
> That happens to the data in that case ?

The current RMCB wrappers are non-reentrant, since the RMCB structure
would be overwritten.  Therefore, the wrapper tests a flag variable,
and if it is non-zero (meaning that another RMCB invocation is in
progress), the wrapper bypasses the user callback, and instead pops
the registers and does an IRET.

>   Nevertheless try to use selectors only if needed...
> don't forget that Win(95 at least never reuses the same selector value !)

Yes, that's why I asked Peter to write this workaround such that it
only gets run on NT, where it is absolutely necessary.

- Raw text -


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