www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/13/14:54:32

Message-Id: <199912131743.SAA15432@cerbere.u-strasbg.fr>
X-Sender: muller AT ics DOT u-strasbg DOT fr
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0.2
Date: Mon, 13 Dec 1999 18:33:05 +0100
To: Peter Johnson <locke AT mcs DOT net>, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
From: Pierre Muller <muller AT cerbere DOT u-strasbg DOT fr>
Subject: Re: NT4 DPMI BUG (303h, Allocate Real-Mode Callback)
Cc: djgpp AT delorie DOT com
References: <3 DOT 0 DOT 6 DOT 32 DOT 19991212231044 DOT 00928100 AT ics DOT u-strasbg DOT fr>
<Pine DOT SUN DOT 3 DOT 91 DOT 991212140216 DOT 19096U-100000 AT is>
<MPG DOT 12bbad46af52508b9896d9 AT news DOT cso DOT uiuc DOT edu>
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

At 16:19 12/12/99 -0600, Peter Johnson wrote:
>At 11:10 PM 12/12/99 +0100, muller AT cerbere DOT u-strasbg DOT fr wrote:
>>   I mean that I only reserved room for one such structure inside
>>the loader file (equivalent of crt0.S)
>>so all calls to 0x303 DPMI function must use the same
>>register struct !
>
>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 ?

>Workaround: the callback handler copies the registers structure into local 
>(to the handler) storage as soon as it gets called.
  Would work probably would be safe if you disable interrupt during it !

>Even with this workaround, I feel uncomfortable about multiple handlers 
>sharing a single structure, and it requires adding code to the handler, 
>which is something that would be nice to avoid.

   Once again, it just alloed us to get the mouse callback (function 0xc of
int 0x33)
to work with WinNT.
   For general use, Peter's solution is best !
  Nevertheless try to use selectors only if needed...
don't forget that Win(95 at least never reuses the same selector value !)


Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller AT ics DOT u-strasbg DOT fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

- Raw text -


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