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

next in thread | previous in thread | raw e-mail | index | archive | help

--- 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.
> 
> -- 
> 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

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




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