From owner-freebsd-current Thu Jan 21 08:13:34 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA21106 for freebsd-current-outgoing; Thu, 21 Jan 1999 08:13:34 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from shale.csir.co.za (shale.csir.co.za [146.64.46.5]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA21071 for ; Thu, 21 Jan 1999 08:13:29 -0800 (PST) (envelope-from reg@shale.csir.co.za) Received: (from reg@localhost) by shale.csir.co.za (8.9.2/8.9.2) id SAA30759; Thu, 21 Jan 1999 18:12:31 +0200 (SAT) (envelope-from reg) Date: Thu, 21 Jan 1999 18:12:29 +0200 From: Jeremy Lea To: "Richard Seaman, Jr." Cc: freebsd-current@FreeBSD.ORG Subject: Using LinuxThreads Message-ID: <19990121181228.A98581@shale.csir.co.za> References: <19990118182717.A15566@top.worldcontrol.com> <19990119024539.A88383@top.worldcontrol.com> <19990119140613.B826@shale.csir.co.za> <19990119091151.F600@tar.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <19990119091151.F600@tar.com>; from Richard Seaman, Jr. on Tue, Jan 19, 1999 at 09:11:51AM -0600 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, On Tue, Jan 19, 1999 at 09:11:51AM -0600, Richard Seaman, Jr. wrote: > Actually, the new version, in FreeBSD "ports" form, doesn't require > -DLINUXTHREADS anymore, but it does require -I/usr/local/include to > pick up the right header, since it installs a pthread.h into > /usr/local/include. This conflicts with the pthread.h in /usr/include. This is nagging at me. Having two headers of the same name, but importantly different content is asking for touble. There needs to be a way to ensure that only one or the other is picked up. The best way I can think of is to only include the contents of the user thread pthread.h if _THREAD_SAFE is defined (to force people to use the right defines...) and the contents of kernel thread pthread.h if _REENTRANT (and not _THREAD_SAFE) is defined. This has the added bonus of meaning that most linux apps wont have to be patched. To many applications have configure scripts which might find /usr/local/lib/libpthread, but not /usr/local/include/pthread.h, or find /usr/lib/libc_r and find /usr/local/include/pthread.h. Can gcc be made to define _THREAD_SAFE automatically if -pthread is given? And _REENTRANT if -kthread is given? What are the plans for the import of the LinuxThreads stuff into the src tree? Or is it going to remain a port, and the source tree position be reserved for a future kernel threads implementation? My mind says it is to closely tied to the OS to be a port. And when are COMPAT_LINUX_THREADS and VM_STACK going away? Regards, -Jeremy -- | "In this world of temptation, I will stand for what is right. --+-- With a heart of salvation, I will hold up the light. | If I live or if I die, if I laugh or if I cry, | in this world of temptation, I will stand." -Pam Thum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message