In article <[EMAIL PROTECTED]> you wrote:
> [This was previously a bug report involving -lpth and -lgc on Debian
> GNU/Linux. I found out that the problem stems from -lgc dragging in
> -lpthread.]
>
> This is a simple test to show that Pth and Pthreads can't run in the
> same executable on my machine. Is there a good reason why this is so?
Yes and no. In general there is no reason to use both Pth and Pthreads,
because both are MT environments and a single one is sufficient. This is
especally true if you use Pth's Pthreads API, of course.
> I would have thought that Pth would happily run in a single kernel
> thread.
Yes, as long as the MT facility (LinuxThreads) does not play games
within the APIs. But as you showed, at least the nasty "errno" situation
causes trouble because both Pthread and Pth try to provide a per-thread
errno. Why it segfaults I do not know, because Pth makes no assumption
about errno except that it can be used (read & write) like a variable.
the write aspect might not be ok for LinuxThreads, but I don't know.
Does anybody know what the problem with __errno_location in LinuxThreads
is?
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
______________________________________________________________________
GNU Portable Threads (Pth) http://www.gnu.org/software/pth/
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager (Majordomo) [EMAIL PROTECTED]