33dee81933
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. |
||
---|---|---|
.. | ||
addr2ascii.3 | ||
addr2ascii.c | ||
ascii2addr.c | ||
base64.c | ||
byteorder.3 | ||
ether_addr.c | ||
ethers.3 | ||
getaddrinfo.3 | ||
getaddrinfo.c | ||
gethostbydns.c | ||
gethostbyht.c | ||
gethostbyname.3 | ||
gethostbynis.c | ||
gethostnamadr.c | ||
getifaddrs.3 | ||
getifaddrs.c | ||
getifmaddrs.3 | ||
getifmaddrs.c | ||
getipnodebyname.3 | ||
getnameinfo.3 | ||
getnameinfo.c | ||
getnetbydns.c | ||
getnetbyht.c | ||
getnetbynis.c | ||
getnetent.3 | ||
getnetnamadr.c | ||
getproto.c | ||
getprotoent.3 | ||
getprotoent.c | ||
getprotoname.c | ||
getservbyname.c | ||
getservbyport.c | ||
getservent.3 | ||
getservent.c | ||
herror.c | ||
hesiod.3 | ||
hesiod.c | ||
if_indextoname.3 | ||
if_indextoname.c | ||
if_nameindex.c | ||
if_nametoindex.c | ||
inet6_opt_init.3 | ||
inet6_option_space.3 | ||
inet6_rth_space.3 | ||
inet6_rthdr_space.3 | ||
inet_addr.c | ||
inet_lnaof.c | ||
inet_makeaddr.c | ||
inet_net_ntop.c | ||
inet_net_pton.c | ||
inet_net.3 | ||
inet_neta.c | ||
inet_netof.c | ||
inet_network.c | ||
inet_ntoa.c | ||
inet_ntop.c | ||
inet_pton.c | ||
inet.3 | ||
ip6opt.c | ||
linkaddr.3 | ||
linkaddr.c | ||
Makefile.inc | ||
map_v4v6.c | ||
name6.c | ||
ns_name.c | ||
ns_netint.c | ||
ns_parse.c | ||
ns_print.c | ||
ns_ttl.c | ||
nsap_addr.c | ||
nsdispatch.3 | ||
nsdispatch.c | ||
nslexer.l | ||
nsparser.y | ||
nss_backends.h | ||
nss_compat.c | ||
rcmd.3 | ||
rcmd.c | ||
rcmdsh.3 | ||
rcmdsh.c | ||
recv.c | ||
res_comp.c | ||
res_config.h | ||
res_data.c | ||
res_debug.c | ||
res_init.c | ||
res_mkquery.c | ||
res_mkupdate.c | ||
res_query.c | ||
res_send_private.h | ||
res_send.c | ||
res_update.c | ||
resolver.3 | ||
rthdr.c | ||
send.c | ||
sockatmark.3 | ||
sockatmark.c | ||
vars.c |