freebsd-src/include
Alan Somers ad8b59ffe7 libc/libc/rpc: refactor some global variables
* Combine dg_fd_locks and dg_cv into one array.
* Similarly for vc_fd_locks and vc_cv
* Turn some macros into inline functions

This is a mostly cosmetic change to make refactoring these strutures in
a future commit easier.

Sponsored by:	Axcient
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D42597

(cherry picked from commit a5c2f4e939)

lib/libc/rpc: switch the per-fd structs in clnt_{dg,vc}.c to RB Trees

This saves oodles of memory, especially when "ulimit -n" is large.  It
also prevents a buffer overflow if getrlimit should fail.

Also replace per-fd condvars with mutexes to simplify the code.

PR:		274968
Sponsored by:	Axcient
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D42597

(cherry picked from commit 24938f9311)
2023-11-30 13:42:55 -07:00
..
arpa Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
gssapi Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
protocols Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
rpc libc/libc/rpc: refactor some global variables 2023-11-30 13:42:55 -07:00
rpcsvc Remove $FreeBSD$: one-line xdr pattern 2023-08-23 11:43:34 -06:00
xlocale Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
_ctype.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
a.out.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
ar.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
assert.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
bitstring.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
byteswap.h byteswap.h: Add a glibc/linux compatible byteswap.h 2023-01-24 16:26:28 -07:00
complex.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
cpio.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
ctype.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
db.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
dirent.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
dlfcn.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
elf-hints.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
elf.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
endian.h linux: For better compatibility, provide compatible endian.h 2023-01-24 16:26:28 -07:00
err.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
fmtmsg.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
fnmatch.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
fstab.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
fts.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
ftw.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
getopt.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
glob.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
grp.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
gssapi.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
hesiod.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
iconv.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
ieeefp.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
ifaddrs.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
inttypes.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
iso646.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
kenv.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
langinfo.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
libgen.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
limits.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
link.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
locale.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
malloc.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
malloc_np.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
memory.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
mk-osreldate.sh Remove $FreeBSD$: one-line sh pattern 2023-08-23 11:43:30 -06:00
monetary.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
mpool.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
mqueue.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
ndbm.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
netconfig.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
netdb.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
nl_types.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
nlist.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
nss.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
nsswitch.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
paths.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
printf.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
proc_service.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
pthread.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
pthread_np.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
pwd.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
ranlib.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
readpassphrase.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-23 11:43:23 -06:00
regex.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
res_update.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
resolv.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
runetype.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
sched.h sys/bitset.h: reduce visibility of BIT_* macros 2022-01-14 18:17:30 +02:00
search.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
semaphore.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
setjmp.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
signal.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
spawn.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
stab.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
stdalign.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
stdbool.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
stddef.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
stdio.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
stdlib.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
stdnoreturn.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
string.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
stringlist.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
strings.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
sysexits.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
tar.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
termios.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
tgmath.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
time.h time.h: Fix visibility check for C11 and C23 features. 2023-09-14 16:59:52 +02:00
timeconv.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
timers.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
ttyent.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
uchar.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
ulimit.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
unistd.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
utime.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
utmpx.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
uuid.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
varargs.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
wchar.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
wctype.h Remove $FreeBSD$: one-line .h pattern 2023-08-23 11:43:22 -06:00
wordexp.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00
xlocale.h Remove $FreeBSD$: two-line .h pattern 2023-08-23 11:43:21 -06:00