Mail Archives: djgpp/1999/12/13/14:54:32
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 -