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