Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jul 2000 15:54:12 -0700
From:      Alfred Perlstein <bright@wintelcom.net>
To:        "Richard Seaman, Jr." <dick@tar.com>
Cc:        Tan Juay Kwang <tanjk@i-dns.net>, freebsd-questions@FreeBSD.ORG
Subject:   Re: pthreads on 4.0-STABLE
Message-ID:  <20000720155412.R13979@fw.wintelcom.net>
In-Reply-To: <20000720173001.C404@tar.com>; from dick@tar.com on Thu, Jul 20, 2000 at 05:30:01PM -0500
References:  <NEBBLKHLGDECFCNMHPEECEMPCOAA.tanjk@i-dns.net> <20000720162831.B404@tar.com> <20000720173001.C404@tar.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Richard Seaman, Jr. <dick@tar.com> [000720 15:41] wrote:
> On Thu, Jul 20, 2000 at 04:28:31PM -0500, Richard Seaman, Jr. wrote:
> 
> > Ideally, a threads package will provide gethostbyname_r, where you
> > pass a buffer for the result so you can avoid having to wrap the
> > call in a mutex.  Unfortunately, I don't see this call in the
> > FreeBSD user threads package.  Such a call does exist in linuxthreads
> > (as well as the FreeBSD linuxthreads port --
> >  see /usr/ports/devel/linuxthreads).
> 
> I forgot.  You can also use the newer getaddinfo(3) call.  This
> is probably preferable, though I'm not sure about how portable
> this is.

Shouldn't it be an easy enough hack to use pthread_once along with
pthread_get/set_specific when _THREAD_SAFE is defined in gethostbyname?

-Alfred


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




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