Subject: Re: pthread library
To: B. James Phillippe spamblock <bryan-spamtrap0@darkforest.org>
From: Rene Hexel <rh@netbsd.org>
List: netbsd-help
Date: 03/02/2002 18:01:40
B. James Phillippe spamblock wrote:

> There is also "pth", which is simple to use and will allow your threaded
> apps to compile cleanly, but it doesn't really emulate threads.  That is,
> if one thread blocks (on IO for example), it seems to block the whole app.
> If you want to multi-thread "Hello World", it's probably okay, but anything
> sophisticated and it's all over.

   What you have to do is define _POSIX_THREAD_SYSCALL_SOFT=1 before
including pthread.h.  This way you will activate pth's system call
wrappers that will yield the processor in case of a blocking system
call.

   Cheers
       ,
    Rene