From owner-freebsd-arch Sat Sep 14 23:12:33 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 53DB537B400 for ; Sat, 14 Sep 2002 23:12:32 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1321C43E6A for ; Sat, 14 Sep 2002 23:12:32 -0700 (PDT) (envelope-from baka@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1921) id D36FFAE22C; Sat, 14 Sep 2002 23:12:31 -0700 (PDT) Date: Sat, 14 Sep 2002 23:12:31 -0700 From: Jon Mini To: Gary Thorpe Cc: freebsd-arch@freebsd.org Subject: Re: Commiting KSE pthreads prototype into -CURRENT. Message-ID: <20020915061231.GA3866@elvis.mu.org> References: <20020912191605.GZ3866@elvis.mu.org> <20020913164532.65101.qmail@web11208.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020913164532.65101.qmail@web11208.mail.yahoo.com> User-Agent: Mutt/1.4i 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 Gary Thorpe [gathorpe79@yahoo.com] wrote : > --- 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. > > 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). Simply: no. The reentrant stuff needed in libc is already there. The -pthread gcc option hack is simply an alias for -lc_r right now. A threaded application in -CURRENT links against both libc_r and libc. This will be a replacement for libc_r. -- Jonathan Mini http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message