Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2002 23:12:31 -0700
From:      Jon Mini <mini@FreeBSD.ORG>
To:        Gary Thorpe <gathorpe79@yahoo.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Commiting KSE pthreads prototype into -CURRENT.
Message-ID:  <20020915061231.GA3866@elvis.mu.org>
In-Reply-To: <20020913164532.65101.qmail@web11208.mail.yahoo.com>
References:  <20020912191605.GZ3866@elvis.mu.org> <20020913164532.65101.qmail@web11208.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Gary Thorpe [gathorpe79@yahoo.com] wrote :

> --- Jon Mini <mini@FreeBSD.ORG> 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 <mini@freebsd.org>
http://www.freebsd.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020915061231.GA3866>