freebsd-dev/include
Brian Feldman 33dee81933 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.
2004-02-25 21:03:46 +00:00
..
arpa MFCrypto: update RFC assigned telnet options (r1.9) 2003-01-18 06:13:57 +00:00
protocols Change utimes to set the file creation time (for filesystems that 2002-07-17 02:03:19 +00:00
rpc Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
rpcsvc Argh. Forward declare some structs rather than increase include file 2003-10-26 16:35:11 +00:00
_ctype.h Solve the <runetype.h> pollution problem by disabling inline 2002-09-09 05:38:05 +00:00
a.out.h
ar.h
assert.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
bitstring.h Finish the repocopy of bitstring.h to sys so it can be used 2003-06-13 19:40:13 +00:00
complex.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
cpio.h Implement the POSIX.1-2001 (XSI) header, <cpio.h>. 2002-08-01 07:18:38 +00:00
ctype.h Solve the <runetype.h> pollution problem by disabling inline 2002-09-09 05:38:05 +00:00
db.h Fixed some style bugs in the removal of __P(()). Some function parameter 2002-03-26 01:35:05 +00:00
dirent.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
dlfcn.h Implement dlinfo() function. 2003-02-13 17:47:44 +00:00
elf-hints.h
elf.h This header is for Solaris compatibility only (according to David 2002-07-04 11:05:39 +00:00
err.h o Merge <machine/ansi.h> and <machine/types.h> into a new header 2002-08-21 16:20:02 +00:00
fmtmsg.h Fix some style bugs. 2002-08-05 16:37:05 +00:00
fnmatch.h Now I understand what Bruce was getting at - -1 can be parsed as two 2003-12-18 10:41:39 +00:00
fstab.h - Add setfstab() and getfstab(). 2003-04-07 12:55:00 +00:00
fts.h Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct 2002-09-21 01:28:41 +00:00
getopt.h Add getopt_long_only() 2004-02-24 08:09:20 +00:00
glob.h Update glob(3) to add all the POSIX required options, specifically: 2002-07-17 04:58:09 +00:00
grp.h = Implement thread-safe versions of the getpwent(3) and getgrent(3) 2003-04-17 14:15:26 +00:00
hesiod.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
histedit.h Make C++ safe 2003-07-14 16:31:20 +00:00
ieeefp.h o Move the contents of <machine/floatingpoint.h> over to 2003-01-19 06:01:33 +00:00
ifaddrs.h Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function, 2003-11-14 18:53:22 +00:00
inttypes.h Add the remaining C99 wide character string to integer conversion functions. 2002-09-22 08:06:45 +00:00
iso646.h style(9): tab after #define. 2002-09-18 22:23:59 +00:00
kenv.h Rework the kernel environment subsystem. We now convert the static 2002-04-17 13:06:36 +00:00
langinfo.h o Don't include <nl_types.h>, instead provide a typedef for nl_item. 2002-09-18 05:54:25 +00:00
libgen.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
limits.h Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
link.h Initiate deorbit burn for the i386-only a.out related support. Moves are 2002-09-17 01:49:00 +00:00
locale.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
Makefile Add NO_BLUETOOTH knob to the build process 2004-01-28 00:42:51 +00:00
malloc.h Traditionally work in the -traditional case. 2001-11-07 23:14:31 +00:00
memory.h
monetary.h Fix an error which prevented ssize_t from becoming defined. Add 2002-09-20 08:22:48 +00:00
mpool.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
ndbm.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
netconfig.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
netdb.h Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
nl_types.h Add forgotten <sys/_types.h> include. Fix some style bugs while I'm 2002-09-24 17:28:12 +00:00
nlist.h Use sys/nlist_aout.h for shared-with-kernel definitions. 2002-08-22 20:37:57 +00:00
nss.h It was reported that when using nss_ldap, getgrent(3) would behave 2004-01-09 13:43:49 +00:00
nsswitch.h = Implement name service switch modules (NSS modules). NSS modules 2003-04-17 14:14:22 +00:00
objformat.h
paths.h Define _PATH_MKSNAP_FFS and use it in dump(8) instead of assuming 2004-01-04 17:17:46 +00:00
pthread_np.h pthread_attr_get_np() now takes 'pthread_t' (not 'pthread_t *') 2003-01-07 21:43:30 +00:00
pthread.h Add the pthread_atfork() prototype. 2003-11-04 20:10:15 +00:00
pwd.h Revert the definitions of _PW_KEY* to their previous values. There is 2003-04-18 14:11:17 +00:00
ranlib.h
readpassphrase.h Synch with OpenBSD (style). 2002-03-08 20:52:52 +00:00
regex.h Now I understand what Bruce was getting at - -1 can be parsed as two 2003-12-18 10:41:39 +00:00
regexp.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
resolv.h Make the resolver(3) and many associated interfaces much more reentrant. 2004-02-25 21:03:46 +00:00
rune.h Move _PATH_LOCALE to place where it really belongs to (rune.h -> paths.h) 2003-06-25 22:28:33 +00:00
runetype.h o Fix namespace scope issues in <ctype.h> by using the relatively new 2002-09-06 04:22:54 +00:00
search.h - Remove the lsearch() and lfind() functions and their manpage from 2002-10-16 14:29:23 +00:00
setjmp.h Fix namespace issues by using visibility conditionals from 2002-10-05 05:48:50 +00:00
sgtty.h
signal.h - Define sigwait, sigtimedwait, and sigwaitinfo in terms of 2003-03-31 23:30:41 +00:00
stab.h
stdbool.h add a check for GNUC < 3 to typedef bool because gcc 3 always seems to 2002-08-16 07:33:14 +00:00
stddef.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
stdio.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
stdlib.h POSIX clearly states that getsubopt() should be declared in <stdlib.h>, 2004-02-23 03:16:59 +00:00
string.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
stringlist.h Sync with NetBSD -- sl_add() now returns an int. 2003-01-19 01:16:01 +00:00
strings.h Add and document ffsl(), fls() and flsl(). 2004-01-13 16:05:47 +00:00
sysexits.h
tar.h
time.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
timeconv.h o Merge <machine/ansi.h> and <machine/types.h> into a new header 2002-08-21 16:20:02 +00:00
timers.h
ttyent.h Breath deep and take __P out of the system include files. 2002-03-23 17:24:55 +00:00
ulimit.h No need to support UL_GETSIZE and UL_SETSIZE anymore; they are about to be 2003-01-08 01:18:13 +00:00
unistd.h Add optreset to getopt.h too since NetBSD getopt_long() (but not GNU one) 2004-02-23 04:51:07 +00:00
utime.h Add time_t typedef for POSIX compatibility, move an include. 2002-08-24 00:11:52 +00:00
utmp.h ll_time and ut_time are int32_t on disk and have to remain that way 2001-10-27 20:40:54 +00:00
uuid.h Wrap function prototype declarations in __BEGIN_DECLS to do the right thing 2002-11-05 10:55:16 +00:00
varargs.h Add a new machine independent varargs.h and use it as a central place 2003-09-01 03:28:25 +00:00
vis.h Add a new flag to vis(3): VIS_GLOB which encodes the glob(3) magic 2003-10-30 10:40:49 +00:00
wchar.h Change the definition of NULL on ia64 (for LP64 compilations) from 2003-12-07 21:10:06 +00:00
wctype.h o Merge <machine/ansi.h> and <machine/types.h> into a new header 2002-08-21 16:20:02 +00:00
wordexp.h Describe WRDE_NOCMD in the same way that we describe the rest of the flags. 2003-01-03 12:03:38 +00:00