From owner-freebsd-hackers Fri Apr 9 7:17: 8 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from shale.csir.co.za (shale.csir.co.za [146.64.46.5]) by hub.freebsd.org (Postfix) with ESMTP id C264C14FBC for ; Fri, 9 Apr 1999 07:16:50 -0700 (PDT) (envelope-from reg@shale.csir.co.za) Received: (from reg@localhost) by shale.csir.co.za (8.9.3/8.9.3) id QAA06021; Fri, 9 Apr 1999 16:12:03 +0200 (SAT) (envelope-from reg) Date: Fri, 9 Apr 1999 16:12:03 +0200 From: Jeremy Lea To: Roger Hardiman Cc: dick@tar.com, hackers@FreeBSD.ORG Subject: Re: cc -pthread and -kthread switches Message-ID: <19990409161203.B3791@shale.csir.co.za> References: <370DC114.E0A81FDE@cs.strath.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <370DC114.E0A81FDE@cs.strath.ac.uk>; from Roger Hardiman on Fri, Apr 09, 1999 at 09:57:56AM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I've spoken about this before, but I'll throw my ideas in again. On Fri, Apr 09, 1999 at 09:57:56AM +0100, Roger Hardiman wrote: > cc -uthread use useland threads (what is currently -pthread) > cc -kthread use kernel threads This could break anything using -pthread. Something like this: cc -pthread - links with '-lc_r' and defines -D_THREAD_SAFE. cc -kthread - links with '-lpthread -lc' and defines -D_THREAD_SAFE and -DLINUXTHREADS. would really make porting applications a lot easier. If anyone does conjure up the magic 'FreeBSD kernel threads' it can replace -kthread, and the LinuxThreads can either die or be moved to -lthread (or if a -l?? option isn't workable -xthread) I still feel that Richard's LinuxThreads port belongs in the base system and not in Ports. I looked at it, and it shouldn't be to difficult to 'contribify'. If you haven't looked, the poor port has to go rumaging around in /usr/src to find half of it's source files. This is a reciepe for disaster. Maybe the Linux threads should go straight to -lthread or -xthread, with library names 'liblthread' and headers in /usr/include/pthread/lthread'. That leaves 'kthread' open. -xthread sounds like something which is going to leave soon... Regards, -Jeremy -- | "I could be anything I wanted to, but one things true --+-- Never gonna be as big as Jesus, never gonna hold the world in my hand | Never gonna be as big as Jesus, never gonna build a promised land | But that's, that's all right, OK with me..." -Audio Adrenaline To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message