Date: Tue, 14 Dec 1999 09:21:16 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Pierre Muller cc: Peter Johnson , 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.