tnptl dependencies - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit b04c42e9eb74c0206a0e21abbf8eb061f8eecea6
 (DIR) parent 4753f0691a01a52bd5aa6b650832fbc3fba9218e
 (HTM) Author: rsc <devnull@localhost>
       Date:   Mon, 17 Jan 2005 21:32:55 +0000
       
       nptl dependencies
       
       Diffstat:
         A .cvsignore                          |       1 +
         M INSTALL                             |       1 +
         A lib/linux-isnptl.c                  |      15 +++++++++++++++
         M man/man1/install.1                  |      12 +++++++++++-
       
       4 files changed, 28 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/.cvsignore b/.cvsignore
       t@@ -0,0 +1 @@
       +config
 (DIR) diff --git a/INSTALL b/INSTALL
       t@@ -21,6 +21,7 @@ if [ `uname` = Linux ]; then
                        echo "        NPTL not found."
                        echo "SYSVERSION=2.4" >$PLAN9/config
                fi
       +        rm -f ./a.out
        fi
        echo "Building mk..."
        cd src
 (DIR) diff --git a/lib/linux-isnptl.c b/lib/linux-isnptl.c
       t@@ -0,0 +1,15 @@
       +#include <pthread.h>
       +#include <unistd.h>
       +#include <stdlib.h>
       +#include <stdio.h>
       +
       +int
       +main(void)
       +{
       +        ulong x;
       +
       +        x = (ulong)pthread_self();
       +        if(x < 1024*1024)
       +                exit(1);        /* NOT NPTL */
       +        exit(0);
       +}
 (DIR) diff --git a/man/man1/install.1 b/man/man1/install.1
       t@@ -40,7 +40,17 @@ can safely be repeated to rebuild the system from scratch.
        The system uses different threading implementations on Linux 2.6 and
        later kernels than on 2.4 and earlier;
        and on FreeBSD 5 and later kernels than on FreeBSD 4 and earlier.
       -Running binaries from one class on another may not work.
       +Running binaries from one class on another will not work.
       +.PP
       +Some Linux 2.6 systems (e.g., Gentoo) do not use the new NPTL pthread library
       +even though the kernel supports them.  On these systems, plan9port must 
       +fall back on the threading code intended for Linux 2.4.  To accomplish this,
       +.I INSTALL
       +checks whether the running system uses NPTL and sets
       +.B SYSVERSION
       +in
       +.B \*9/config
       +accordingly.
        .SH FILES
        .TP
        .B \*9/lib/moveplan9.files