From: Bjorn De Meyer Newsgroups: comp.os.msdos.djgpp Subject: Re: Pthreads Date: Tue, 15 Sep 1998 14:11:26 +0200 Organization: University of Ghent, Belgium Lines: 50 Message-ID: References: <35F7402B DOT A36C0C32 AT cartsys DOT com> NNTP-Posting-Host: eduserv2.rug.ac.be Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <35F7402B.A36C0C32@cartsys.com> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Wed, 9 Sep 1998, Nate Eldredge wrote: > Baumans wrote: > > > > What are pthreads?How do you use them? > > As I understand it, it's an API to allow multitasking within a process. > This can be helpful for identifying which parts of a program can run > independently, and also can allow multiprocessor machines to be used > effectively. Let me but in here. I have sucessfully compiled and tested pthreads under DJGPP. In fact you can have some kind of "multitasking" under dos. Well, not really, in fact it's just some kind of task switching, and your different paralell processes must call a pthreads_yield function from time to time so the next process in the list can be activated. As you see, it's not that userfriendly. Anyway, I think for real multitasking LPW could be better. The problem with that is that all your functions must be re-entrant (whatever that means), and the libc functions are not, so you have to hack around that by disabeling task swapping in libc functions. If anyone can tell me how to write a fully re-entrant version of libc, then please e-mail me! Hope this helps! > > Nate Eldredge > nate AT cartsys DOT com > > > > Bjorn De Meyer. IA #i^4 Homepage: http//studwww.rug.ac.be/~bgdmeyer E-mail: bjorn DOT demeyer AT rug DOT ac DOT be Chemistry student at RUG, option polymers. Coordinator of the "Tales of Artah: First Sword" CRPG project. "I've shaven. I'm happy. I have no religion. Don't pray for me." Illusion of Gaia 2