Mail Archives: djgpp/1998/09/20/03:15:49
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
- Raw text -