develooper Front page | perl.perl5.porters | Postings from January 2001

Re: gethostbyname (was Re: Does perl really need to use sigsetjmp? (18% performance hit))

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
January 26, 2001 12:40
Subject:
Re: gethostbyname (was Re: Does perl really need to use sigsetjmp? (18% performance hit))
Message ID:
20010126144005.X14058@chaos.wustl.edu
> It depends on your platform--some have threadsafe gethost* calls and don't 
> need the _r version, and some don't. (And some aren't threadsafe but don't 
> have _r versions...)

And don't foolishly think that there is only one set of _r variants
out there.  There are several different signatures for getpwnam_r,
for example.

> It's pretty much a crapshoot, unfortunately.

Alan would drop -shoot :-)

> Oh, lots probably. Even more when you factor in other people's XS code, 
> though that's not strictly fair.

From Todo:

        the _r-problem: for all the {set,get,end}*() system database
             calls (and a couple more: readdir, *rand*, crypt, *time,
             tmpnam) there are in many systems the _r versions
             to be used in re-entrant (=multithreaded) code
             Icky things: the _r API is not standardized and
             the _r-forms require per-thread data to store their state

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About