Mail Archives: djgpp-workers/1997/09/11/03:12:25
Eli Zaretskii wrote:
> > It's not possible that a tb is altered out of libc contol, right ?
> Wrong. Application code is free to use the transfer buffer also.
Not inside a call to a libc function. So all the functions know when the
tb could be altered. Using it for an asyncronous event (like an IRQ) is
a Real Bad Thing, IMHO ... So it could really be better if the two
buffers (libc one and application one) are different.
> > I don't remember libc functions that assume that tb isn't altered.
> I don't think any of them do, right now. But this doesn't change
> anything, because having the contents of tb change under your feet is
> IMHO a Bad Thing. It requires the library maintainer to be acutely aware
> at all times that such a possibility exists, and that ain't easy.
tb doesen't change under your feet. Its contents could change only when
invoking another program. And if now no function assumes it's constant
during a call, let's document that it can change during some calls.
- Raw text -