Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2004 13:03:46 -0800 (PST)
From:      Brian Feldman <green@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/include netdb.h resolv.h src/lib/libc/include reentrant.h src/lib/libc/net getaddrinfo.3 getaddrinfo.c gethostbydns.c gethostbyname.3 gethostbynis.c getipnodebyname.3 herror.c name6.c res_init.c res_send.c res_send_private.h ...
Message-ID:  <200402252103.i1PL3kkh030016@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
green       2004/02/25 13:03:46 PST

  FreeBSD src repository

  Modified files:
    include              netdb.h resolv.h 
    lib/libc/include     reentrant.h 
    lib/libc/net         getaddrinfo.3 getaddrinfo.c 
                         gethostbydns.c gethostbyname.3 
                         gethostbynis.c getipnodebyname.3 herror.c 
                         name6.c res_init.c res_send.c resolver.3 
  Added files:
    lib/libc/net         res_send_private.h 
  Log:
  Make the resolver(3) and many associated interfaces much more reentrant.
  The getaddrinfo(3), getipnodebyname(3) and resolver(3) can coincide now
  with what should be totally reentrant, and h_errno values will now
  be preserved correctly, but this does not affect interfaces such as
  gethostbyname(3) which are still mostly non-reentrant.
  
  In all of these relevant functions, the thread-safety has been pushed
  down as far as it seems possible right now.  This means that operations
  that are selected via nsdispatch(3) (i.e. files, yp, dns) are protected
  still under global locks that getaddrinfo(3) defines, but where possible
  the locking is greatly reduced.  The most noticeable improvement is
  that multiple DNS lookups can now be run at the same time, and this
  shows major improvement in performance of DNS-lookup threaded programs,
  and solves the "Mozilla tab serialization" problem.
  
  No single-threaded applications need to be recompiled.  Multi-threaded
  applications that reference "_res" to change resolver(3) options will
  need to be recompiled, and ones which reference "h_errno" will also
  if they desire the correct h_errno values.  If the applications already
  understood that _res and h_errno were not thread-safe and had their own
  locking, they will see no performance improvement but will not
  actually break in any way.
  
  Please note that when NSS modules are used, or when nsdispatch(3)
  defaults to adding any lookups of its own to the individual libc
  _nsdispatch() calls, those MUST be reentrant as well.
  
  Revision  Changes    Path
  1.32      +3 -2      src/include/netdb.h
  1.24      +6 -1      src/include/resolv.h
  1.3       +3 -0      src/lib/libc/include/reentrant.h
  1.24      +6 -2      src/lib/libc/net/getaddrinfo.3
  1.49      +15 -12    src/lib/libc/net/getaddrinfo.c
  1.44      +0 -1      src/lib/libc/net/gethostbydns.c
  1.31      +6 -0      src/lib/libc/net/gethostbyname.3
  1.17      +0 -2      src/lib/libc/net/gethostbynis.c
  1.11      +9 -2      src/lib/libc/net/getipnodebyname.3
  1.12      +4 -3      src/lib/libc/net/herror.c
  1.35      +14 -13    src/lib/libc/net/name6.c
  1.32      +119 -9    src/lib/libc/net/res_init.c
  1.47      +11 -8     src/lib/libc/net/res_send.c
  1.1       +82 -0     src/lib/libc/net/res_send_private.h (new)
  1.26      +11 -0     src/lib/libc/net/resolver.3



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