Mail Archives: djgpp/1996/07/24/10:55:11
> Doesn't the LWP package work by converting the interrupt into a signal?
> If so, then DOS reentrancy isn't an issue, because the signal handling is
> delayed until you are back in protected mode.
Yes it does, so it's ok.
> > b) printf is less reentrant than DOS.
>
> Any function that passes data to or from DOS is non-reentrant because it
> uses the transfer buffer. Each task (thread) should allocate its own
> transfer buffer to be able to freely use real-mode services which need a
> transfer buffer. The scheduler (the signal handler) should change the
> value of _go32_info_block.linear_address_of_transfer_buffer on every task
> switch, for this to work.
Is that all we have to do? Allocate dos memory, and switch the above value ?
What about malloc: it has a nextf[] structure it uses, so probably is not
reentrant, right? Do you know of any other functions that might be non-reentrant
like this?
Sengan
- Raw text -