From owner-freebsd-arch Fri Sep 13 9:46: 9 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9945F37B405 for ; Fri, 13 Sep 2002 09:46:05 -0700 (PDT) Received: from web11208.mail.yahoo.com (web11208.mail.yahoo.com [216.136.131.190]) by mx1.FreeBSD.org (Postfix) with SMTP id 1919243E6E for ; Fri, 13 Sep 2002 09:46:05 -0700 (PDT) (envelope-from gathorpe79@yahoo.com) Message-ID: <20020913164532.65101.qmail@web11208.mail.yahoo.com> Received: from [142.204.207.91] by web11208.mail.yahoo.com via HTTP; Fri, 13 Sep 2002 12:45:31 EDT Date: Fri, 13 Sep 2002 12:45:31 -0400 (EDT) From: Gary Thorpe Subject: Re: Commiting KSE pthreads prototype into -CURRENT. To: Jon Mini Cc: freebsd-arch@freebsd.org In-Reply-To: <20020912191605.GZ3866@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --- Jon Mini wrote: > Alexey Zelkin [phantom@FreeBSD.ORG] wrote : > > > As I recall correctly '-pthread' is required for > 4-STABLE only. In CURRENT > > you just need to link against -lc_r to get > threaded application. > > You are correct on this. > > -- > Jonathan Mini > http://www.freebsd.org/ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message Hmmm, isn't using -lc_r simply linking the application against a reentrant library? Using pthreads (or any other thread API) would *require* reentrant libraries, but using a reentrant library will not make the application itself threaded (unless code inside the library actively creates/destroys threads when called). To get pthread, you would have to use -lpthread or maybe even -pthread (FreeBSD's custom gcc flag)? If this is not the case (and -lc_r includes pthread support), then maybe scenarios when reentrant libraries are wanted but pthreads are not (e.g. when custom user space threading libraries are being used) should be considered? I.e. shouldn't the programmer decide whether to link reentrant libraries AND what thread support (if any) they want? ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message