Date: Wed, 24 Jul 1996 18:40:45 +0200 (IST) From: Eli Zaretskii To: Sengan DOT Short AT durham DOT ac DOT uk Cc: djgpp AT delorie DOT com Subject: Re: Multithread question In-Reply-To: <6020.9607241449@ws-ai5.dur.ac.uk> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 24 Jul 1996 Sengan DOT Short AT durham DOT ac DOT uk wrote: > Is that all we have to do? Allocate dos memory, and switch the above > value ? That is the source of non-reentrancy in ALL functions that invoke real-mode (DOS and BIOS) services, yes. After fixing this, one should scan libc and look for other causes of non-reentrancy. I make a rule to never call any library function from a multithreaded program if I don't know *exactly* what that function does. > 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? AFAIK, nobody has made libc functions clean wrt to the reentrancy. So most probably there are other functions that will fail.